diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 3f709069..4aa65fec 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Added + +- Set `PI_CODING_AGENT=true` environment variable at startup so sub-processes can detect they are running inside the coding agent ([#2868](https://github.com/badlogic/pi-mono/issues/2868)) + ## [0.66.1] - 2026-04-08 ### Changed diff --git a/packages/coding-agent/src/cli.ts b/packages/coding-agent/src/cli.ts index 22130f22..b48f8587 100644 --- a/packages/coding-agent/src/cli.ts +++ b/packages/coding-agent/src/cli.ts @@ -6,6 +6,7 @@ * Test with: npx tsx src/cli-new.ts [args...] */ process.title = "pi"; +process.env.PI_CODING_AGENT = "true"; process.emitWarning = (() => {}) as typeof process.emitWarning; import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";