You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Automation run completes when a nested codex exec exits #17650
A scheduled Codex automation that launches a nested codex exec is marked completed when the nested process finishes. Orca captures the child process's output as the automation output, and the parent workflow never resumes.
After this call, the parent process is expected to perform additional work and produce its own final response.
Actual behavior
The parent workflow launched the nested codex exec.
The nested command successfully produced its output file.
When the nested command finished, Orca marked the entire automation run as completed with error: null.
outputSnapshot.content contained the nested command's generated output instead of the parent agent's final response.
The parent workflow never regained control, so none of the subsequent work ran.
Run metadata had terminalSessionId, terminalPaneKey, and terminalPtyId all set to null.
The parent process's log ended immediately after the nested process returned, without an error or completion message.
Expected behavior
A child codex exec launched by an automation agent should not be treated as the automation's provider session. Orca should keep the automation active until the root agent process or turn finishes, and outputSnapshot should contain the root agent's final response.
Impact
The run appears successful in Orca even though the workflow was only partially executed. For side-effecting automations, subsequent work can be silently skipped without any failure being surfaced.
Thanks for the report! Please retest on 1.4.239+ (#31780, v1.4.239, stopped a nested agent taking over its parent's status). If a nested codex exec still ends the run, share: Orca version, macOS version, Codex CLI version, and a description (not the prompt) of how the nested exec is launched. Please redact anything private before sharing; screenshots or log excerpts are fine.
Retested on 1.4.240: it still happens with Antigravity subagents. #31780 fixed the nested claude -p case, but Antigravity's subagents run inside the parent agy process, so a subagent finishing still ends the whole automation run.
Automation: provider antigravity, existing workspace, fresh session per run, started with orca automations run
How the nested agent is launched
The automation prompt asks the main agent to translate a file into three languages in parallel with Antigravity's built-in invoke_subagent tool (Model: "flash", Workspace: "inherit"), wait for all of them, then validate, clean up and write a final report. No nested CLI process: the subagents run inside the parent agy session. Orca launches the parent as agy --dangerously-skip-permissions --prompt-interactive <prompt>.
What happens (3 of the 4 runs that reached the subagent step)
The main agent spawns the subagents and waits for them.
When a subagent reports back (the first one, or the last one), Orca closes the run's terminal tab within about a second.
That sends SIGTERM to agy, so the parent never resumes: no validation, no cleanup, no final report. In one run the third subagent was still working and its file was never written.
The run is recorded as completed with error: null. outputSnapshot.content is the subagent's message, not the parent's final report, and terminalSessionId, terminalPaneKey and terminalPtyId are all null.
~/.gemini/antigravity-cli/log/cli-<run>.log, same run:
I… 00:41:59.561584 server.go:3177] Got signal terminated, shutting down
I… 00:41:59.564401 common.go:528] CLI program exited, shutting down
I… 00:41:59.600691 conversation_manager.go:1218] Stream completed for <conversation>, clearing ResponsePending
(two different runs; each shows the same pattern: close_tab, then SIGTERM, then the run marked completed)
Run record (fields only):
status: completed, error: null, sessionKind: terminal,
terminalSessionId: null, terminalPaneKey: null, terminalPtyId: null,
outputSnapshot.content: <the subagent's report, not the parent's>
Nobody closed the tab by hand: it happened at the same point in three separate runs. One earlier run (two subagents) finished normally and kept its tab, so it isn't every time, but it is most of the time.
Expected
A subagent finishing inside an Antigravity session shouldn't count as the run's end. The run should stay open until the parent agent's own turn ends, and outputSnapshot should hold the parent's final response.
Impact
For side-effecting automations the work stops halfway while the run shows success. Our workaround is to avoid Antigravity subagents in automation prompts.
Activity
nwparker commentedon Oct 24, 2026
Thanks for the report! Please retest on 1.4.239+ (#31780, v1.4.239, stopped a nested agent taking over its parent's status). If a nested
codex execstill ends the run, share: Orca version, macOS version, Codex CLI version, and a description (not the prompt) of how the nested exec is launched. Please redact anything private before sharing; screenshots or log excerpts are fine.kevsjh commentedon Oct 25, 2026
Retested on 1.4.240: it still happens with Antigravity subagents. #31780 fixed the nested
claude -pcase, but Antigravity's subagents run inside the parentagyprocess, so a subagent finishing still ends the whole automation run.Environment
agy) 1.4.7; Orca's Antigravity runtime 1.3.0antigravity, existing workspace, fresh session per run, started withorca automations runHow the nested agent is launched
The automation prompt asks the main agent to translate a file into three languages in parallel with Antigravity's built-in
invoke_subagenttool (Model: "flash",Workspace: "inherit"), wait for all of them, then validate, clean up and write a final report. No nested CLI process: the subagents run inside the parentagysession. Orca launches the parent asagy --dangerously-skip-permissions --prompt-interactive <prompt>.What happens (3 of the 4 runs that reached the subagent step)
agy, so the parent never resumes: no validation, no cleanup, no final report. In one run the third subagent was still working and its file was never written.completedwitherror: null.outputSnapshot.contentis the subagent's message, not the parent's final report, andterminalSessionId,terminalPaneKeyandterminalPtyIdare allnull.Log excerpts (redacted)
Orca
main.trace.ndjson, the second the run ends:~/.gemini/antigravity-cli/log/cli-<run>.log, same run:(two different runs; each shows the same pattern:
close_tab, then SIGTERM, then the run markedcompleted)Run record (fields only):
Nobody closed the tab by hand: it happened at the same point in three separate runs. One earlier run (two subagents) finished normally and kept its tab, so it isn't every time, but it is most of the time.
Expected
A subagent finishing inside an Antigravity session shouldn't count as the run's end. The run should stay open until the parent agent's own turn ends, and
outputSnapshotshould hold the parent's final response.Impact
For side-effecting automations the work stops halfway while the run shows success. Our workaround is to avoid Antigravity subagents in automation prompts.
fix(agent-status): an Antigravity subagent finishing no longer ends i…