Repository navigation
Start orchestration workers as native chats for every agent that has native chat - #26776
brennanb2025 merged 3 commits into
Conversation
…ation-native-chat-workers-all-agents
Review and QA summary (head 7d5650d)The problem. With native chat on, What changes for you. With native chat on, a worker for any agent that has native chat (Claude, Codex, OpenCode, Grok, OMP, Pi) opens as a chat tab beside the coordinator. Agents without native chat still start in a terminal. With native chat off, every worker is a terminal, as before. After an Orca restart, a worker keeps its real agent name (it no longer turns into "claude") in Review. One adversarial review round looked at three areas: the per-agent worker path, restart and remote placement, and the overall design. A separate reviewer then ran the readiness checklist on the final diff. Neither found any P0, P1 or P2 issues.
Fixed during review
Deferred (P3, already present before this PR)
Verified
After an Orca restart, the worker's chat tab is restored: The restored worker is woken by mail and finishes: Pi below its native-chat minimum falls back to a terminal worker: Not verified
|




ELI5
When you start an orchestration worker with OpenCode, Grok, OMP or Pi while native chat is on, it now opens as a native chat, the same as Claude and Codex workers do. Before, these four always fell back to a terminal, even though each of them already opens as a native chat everywhere else in Orca.
What Changed
The problem. With native chat on,
orca orchestration worker-start --agent opencode(orgrok,omp,pi) started a terminal worker instead of a chat. The start report blamed the agent: "this agent has no structured session". That is false: all four are registered for native chat and open as chats from the New tab menu. For OpenCode the terminal fallback was worse than a different look. The terminal sat at "Starting background server…" until Orca gave up waiting for the agent to be ready, so the worker never got its task.Why it happened. Orchestration turned native chat off for these agents on purpose, in two places. The worker launch decision passed an empty list of extra native-chat agents (
registeredStructuredAgents: []). The code that creates a native-chat worker refused anything other than Claude and Codex. The comment beside the empty list said workers would take the other agents "once structured workers take registered agents". The worker path itself never depended on Claude or Codex: creating the session, delivering the task as a chat message, waking the worker when mail arrives, reading its transcript and releasing it all go through code shared with every native chat.User-facing change. With native chat on, an orchestration worker for any agent that has native chat (Claude, Codex, OpenCode, Grok, OMP, Pi) opens as a native chat tab. Agents without native chat (Gemini, for example) still start in a terminal, with the same receipt as before. With native chat off, every worker is a terminal, as before.
Mechanism.
'claude' | 'codex'to any agent.claude. That label is written permanently into the released worker's saved transcript, so a restarted OpenCode worker would have been archived as Claude. It now keeps the real agent.Permissions. A native-chat worker asks for permission exactly as that agent's chat does, which is set by the Agent Permissions setting for that agent (the same setting that adds the bypass flag to its terminal launch). In QA, OMP was not on full access, so its worker showed a permission card for
pwdand waited until someone approved it. A terminal OMP worker with the same setting asks too.Why
The worker code already handled any agent, so the fix removes the gates rather than adding a separate path for these agents. Keeping the terminal fallback and only fixing OpenCode's readiness wait (open PRs #24115 and #20451 work on that) would leave these agents as terminal workers while their chats work everywhere else. A worker would then look and behave differently from the chat you get when you open the same agent yourself.
Linked Issue
None. Found while checking whether orchestration supports every native-chat agent.
Visual Proof
All "after" screenshots below come from a hidden dev Orca running this branch. Each worker was started with
orca orchestration worker-start --agent <agent>and ran on its real CLI and my own login. Every worker opened as a native chat tab next to the coordinator's terminal tab.There is no "before" screenshot. On main the same command starts a terminal worker, and its start receipt reads "Started a terminal agent worker … because this agent has no structured session".
OpenCode worker: ran

pwd, then sentworker_doneitself throughorca-dev orchestration send.Grok worker: ran

pwdandorchestration check, then sentworker_done.OMP worker, not on full access: it waits on a permission card for

pwd, as an OMP chat does.OMP worker after "Allow once" on its two requests: it finished and sent

worker_done.Testing
Manual, macOS: a hidden dev build of this branch with an isolated profile, and the real OpenCode 2.0.14, Grok 1.0.50 and OMP 17.0.5 CLIs. For each agent:
worker-startreturnedmode: structured, and the requested and actual agent matched.worker_done, and the dispatch settled ascompleted/succeeded. Times: OpenCode 19 s, Grok 37 s, OMP after its permission requests were approved.worker-releasesucceeded.worker-readafterwards returned the saved transcript with the right agent (opencode,grok,omp).Not run live:
--onstill go through federation as terminal workers, and remote or WSL workspaces still fall back through the host's native-chat support check, both unchanged.Automated:
orchestration-worker-start-registered-agent.test.tsnow checks that every registered native-chat agent starts as a native-chat worker. It also checks that the host can still turn one into a terminal, that an agent without native chat stays a terminal, and that native chat off means a terminal.structured-worker-authority.test.tschecks that a restored OpenCode, Grok, OMP or Pi worker keeps its own agent.pnpm tc:nodepasses, andorca-ci-checkspasses (22 of 22).Review
Not yet reviewed.
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)