feat(coding-agent): marked child processes as agent-driven

- Set AGENT=1 through the shared non-interactive child environment.

- Covered the marker through the bash executor integration path.

Fixes #7847
This commit is contained in:
roboomp
2026-08-06 18:45:58 +00:00
parent 3a8591a8af
commit 2fe1d1991a
3 changed files with 7 additions and 2 deletions
@@ -231,12 +231,12 @@ describe("executeBash", () => {
});
it("applies non-interactive environment defaults", async () => {
const result = await executeBash('echo "$GIT_TERMINAL_PROMPT:$PI_TEST_ENV"', {
const result = await executeBash('echo "$AGENT:$GIT_TERMINAL_PROMPT:$PI_TEST_ENV"', {
cwd: tempDir,
timeout: 5000,
env: { PI_TEST_ENV: "hello" },
});
expect(result.output.trim()).toBe("0:hello");
expect(result.output.trim()).toBe("1:0:hello");
});
it("runs non-bash shellPath commands through the configured shell", async () => {