Repository navigation
Show a card in the chat when its agent hands work to another agent - #36848
Conversation
An agent that hands work off with 'orca agent launch' from a native chat now leaves a 'Handed off to agent' card there, linking to the new chat or terminal, the way a supervised worker-start leaves 'Started worker'. The CLI names its chat on agent launches (same-host only); the host records a display-only agent-handoff item after a successful launch with a submitted prompt, once per launch operation. Nothing about the card can refuse or delay the launch. Tracked in STA-13209.
|
No actionable comments were generated in the recent review.
|
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:
2669ba13-b946-470e-9cce-ee69663c3541
Files ignored due to path filters: 1-
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
Files selected for processing: 30-
src/cli/runtime/client.tssrc/cli/runtime/orchestration-compatibility-envelope.tssrc/main/native-chat/agent-session-journal/journal-row-schema.test.tssrc/main/native-chat/agent-session-journal/journal-storage-schema.tssrc/main/native-chat/agent-session-wire/structured-agent-start-journal.tssrc/main/runtime/orchestration/worker-start-card.tssrc/main/runtime/rpc/methods/agent-launch-handoff-card.test.tssrc/main/runtime/rpc/methods/agent-launch-handoff-card.tssrc/main/runtime/rpc/methods/agent-launch.tssrc/main/runtime/rpc/methods/orchestration/worker-start-card-operations.test.tssrc/main/runtime/rpc/methods/orchestration/worker-start-card.test.tssrc/renderer/src/components/native-chat/NativeChatAgentMessageCard.test.tsxsrc/renderer/src/components/native-chat/NativeChatAgentMessageCard.tsxsrc/renderer/src/i18n/locales/de.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/tr.jsonsrc/renderer/src/i18n/locales/zh-Hant.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/agent-journal-creation-facts.tssrc/shared/agent-session-journal-schemas.tssrc/shared/agent-session-journal-types.tssrc/shared/agent-session/agent-message-presentation.tssrc/shared/native-chat-types.tssrc/shared/structured-agent-start-projection.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
The launch-caller evidence read the host stamp off an absent evidence object, so every orca command from an ordinary native chat threw before sending. Adds CLI tests for which requests name the launching chat, restores the lockfile to the base, and fixes the Korean heading.
A caller passing only the started flag drew a handoff as Started worker; the heading now takes the message's flags as one argument.
A launch without a delivered task now records the card too, with no task text, as the common pattern records every agent a chat creates. The handoff tests now run the real chat host and journal: one card per launch operation, none on replay, a removed card stays removed across a restart, and the clock is fixed.
Handed off to agent now appears only when the card carries a task; a card for an agent started with no task (no prompt, a draft, or a prompt that wasn't delivered) reads Started agent. The heading is derived from the card's text, so nothing new is saved. Also drops a self-launch check the launch path already refuses first.
Resolve conflicts with the session-module reorganization and with the worker-start card's launched-agent fallback (#36653): the handoff card uses the same fallback, keeping the launched agent's kind when the sender lookup can't find it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The phone card passed only the started flag, so with the new heading rules it would draw every creation card as a plain message. It now passes the message and has a heading for every case, so a missing one fails the build. The heading function now requires the message's creation facts, so no caller can leave them out. Adds the phone strings in every language, and the Japanese "Started agent" now uses the catalog's term for agent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review loop statusThe problem. When an agent in a native chat handed work to a new agent ( What changes for users. The original chat now shows a card linking to the agent it started, on desktop and on the phone. It is headed "Handed off to agent" with the task when a task was handed over, and "Started agent" with no body when there was no task. The card survives restart and appears once per launch. Supervised workers keep "Started worker". Fixed during review.
Deferred (not blocking). The card can be lost if Orca quits in the instant between the launch finishing and the card being written. Worker-start cards have the same gap. Verified.
Not verified. Android phone (iOS simulator only). The phone screenshot's open arrow was answered by a mock host, not a real one. For Brennan's review
Noticed, not this PR (on main):
|
…tablyai#36848) * Show a card in the chat when its agent hands work to another agent An agent that hands work off with 'orca agent launch' from a native chat now leaves a 'Handed off to agent' card there, linking to the new chat or terminal, the way a supervised worker-start leaves 'Started worker'. The CLI names its chat on agent launches (same-host only); the host records a display-only agent-handoff item after a successful launch with a submitted prompt, once per launch operation. Nothing about the card can refuse or delay the launch. Tracked in STA-13209. * Keep orca commands working in a native chat that has no terminal handle The launch-caller evidence read the host stamp off an absent evidence object, so every orca command from an ordinary native chat threw before sending. Adds CLI tests for which requests name the launching chat, restores the lockfile to the base, and fixes the Korean heading. * Read a card's heading from its creation flags together A caller passing only the started flag drew a handoff as Started worker; the heading now takes the message's flags as one argument. * Show the handoff card for every agent a chat launches A launch without a delivered task now records the card too, with no task text, as the common pattern records every agent a chat creates. The handoff tests now run the real chat host and journal: one card per launch operation, none on replay, a removed card stays removed across a restart, and the clock is fixed. * Head a launch card Started agent when no task reached the new agent Handed off to agent now appears only when the card carries a task; a card for an agent started with no task (no prompt, a draft, or a prompt that wasn't delivered) reads Started agent. The heading is derived from the card's text, so nothing new is saved. Also drops a self-launch check the launch path already refuses first. * Show the handoff headings on the phone's agent cards The phone card passed only the started flag, so with the new heading rules it would draw every creation card as a plain message. It now passes the message and has a heading for every case, so a missing one fails the build. The heading function now requires the message's creation facts, so no caller can leave them out. Adds the phone strings in every language, and the Japanese "Started agent" now uses the catalog's term for agent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit ad864a6)
Problem
When an agent in a native chat hands work to a new agent (
orca agent launch ... --prompt <brief>, ororca worktree create --agent ... --prompt <brief>, which the orchestration skill uses for "just hand over the work"), the new chat starts and gets its task, but the original chat only shows the agent's own prose. There is no card and no way to click through to the agent that took over, so it is hard to find it or check that the handoff happened. A supervisedorca orchestration worker-startalready leaves a "Started worker" card; an independent handoff left nothing because the launch command never told Orca which chat it came from.What changes for users
After an agent in a chat starts another agent, the original chat shows a card linking to it, on desktop and on the phone: the receiving agent's icon, name and live status, and the arrow that opens its chat (or terminal).
--prompt, a draft prompt, or a prompt that could not be typed into its terminal), the card is headed "Started agent" with no body.The card survives restart and is drawn once per launch, even if the launch is retried or replayed. Supervised workers keep their "Started worker" card.
How
agent.launch/agent.launchReplay, only when it runs on the same host (never from a WSL environment or against a paired server). Older hosts ignore it.agent-handoffjournal item into that chat, keyed by the launch operation ID, through the same path as the worker-start card (skips a cleared or rewound chat, never re-adds a removed card). Nothing here can refuse, hold or delay the launch.Differences from the common pattern
orca worktree create --agent ... --promptalso leaves the card: intended, it is the skill's main handoff command and the ticket asks for a card on handoffs.Compatibility
Older desktops and phones skip the unknown item over the wire (open schema). On disk, Orca's strict chat storage reader (#36024) opens a chat containing an item kind it doesn't know read-only. No desktop release contains #36024 yet (checked 2026-11-01: latest is v1.4.245), so nobody can hit this today. It would matter only if a desktop release ships #36024 without this PR and a user downgrades from a build with this PR to that release: chats holding this card would open read-only until they upgrade again, with no data lost. Merging this before the next desktop cut that includes #36024 means no such release exists.
Tests
agent-launch-handoff-card.test.ts: realagent.launchReplayfrom an agent's CLI through the real chat host and journal: one card per launch (a replay adds none), two launches give two cards, a removed card stays removed across a host restart (strict storage reader), structured and terminal addresses, cards without a task, and windows, a CLI outside a chat and failed launches record nothing.client-execution-host.test.ts: the CLI sends the chat's session ID on launches (including from a chat with no terminal handle), and sends nothing from WSL or to a paired server.journal-row-schema.test.ts: the item round-trips through the strict storage reader and projects to the card.NativeChatAgentMessageCard.test.tsxand the phone agent card test: "Handed off to agent" with a task, "Started agent" without, "Started worker" for supervised workers.Tracked in STA-13209.