Repository navigation
[Bug] Agent is marked as "Done" when the CLI is not installed #7047
Description
Activity
Gabriel
via Discordthis is not important at all , just a small detail
- added a commit that references this issue
on Jul 5, 2026 Reproduced (unit test, headless-server agent-status derivation).
Root cause:
OrcaRuntimeService.buildPtyMobileAgentStatus(src/main/runtime/orca-runtime.ts:22530) — the derivation that produces theagentStatusevery paired web/mobile client renders — sets state vialastAgentStatus === 'working' ? 'working' : === 'permission' ? 'blocked' : 'done'. Anything that isn't actively working/permission collapses todone, including an agent whose CLI was never installed. The PTY record already carrieslastExitCode(127 =command not found,orca-runtime.ts:1027) but the derivation never reads it, and nothing ever produces afailedstate (failedexists only as a UI label inworktree-card-agent-summary.ts:44). The renderer-synced branch (orca-runtime.ts:22368-22383) resets launched agents tostate: 'done'the same way.Evidence: a unit test calls the real derivation with a launched-but-missing Codex PTY record (
launchAgent: 'codex',lastExitCode: 127,lastAgentStatus: 'idle') → client is toldstate: 'done'. A second case shows exit127and exit0both derivedone, proving it's exit-code-blind.Re-run:
pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/repro-7047-cli-missing-marked-done.test.tsFix direction: consult the PTY exit signal — a non-zero exit (esp. 127) with no real working/hook state should derive a
failedstate or suppress the row, rather than defaulting todone; mirror it in the renderer derivation so desktop and server agree.Key files:
src/main/runtime/orca-runtime.ts,src/renderer/src/components/sidebar/worktree-card-agent-summary.ts, repro atsrc/main/runtime/repro-7047-cli-missing-marked-done.test.ts.
Automated bug-reproduction pass. Repro artifact committed on branch
nwparker/bug-repro-pass2; check it out to run the command above. Writeup:docs/bug-reproductions/7047.md.- addedhas_reproConclusive reproduction exists (test/script/CLI evidence). See docs/bug-reproductions/Conclusive reproduction exists (test/script/CLI evidence). See docs/bug-reproductions/
on Jul 18, 2026
via DiscordHey guys! 👋
While setting up a fresh machine as an Orca server, I found what looks like a small bug.
I started a Claude Code / Codex agent on a server where neither CLI was installed yet.
Instead of detecting that the CLI executable is missing, Orca still creates an agent entry in the sidebar and marks it as "Done", even though the process never actually started.
Steps to reproduce
Set up a fresh Orca server.
Do not install codex (or claude).
Start a Codex or Claude agent.
Open the terminal.
Expected behavior
Orca should detect that the required CLI is not installed and:
show a clear error (e.g. "codex command not found"),
mark the agent as Failed (or avoid creating it altogether),
not display it as a completed agent.
Actual behavior
The terminal correctly shows:
zsh: command not found: codex
However, Orca still creates an agent in the sidebar and shows it as Done, which is misleading because the agent never actually ran.

