Repository navigation
fix(orchestration): start Antigravity workers in a terminal when its chat runtime isn't installed - #33520
Conversation
…chat runtime isn't installed Headless launches (orchestration workers, agent.launch from CLI/mobile/automations) have no chat tab to offer Orca's managed-runtime install, so a Chat UI default routed them to a chat that failed pre-spawn with runtimeNotInstalled. Host launch-mode settlement now asks create support to require an installed chat program and downgrades to the agent's own CLI with reason chat_runtime_not_installed; explicit --surface chat is refused with that reason. Desktop chat tabs keep the in-chat install flow. Fixes #30973 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Walkthrough
Priority: Severity of issue fixed: Medium Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
79578085-d906-4bfd-9d30-490654791625
Files selected for processing: 9-
src/main/agent-launch/agent-launch-mode.tssrc/main/runtime/rpc/methods/agent-launch-floating-workspace.test.tssrc/main/runtime/rpc/methods/orchestration-worker-start-registered-agent.test.tssrc/main/runtime/rpc/methods/orchestration-worker-support-unknown.test.tssrc/main/runtime/rpc/methods/orchestration/worker/worker-start-launch-executor-parity.test.tssrc/main/runtime/session-tabs/structured-session-create-support.tssrc/main/runtime/structured-agent-availability.tssrc/main/runtime/structured-agent-session-support-probe.test.tssrc/shared/agent-launch-intent.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
| remote: 'remote_execution_host', | ||
| wsl: 'wsl_execution_runtime' | ||
| wsl: 'wsl_execution_runtime', | ||
| 'chat-program': 'chat_runtime_not_installed' |
There was a problem hiding this comment.
🔎 Supported by static analysis
-
Script executed:
#!/bin/bash # Inspect create-target handling and the phase passed to host mode resolution. rg -n -C 6 '\bresolveAgentLaunchModeOnHost\s*\(|phase: .created-workspace.|create-folder-workspace|create-worktree' src/main/agent-launch src/main/runtime/rpc/methods
Repository: stablyai/orca
Length of output: 41536
Script executed:
set -o pipefail printf '%s\n' '--- changed diff ---' git diff 4b05f1377e8c5b6e79ae801382b5e6a9895fa1cf 71d4de7dac06df7c379c3f22375b3badfdd3703f -- src/main/agent-launch/agent-launch-mode.ts src/main/agent-launch/agent-launch-executor.ts src/shared/agent-launch-intent.ts printf '%s\n' '--- explicit surface references ---' rg -n -C 5 -F -- 'surface: ' src/main/agent-launch src/main/runtime/rpc/methods src/shared | head -240 printf '%s\n' '--- resolver and executor blocks ---' sed -n '1,340p' src/main/agent-launch/agent-launch-mode.ts sed -n '1,250p' src/main/agent-launch/agent-launch-executor.ts
Repository: stablyai/orca
Length of output: 41834
Script executed:
set -o pipefail git diff 4b05f1377e8c5b6e79ae801382b5e6a9895fa1cf 71d4de7dac06df7c379c3f22375b3badfdd3703f -- src/main/agent-launch/agent-launch-mode.ts src/main/agent-launch/agent-launch-executor.ts src/shared/agent-launch-intent.ts printf '%s\n' '--- explicit surface references ---' rg -n -C 5 -F -- 'surface: ' src/main/agent-launch src/main/runtime/rpc/methods src/shared || test "$?" -eq 1 printf '%s\n' '--- mode resolver ---' sed -n '1,340p' src/main/agent-launch/agent-launch-mode.ts printf '%s\n' '--- executor ---' sed -n '1,280p' src/main/agent-launch/agent-launch-executor.ts
Repository: stablyai/orca
Length of output: 41753
Refuse explicit chat launches that create a workspace.
surface: 'chat' supports both create-worktree and create-folder-workspace targets. The executor creates the workspace before it settles host support with phase: 'created-workspace'. When the chat runtime is missing, this phase downgrades the launch to a terminal because refusal applies only to before-effects.
Check the chat runtime before workspace creation, or refuse the explicit chat launch after creation and recover the workspace.
ELI5
With Chat UI on,
orca orchestration worker-start --agent antigravitystarted picking a chat worker in 1.4.230. An Antigravity chat needs a separate runtime that Orca downloads, and you can only start that download from a chat tab. A worker has no chat tab, so the start just failed, even though theagyCLI was installed and had worked the day before. Now, when that runtime is missing, the worker starts in a terminal using the agent's own CLI, as it did in 1.4.229. The receipt says why.Root cause
decideAgentLaunchMode→resolveAgentLaunchModeOnHostasksgetStructuredAgentSessionCreateSupport. That check covers location and CLI version, but not whether the managed chat program exists. Sostructured/user_defaultwas chosen.src/main/acp/acp-structured-launch-preparation.tsthrowsAgentSessionPreSpawnError(..., { reason: 'runtimeNotInstalled' })when the resolved command is still the bareagy_acp_server.par. Antigravity's spec declaresmanagedRuntime: ANTIGRAVITY_ACP_RUNTIME(src/main/acp/acp-launch-specs.ts, pinned 1.3.0 insrc/main/antigravity/antigravity-acp-runtime.ts). Startup never installs it, by design (feat(acp): chat agents can declare a managed runtime that a start runs but never installs #28460).terminal_create.What changed
getStructuredAgentSessionCreateSupport(worktree, agent, { requireInstalledChatProgram }): when asked, it reuses the existing host-health chat-program probe (observeChatPrograminstructured-agent-availability.ts, the same code that publisheschatProgram: 'installable'to clients). If the agent's Orca-managed chat program isn't installed, it answers{ supported: false, reason: 'chat-program' }. Only agents that declare an installable chat program (today, Antigravity) are probed.agent.launchfrom CLI, mobile, automations, and external conversations) passes the option. It maps the answer to a new receipt reason,chat_runtime_not_installed:--surface chat→agent_launch_surface_unavailable: "Antigravity can't open as a chat here because its chat runtime isn't installed on this host (install it from a new chat tab in Orca). Start it in a terminal instead."agentSession.createSupportRPC (desktop chat tabs) does not pass the option, so desktop still offers the in-chat install card.How verified
Real headless repro in an isolated dev Orca:
orca-dev servewith an isolated HOME and profile, Chat UI seeded on, no managed runtime,ORCA_BACKGROUND_LAUNCH=1.worker-start --agent antigravity --worktree current→state: failed,failedStage: terminal_create,lastError: "Antigravity isn't installed on the computer running this chat...",mode: structured / user_default. This matches the issue exactly.mode: terminal,preferred: structured,reason: chat_runtime_not_installed, and a terminal agent was created. agy started and showed its own first-run folder-trust prompt, which the readiness wait reported asagent-trust-workspace. That prompt is agy's own and unrelated to this fix.orca agent launch --agent antigravity --surface chat→ refused with the clear message above.orchestration-worker-start-registered-agent.test.ts. It fails without the fix.pnpm tc, 344 test files under agent-launch/rpc methods/automations/session-tabs passing,check:code-quality:changedclean.Risk
unknown), behaviour is unchanged: it goes structured.Fixes #30973