Repository navigation
feat(orchestration): tell each agent its own orchestration address - #22636
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
orca status --jsonreportscaller— new read-onlyorchestration.callerShowRPC answers from the dispatch entry's resolved session (session:<id>,live: true) or probes the envelope's terminal handle, elsenull; CLI maps session refusals to{live:false, refusal}and omits the field on an older host.- Worker preamble names the worker's own address — terminal handle, or
session:<id>plus a reach sentence for a structured worker, whose commands now invoke"$ORCA_CLI_COMMAND"/& $env:ORCA_CLI_COMMANDinstead oforca-dev/orca. - Guide, help text, and bundled skill guide — "Your address" section, a non-waiting chat-coordinator loop, and the
ORCA_CLI_COMMANDforms;run-use/run-current/checksummaries de-terminalized. - Copy Orchestration Address menu action — copies
session:<id>from a structured chat in both mounts, with success/failure toasts and translations in six locales.
I verified the host handler's context members (orchestrationCaller.actor/sessionId, orchestrationCompatibilityEvidence) are populated for every orchestration.* session claim, that the refusal codes the CLI keys on match the ones the resolver emits, that no production parser depends on the relabelled coordinator line, and that the bundled guide is regenerated in sync. The changed suites (preamble, deliver-worker-dispatch-preamble, status-caller, orchestration-caller-show) pass locally (48 tests). Wire changes are additive and the mode-parity normalizer is not vacuous.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
ca9b471 to
6abb9d9
Compare
47e84ab to
e1c897b
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The branch was rebased since the prior pullfrog review (47e84abbdaf6, 6 commits). The only commit new this run is e1c897b980, a guide-contract fix plus regenerated artifacts:
- Moved
ORCA_CLI_COMMANDresolution into the shared skill stub — the invocation guidance left the always-loaded orchestration kernel forskill-stubs/_shared/cli-resolution.md, which now covers chat sessions beside WSL and gives the POSIX and PowerShell forms; everyskills/*/SKILL.mdprojection, both skill bundle manifests, andsrc/cli/bundled-skill-guides.tswere regenerated. - Relocated the chat-coordinator loop and address details to references —
references/coordinator-loop.mdnow owns the non-waiting loop and/clearnote,references/messaging-and-gates.mdthe address details, while the kernel keeps one pointer line each for the caller's address, the environment-resolvedcheckcaller, and the chat coordinator (kernel measured at 201 lines, budget 202). - Repinned the kernel contract tests — asserts the environment-resolved
checkcaller andNever name another agent with --from/--terminal, requires the preamble's owncheckcommand, and rejects the oldcheck --terminal <your_handle>shape from #21097.
I read the full raw diff end to end. Production source is untouched by e1c897b980; the change is documentation, test contracts, and regenerated artifacts. config/scripts/orchestration-skill-guidance.test.mjs passes (29/29), and pnpm verify:bundled-skill-guides, verify:skill-bundle-manifest, and verify:rpc-params-catalog all exit 0 at this head, so the regenerated block is in sync. No threads from the prior review needed retiring.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
6abb9d9 to
a32a526
Compare
e1c897b to
5c6cc5f
Compare
a32a526 to
e1e205d
Compare
5c6cc5f to
8117ac5
Compare
e1e205d to
55692e7
Compare
8117ac5 to
e4c584c
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (e4c584cf01), six commits landed, all addressing the architecture review of the orchestration-address feature:
- Refuse a blocking
check --waitfrom a chat — the host now rejectswait: truefrom anativelease withwait_requires_terminal(effectsApplied: false) before any waiter registers, naming the turn-loop recovery in the message; atui-held session may still block. The code was added to the structured-runtime passthrough set. - Resolve
orca status's caller with the verbs' ladder, host-side —callerShownow probes the carried handle, then remints through the pane key, and only then reports the stale handle aslive: false; the CLI always asks, so a pane-key-only process resolves too. - Show a structured worker as
session:<id>on every read —withAgentVisibleAddressesre-spellsfrom_handle/to_handlein check rows and formatted banners, and the coordinator address in preambles goes through the same codec. Only reads are re-spelled: stored keys and send receipts keep the handle the settlement path matches. - Teach a chat worker the turn loop and pin parity at the contract — the structured-worker preamble asks with a 5s budget, never a blocking wait, uses the turn loop for sub-dispatch and post-
worker_done, and emitscheck --terminal session:<id>; the mode-parity test now pins sections, verbs, flags, and lifecycle ids rather than bytes. - Tests updated —
dbthreaded to preamble delivery, a terminal-view waiter in the consumer-fencing test, and the Run id read through the fixture's checked accessor.
I read the range-diff and the full-diff production sections end to end. The host and CLI terminal ladders stay equivalent for the stale-handle / pane-remint cases (resolveTerminalPane only throws terminal_not_found, mapped to "no remint"), runtimeKind matches the delivery-view discriminator, the session refusal codes are in the passthrough set, and reads-only re-spelling leaves lifecycle-reconciliation matching intact. The parity test guards against vacuity (asserts 8 commands, no minted handle, the sub-dispatch section).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (4927a2d3d1), one commit landed (ee5a52fc07), the last of the architecture-review follow-ups for this feature:
- Added
orchestration.sessionAddress— a read-only RPC returning thesession:<id>a chat's conversation is reached at, derived host-side throughsessionOrchestrationIdentity; it refuses an id that is not an Orca session id and is registered inRPC_PARAMS_BY_METHOD(method count 42 → 43). - Made Copy Orchestration Address resolve at copy time — the menu item now takes a
() => Promise<string | null>resolver that asks the host instead of a renderer-formattedsession:<live id>, falling back to the live id only on amethod_not_foundhost and surfacing any other failure as an error toast. - Corrected the guide's
/clearwording —coordinator-loop.mdandmessaging-and-gates.mdnow say a chat's address survives/clear(it names the conversation) whilecaller.sessionIdbecomes the new session;bundled-skill-guides.tsregenerated.
I read the incremental range-diff and the full-diff production sections end to end. sessionAddress and callerShow share a single derivation, so the copied address equals the address the session acts as; the only swallowed failure in the renderer resolver is method_not_found, and the menu item's visibility gating is unchanged. The four delta suites pass at this head (52 tests), verify:bundled-skill-guides and verify:rpc-params-catalog exit 0, and pnpm tc:node / tc:web are clean. Prior reviews carry no inline threads, so nothing needed retiring.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Important
The new commit is sound, but the branch now conflicts with its advanced base and cannot merge.
Reviewed changes
Since the prior pullfrog review (ee5a52fc07), one commit landed (5602038dcb), the read-side half of the stack's /clear lineage work:
- Re-spelled a structured worker by its conversation actor —
agentVisibleOrchestrationAddressnow returnssessionOrchestrationIdentity(worker.sessionId, db).actorinstead of formattingsession:<live id>directly, so the address an agent reads for a worker comes from the same derivation the caller resolver binds. On the merge-base this is behavior-identical; the lineage-aware divergence only appears once the base carries #22631.
⚠️ The branch conflicts with its base in the file this commit changes
brennanb2025/d4-coordinator-delivery has advanced from 55692e7e6b to e79d321f (#22631), which rewrote structured-session-mail-address.ts around the /clear lineage. This branch still carries the pre-lineage version of that file, so merging produces a content conflict there — GitHub reports the PR as CONFLICTING. The branch needs a rebase onto (or merge of) the current base, and the resolution must keep this commit's delegation (agentVisibleOrchestrationAddress deriving the actor through sessionOrchestrationIdentity(...).actor) on top of #22631's lineage-aware sessionOrchestrationIdentity.
Technical details
# Rebase `d5-self-address` onto the lineage-aware `d4-coordinator-delivery`
## Affected sites
- `src/main/runtime/orchestration/structured-session-mail-address.ts` — content conflict in the import block: the base adds `getStructuredAgentSessionHost` and `readAgentSessionRecordStore`, this branch adds `resolveStructuredWorkerIdentity` and `MessageRow`.
- `src/main/runtime/rpc/orchestration-session-caller.ts` — auto-merges, but re-check the `sessionOrchestrationIdentity` call shape after the rebase (the base gives it a third `store` parameter).
## Required outcome
- The rebased branch builds and typechecks against the current base.
- `agentVisibleOrchestrationAddress` still returns `sessionOrchestrationIdentity(worker.sessionId, db).actor`, which on the lineage-aware base resolves to the conversation's root session.
## Verification
- `git merge-tree --write-tree HEAD origin/brennanb2025/d4-coordinator-delivery` reports a single content conflict in `structured-session-mail-address.ts`; `orchestration-session-caller.ts` auto-merges.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
e79d321 to
92ecd41
Compare
5602038 to
4a8f01f
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (5602038dcb), the branch was rebased onto the current lineage-aware base and two test-only commits landed. The prior review's merge blocker is resolved.
- Rebased onto the lineage-aware
d4-coordinator-delivery(92ecd41040) —git merge-tree HEAD origin/brennanb2025/d4-coordinator-deliveryis clean.structured-session-mail-address.tsnow carries the base's/clearlineage code, and this branch'sagentVisibleOrchestrationAddresskeeps its delegation throughsessionOrchestrationIdentity(worker.sessionId, db).actor, so a structured worker reads as its conversation's root. - Pinned the cleared-chat copy assertion to the exact address — the
orchestration-caller-showcase now assertsshown.address === ACTOR_Xfor both the predecessor and its cleared successor rather thantoMatch(/^session:/), so it fails if the lineage walk regresses to the live id. - Completed the mode-opacity fixture's record store — the partial store gained
listRecords: () => [](each session its own root), the listingstructuredSessionLineagereads during a sub-worker start.
I read the incremental range (5602038dcb..4a8f01f7d6), the touched production files end to end, and the other sessionOrchestrationIdentity call sites (each passes a store or relies on the default readAgentSessionRecordStore()). orchestration-caller-show.test.ts (10) and orchestration-worker-mode-opacity.test.ts (4) run green at this head. No prior inline threads needed retiring.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
45db843 to
3952a52
Compare
92ecd41 to
34d9401
Compare
3952a52 to
2c4fcb4
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (4a8f01f7d6), the branch was rebased onto the advanced base 34d9401a80, a test-only commit landed, and one new substantive commit refactored the self-address surfaces onto the base's renamed types:
- Rebased onto the lineage-aware base
34d9401a80— the base now exposes a session's address as a bare brandedOrcaSessionId(sessionOrchestrationIdentity(...).orcaSessionId, formatted byformatOrcaSessionAddress) inshared/orca-session-address.ts, with the prefix split into the leaforca-session-address-prefix.tsso CLI entries stay off the codec's zod graph. These files are base-authored; the PR consumes them. callerShowandsessionAddressformat the rootsession:<id>—callerShow's session branch reportsformatOrcaSessionAddress(orchestrationCaller.orcaSessionId);sessionAddressvalidates withisOrcaSessionIdand then formatssessionOrchestrationIdentity(params.sessionId).orcaSessionId, keeping the copied address equal to the address the session acts as.- Agent-visible worker spelling uses the conversation root —
agentVisibleOrchestrationAddressderivesformatOrcaSessionAddress(sessionOrchestrationIdentity(worker.sessionId, db).orcaSessionId)behind anisOrcaSessionIdguard, so mailbox reads show a structured worker as its lineage-root session address while stored keys and receipts keep the handle. - CLI and renderer resolve via the one exported constant / guard — the status refusal line, the
checkcaller label and the dispatch preamble spellsession:fromORCA_SESSION_ADDRESS_PREFIX; the renderer resolver andNativeChatStructuredSessionswapsessionOrchestrationActorforisOrcaSessionId; the copy fallback formatsformatOrcaSessionAddress(sessionId).
I read the new commit's diff and each of its eight files at HEAD, and read the base commit 34d9401a80 diff to confirm the rename semantics being adapted to. Grep shows no remaining sessionOrchestrationActor / formatOrchestrationActor / .actor / coordinator_actor usage in src, and no stale "actor" wording in the guide/help/spec files. At this head the ten affected suites (90 tests) pass, and pnpm tc:node, tc:cli and tc:web are clean. Prior pullfrog reviews carry no inline threads, so nothing needed retiring; the earlier merge-conflict blocker is resolved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
34d9401 to
5183dd5
Compare
2c4fcb4 to
b34ef25
Compare
5183dd5 to
f75fbe4
Compare
b34ef25 to
18baf73
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (2c4fcb4107), one substantive commit landed (18baf737ba), the last architecture-review follow-up for the self-address feature:
orchestration.sessionAddressnow resolves through the one party resolver — the handler swapssessionOrchestrationIdentity(...).orcaSessionIdforresolveOrcaSessionParty(...).orcaSessionId, so a session's reported/copied address is derived by the same hook that binds a verb acting as that session. A non-Orca id still refuses withunknown; a recorded worker whose identity the host lost now refuses withnotLiveinstead of formatting a stale address.ORCHESTRATION_TARGET_PARAMclassifiessessionAddress.sessionIdas a target (that map is read only by the party-naming contract tests, so there is no runtime routing change).check --waitis refused for every session caller, workers included — theruntimeKind === 'native'discriminator is removed from bothOrchestrationSessionCallerandresolveOrchestrationSessionCaller, so the gate is now simply "the request carries a session caller". The old "a session held by its terminal view runs in a PTY and may still wait" carve-out was dead: production never writes atuilease (the terminal handoff is removed;tuiis decoded only from older-build records and normalized), so every structured session runs turn by turn. Terminal agents still block normally, and the refusal stays in the structured-runtime passthrough set.- Tests and guides follow the contract change — a structured-worker refusal case replaces the deleted terminal-view waiter test in
orchestration-check-wait-session.test.ts; theconsumer_fenced-while-waiting case inorchestration-session-coordinator.test.tsis deleted because a session can no longer register a waiter (that fencing path remains covered by the dispatch/legacy fencing suites);PARTY_NAMING_FIELDSgrows to includesessionId;coordinator-loop.mddrops the terminal-view wording andmessaging-and-gates.mdrecords that a chat is reachable bysendbut refused as a Dispatch assignee.
I read the commit's raw diff and each touched file at HEAD, confirmed resolveOrcaSessionParty derives the same lineage root the previous path did, and confirmed no production writer produces a tui lease. At this head the five delta suites pass (101 tests), config/scripts/orchestration-skill-guidance.test.mjs passes (29), pnpm tc:node/tc:cli/tc:web are clean, and verify:bundled-skill-guides / verify:skill-bundle-manifest exit 0. Prior pullfrog reviews carry no inline threads, so nothing needed retiring.
ℹ️ The PR description's Architecture review §1 still describes the superseded check --wait gate
The code now refuses check --wait from any session caller, but the description's "Architecture review" item 1 still says the session caller "carries its lease's runtimeKind" and that "a session held by its terminal view runs in a PTY and may still wait". A reviewer reading the description alone would infer the opposite of the shipped behavior; the commit message states the new contract, so only the PR body needs the correction.
Technical details
# Align the PR description with the final `check --wait` contract
## Affected sites
- PR body, "Architecture review" item 1 — claims `runtimeKind` is carried and a terminal-view session may wait; both were removed by `18baf737ba`.
## Required outcome
- Item 1 states that `orchestration.check` refuses `wait: true` for any session caller (a `consumer_fenced`/`stable_pane_required`-style fail-closed gate with the turn-loop recovery), and that only a terminal agent, which carries no session id, may block.
## Open questions for the human
- None — this is a description edit only, no code change.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
18baf73 to
cad7778
Compare
There was a problem hiding this comment.
ℹ️ No critical issues — a couple of minor suggestions inline.
Reviewed changes
Since the prior pullfrog review (18baf737ba, rebased to b1554f7f7f), seven commits landed that swap two of the prior architecture-review mechanisms and simplify the agent-facing surface:
- Replaced the session
check --waitrefusal with a host-side cap —session-caller-wait-cap.tscaps a structured session's blockingcheck --wait/askto 6 s (Codex) or 100 s (Claude) and leaves a terminal caller uncapped;wait_requires_terminaland its passthrough entry are removed, and the consumer-fenced waiter test is restored now that sessions register waiters again. - Unified the worker preamble — one text for both modes, differing only by the address line; the chat-specific 5 s
ask, turn-loop wording, "end your turn", and theORCA_CLI_COMMANDinvocation were deleted. - Made
orca status'scalleropaque — droppedkindandsessionIdfrom the address and refusal shapes, and removed the chat-specificcheckspec notes plus the root-help address/ORCA_CLI_COMMANDlines. - Dropped every chat-specific instruction from the guide — the kernel and references name the address once and carry no
session:<id>,/clear, orORCA_CLI_COMMANDtext;agent-facing-parity.test.tspins chat↔terminal parity for the preamble, pointer, and guide. - i18n — the Copy Orchestration Address strings moved to the head of the
native-chatblock; no behavior change.
ℹ️ The PR description documents a design these commits replaced
The body still describes the intermediate design. §4 says the worker preamble invokes the CLI through structuredSessionCliInvocation ("$ORCA_CLI_COMMAND"), Architecture review item 1 describes the runtimeKind carve-out, and Notes lists wait_requires_terminal and a caller.sessionId. None of that ships: the preamble teaches bare orca, every session caller is capped, and the caller shape is opaque. "What works end to end" leans on the Codex ORCA_CLI_COMMAND result, so a reviewer reading the body alone would infer the opposite of the merged behavior. Please rewrite the affected sections (or restore the documented behavior).
Technical details
# Reconcile the PR body with the final shipped design
## Affected sites
- PR body §4 ("The worker preamble") — claims `structuredSessionCliInvocation` / `ORCA_CLI_COMMAND`; the final `deliver-worker-dispatch-preamble.ts` passes `runtime.getTerminalOrchestrationCliCommand(terminalHandle)`, and `preamble.ts` renders `orca`/`orca-dev`/`orca-ide`.
- PR body "Architecture review" items 1–2 — describe the `runtimeKind` carve-out and the contract-parity preamble; both were replaced by the wait cap and byte-parity.
- PR body "Notes" — lists `wait_requires_terminal` (removed from `errors.ts`) and `caller.sessionId` (removed from the caller shape).
- PR body "New tests" / "Ablations" — still enumerate the deleted chat-ask and refusal mechanisms.
## Required outcome
- The body describes the shipped mechanisms: a host-side cap for a session caller's blocking `check --wait`/`ask` (not a refusal), one preamble differing only by the address, and an opaque `caller`.
## Open questions for the human
- Was dropping the `ORCA_CLI_COMMAND` invocation from the preamble intentional? It matches the base branch (the final diff vs base does not contain it), but the skill stub added here (`skill-stubs/_shared/cli-resolution.md`) still tells chat sessions a bare `orca` can reach a different Orca.ℹ️ Nitpicks
orca status's text refusal now printscaller: none (refused: <code>).nullalready means "no identity", sononefor a session that carried an id but was refused reads as the opposite;refused (<code>)keeps the two distinguishable.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…only No mount passes both terminal-pane actions and an orchestration address: a chat shown inside a terminal pane is that terminal's agent, copied by its terminal ID. Drop the unreachable terminal-pane placement and its tests.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (7b7c90b), four commits landed on the branch (now merged onto main at e2b6a4c), simplifying the agent-facing address model back toward main's:
- Removed the session-caller wait cap —
session-caller-wait-cap.tsand itscheck/askcall sites are deleted, so a chat's blocking call waits the budget asked for like a terminal's; the prior inline thread is retired. - Made every agent's address its mailbox address —
callerShow,sessionAddress, and the worker preamble now reportmailboxAddressOf(a terminal/worker handle, or a chat'ssession:<lineage root>); the read-sideagentVisibleOrchestrationAddress/withAgentVisibleAddressesre-spelling layer is gone, and dispatch previews spell the coordinator through the party resolver. - Reverted the
checkcaller label to the CLI's environment —orchestrationCallerLabelis synchronous again (handle orinjectedSessionAddress()), dropping the per-check host round trip. - Restricted Copy Orchestration Address to chat tabs — the unreachable terminal-pane placement and its tests are removed.
I read the incremental range-diff and each touched file at HEAD, and confirmed the mailboxAddressOf derivation yields the same address bindDeclaredCaller rewrites a caller param to. The changed suites pass at this head (orchestration-caller-show, orchestration-check-wait-session, orchestration-worker-mode-opacity, agent-facing-parity, orchestration-party-cli-address, orchestration-party-addressing, preamble; 74 tests), and pnpm tc:node/tc:cli/tc:web are clean. The prior inline thread on session-caller-wait-cap.ts:12-13 is addressed by the deletion and resolved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…n check reads After a window reload a terminal agent keeps ORCA_TERMINAL_HANDLE=term_old while its pane is reminted as term_new. callerShow reminted and advertised term_new, but check, send and ask act as the carried handle and never remint, so mail sent to the advertised address was never read by that agent. callerShow now answers the carried handle with its liveness, and null for a pane key alone, from which the mailbox verbs have no identity. Resolving terminal callers once on the host for every verb is a separate follow-up.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (e2b6a4c27a), one commit (55ab34d55c) reversed the terminal ladder in orchestration.callerShow:
orca statusnow answers the carried handle instead of the pane remint —resolveTerminalCallerreturns{ address: ORCA_TERMINAL_HANDLE, live: resolveTerminalIdentity(handle).live }(live or not), andnullwhen only a pane key is present;resolvePaneHandle(runtime.resolveTerminalPane) is deleted. The new rationale holds: these are the handles the mailbox verbs (check,send,ask) act as, which the CLI resolves from the environment without reminting — only the coordinator verbs (resolveCoordinatorTerminalHandle,validateEnvHandle: true) remint throughterminal.resolvePane.- Tests updated to prove the advertised mailbox is read — the stale-handle case now inserts mail to the advertised handle and reads it through the real
orchestration.check, assertingcount: 1; a new case pins pane-key-only tonull, andstatus-caller.test.tsflips that expectation accordingly.
I read the incremental range-diff and the touched files at HEAD, and traced the CLI's mailbox-verb caller resolution to confirm the coherence claim. The delta suites pass at this head (17 tests), and pnpm tc:node / tc:cli are clean. The sole prior inline thread (session-caller-wait-cap.ts:12-13) is already resolved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…mpt repro, and trim round-one leftovers The reliability repro's fake worker parsed "Your coordinator's terminal handle is:", which the preamble now spells "Your coordinator's address is:", so it silently skipped worker_done; it accepts both. Dispatch and its dry-run go back to main's coordinator line (their `from` is already bound at the entry); only dispatch-show, whose `from` is unbound, resolves it. Also drops a stale status-caller comment, trims the wait test to its one uncapped-wait case, and reverts comment-only churn in the worker opacity test.
The guide grows by the one caller.address line; the parity test bounds the kernel at main's length plus that line instead of forcing a reword.
…ion Address Renders the pane-commands hook as a structured chat tab and selects the item: it asks orchestration.sessionAddress with the tab's target and session id. Also corrects the menu item's comment to what it copies.
Conflict in locales/en.json resolved as a JSON 3-way merge keeping both sides' keys.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (55ab34d55c), three authored commits plus a merge of origin/main landed:
- Reverted the dispatch and dry-run coordinator line to main's spelling —
orchestration.dispatchand its--dry-runpreview now passparams.from ?? 'coordinator'directly, because the dispatch entry already binds a session caller'sfromto its address (bindDeclaredCaller, keyed offORCHESTRATION_CALLER_PARAM); onlydispatchShow, whosefromis not a caller param and so is unbound, still resolves throughresolveOrchestrationParty. The revert is behavior-identical for every reachable caller, since a raw terminal or worker handle resolves to itself. - Restored the guide's worker obligation 1 to main's wording — the kernel now grows only by the single
caller.addressline; the parity test bounds it at197 + 1 = 198lines and the guide is 198.bundled-skill-guides.tsregenerated, and theverify:bundled-skill-guidesgate passes. - Added a renderer test for the chat-tab menu action — renders
useStructuredNativeChatPaneCommandsas a structured chat tab and selects Copy Orchestration Address, asserting it asks the tab's host (orchestration.sessionAddresswith the tab target and session id). The item is pinned to the chat-tab mount, matchinguseNativeChatContextMenu'sshowTerminalPaneActions === falsegate. Also corrected the menu item's comment and taught the long-prompt repro to read the renamed coordinator line.
I verified the dispatch binding claim by tracing bindDeclaredCaller/bindDeclaredSessionAddress, confirmed the CLI's mailbox verbs (check/send/ask) send the carried handle while only coordinator verbs remint, and ran the eight touched suites (50 tests, pass), pnpm tc:node/tc:cli (clean), verify:bundled-skill-guides (exit 0), and oxlint on the changed files (0 findings).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
bundled-skill-guides.ts conflicted (generated); regenerated from the merged skill-guides sources. Main dropped the dispatch capability from the preamble params (#23994) and added a guide line, so the parity test stops passing a capability and bounds the kernel at main's new length plus the address line.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (fd0c2a12bd), the branch merged origin/main (3047353017) and adapted to two upstream changes; the PR's own feature content is unchanged.
- Regenerated the bundled skill guide —
origin/mainadded a line toskill-guides/orchestration.md;src/cli/bundled-skill-guides.tswas regenerated from the merged sources and the parity test's kernel bound moved to198 + 1, matching the guide's 199 lines exactly under its<=assertion. - Dropped the dispatch capability from the preamble params — upstream removed the dispatch capability (#23994), so
PreambleParamsno longer declaresdispatchCapabilityand the parity fixture stops passing one. - No other PR-authored content moved: the incremental range-diff is limited to these mechanical adaptations, so no feature behavior changed.
I read the incremental range-diff and the full raw diff end to end, and confirmed at HEAD that the merge preserved the PR's own changes. pnpm tc:node, tc:cli and tc:web are clean; verify:bundled-skill-guides exits 0; the parity/preamble/worker-mode-opacity suites (36), the caller-show/session-caller/party-addressing/status-caller suites (90), and the skill-guidance contract test (29) all pass. No open pullfrog review threads needed retiring.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Review status: ready for your decision (not merged)The problem. An agent running in Orca had no reliable way to learn its own orchestration address, the name other agents use to message it. It guessed from its environment or passed What changes for you. Fixed during this review (head
Deferred (all P3; none blocks):
QA observations that are not this PR's (already on
Verified:
Not verified:
Stacked #22972 must be restacked onto this head. It uses the removed cap and address-rewriting helpers. |
There was a problem hiding this comment.
ℹ️ No critical issues — a few stale address-spelling references inline.
Reviewed changes
Since the prior pullfrog review (5370575704 @ 46ffb53c35), the branch merged origin/main (which renamed the orchestration address prefix session: → orca_session_id:) and added one test commit that follows the rename:
- Merged main's address-prefix rename —
ORCA_SESSION_ADDRESS_PREFIXis noworca_session_id:and the oldsession:spelling is retired and refused. The PR's producer and consumer paths already read the shared constant (session-recipient.ts,caller-show.ts,status-caller.ts,structured-session-orchestration-address.ts,agent-session-caller-env.ts), so no production change was required. - Aligned the two test expectations to the new spelling —
status-caller.test.tsandorchestration-party-addressing.test.tsnow expectorca_session_id:<id>and the "Orca session ID" refusal wording.
I read the incremental range-diff, the full PR diff, and the touched producer files at HEAD; ran the two delta suites plus the caller-show, session-caller, parity, mode-opacity, check-wait, structured-address and native-chat menu suites (111 tests, pass), and verify:rpc-params-catalog / verify:bundled-skill-guides exit 0. The delta has no PR-authored behavior change; the leftovers below are the only concrete items. The sole prior inline thread (session-caller-wait-cap.ts) is resolved.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
…terminal agents as main has them Terminal agents keep main's exact wording: a terminal worker's preamble is byte-identical to main's, and orca status prints nothing new for them. A session is named by its Orca session ID (orca_session_id:<id>, its /clear root's): a structured worker's preamble says "Your Orca session ID is: …" and its commands use that ID, and a session coordinator is "Your coordinator's Orca session ID is: …". orca status shows a session caller's `caller.orcaSessionId`; callerShow answers null for anyone else. The chat tab menu item becomes "Copy Orca Session ID" with a tooltip saying what the ID is, and its toasts match. No agent-read text calls this ID an address. A structured worker's mail is still keyed by its minted handle.
…from a CLI test The node project cannot compile src/cli, so the guard over CLI help, specs and status text moves to src/cli; both halves share one pattern. Also brings two comments and the long-prompt repro's coordinator-line regex to the Orca session ID wording.
… primitive's typography Drops a restyle the design-system gate refuses on TooltipContent, keeps "Agent" untranslated in the Japanese tooltip as that catalog does, and types the test's tooltip mock without an assertion.
| return undefined | ||
| } | ||
| try { |
There was a problem hiding this comment.
Terminal caller address disappears When a terminal agent runs
orca status --json, this early return omits caller because the agent has no injected session ID. Terminal agents therefore lose the way to discover and share their own orchestration handle, which the previous implementation reported along with its live state.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (5383701470 @ 01669930e4), three authored commits and two origin/main merges landed, renaming the agent's self-identity from an "orchestration address" to an "Orca session ID" and narrowing the feature to sessions:
orca statusis now session-only —orchestration.callerShowdropped its terminal branch (and theruntime/evidence plumbing) and returns{ caller: { orcaSessionId, live: true } }for a session ornullotherwise; the CLI returnsundefinedwithout asking the host when the environment carries noORCA_AGENT_SESSION_ID, so a terminal agent's status output is byte-identical tomain.- Renamed the shared shapes —
OrchestrationCallerSession{orcaSessionId,live},CliStatusCallerwithoutnull, andorchestration.sessionAddressreturning{ orcaSessionId }; the human-readable status line key is noworcaSessionId:. - Preamble naming is kind-aware —
dispatchIdentityLinesnames a session by "Your coordinator's Orca session ID is:" / "Your Orca session ID is:" and leaves a terminal onmain's wording with no self line; the neworcaSessionIdOrHandleresolves the coordinator in dispatch, dry-run, dispatchShow and worker preamble delivery, while a structured worker's mail stays keyed by its minted handle. - Menu rename —
NativeChatCopyOrcaSessionIdMenuItem(with a tooltip and six-locale strings) andresolveStructuredSessionOrcaSessionIdreplace the address-named versions. - Wording guard — a new CLI test and parity block assert agent-read text (help, specs, status, guide/references, preambles, refusals) never calls the Orca session ID an "address".
I read the incremental range-diff and the full production sections at HEAD, and traced the session-caller binding (bindDeclaredCaller, resolveDeclaredCallerParty), mailboxAddressOf, and canonicalOrcaSessionId to confirm the orca status, sessionAddress, preamble and menu all agree. The 61 host/CLI delta tests and 12 renderer delta tests pass; tc:cli/tc:node/tc:web, verify:bundled-skill-guides, verify:rpc-params-catalog, verify:localization-catalogs and verify:skill-bundle-manifest all exit 0. The three prior inline nitpicks (stale session:<id> spellings) are addressed by the rename and were retired.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Review status after the Orca session ID wording change: ready for your decision (not merged; live QA passed)The problem. A chat agent had no reliable way to learn its own Orca session ID, the ID other agents use to message it. A user had no way to copy it. Before this change, the PR called that ID an "address" and showed terminal agents a new caller line, which went against the plan: every agent will eventually be called by its Orca session ID ( What changes for you (head
Needs your eye:
Deferred (P3):
Verified:
Live QA (passed, at
Not verified: keyboard focus showing the tooltip; Linux, Windows and SSH by hand; Codex chats as the product under test. QA notes, not caused by this PR:
|
…wn session ID in the singular
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (1ce4007929 @ #5385918505), one authored commit landed:
- Corrected the Orca session ID tooltip to the singular —
NativeChatCopyOrcaSessionIdMenuItem's default tooltip string, theuse-native-chat-context-menuassertion, and theen/es/frcatalogs now read "separate from the agent CLI's own session ID"; theja/ko/zhstrings already used the singular, so all six catalogs now agree. No behavior change.
use-native-chat-context-menu.test.tsx passes (7 tests) at this head. All three prior inline threads (stale session:<id> spellings) are resolved, so nothing needed retiring.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

ELI5
An agent Orca runs as a chat session can now ask Orca for its own Orca session ID (
orca_session_id:<id>), the ID other agents use to message it, and a user can copy a chat's Orca session ID from its menu. Terminal agents see exactly what they see onmain.Before this, a chat agent had no reliable way to learn its own Orca session ID. It guessed: it copied an ID from its environment, or passed
--terminal <handle>with a handle that might belong to another pane. A user had no way to copy a chat's Orca session ID at all, so they could not tell another agent where to send messages for that chat. And a dispatched worker running as a chat session was never told its own ID.What Changed
Scope
This PR changes four places an agent or user sees:
orca status(text and--json): a chat caller gets its Orca session ID (caller.orcaSessionId, and anorcaSessionId:text line). A terminal caller gets exactlymain's output.ORCA status --jsonshows your Orca session ID ascaller.orcaSessionIdwhen you have one."main's "Your coordinator's terminal handle is: …".It also fixes two places where a chat that was
/cleared was shown its new session's ID instead of the Orca session ID it keeps across/clear: thedispatch-show --preamblepreview, and the error for sending to a provider's own session ID. And it rewords agent-facing refusals that called this ID an "address" or a bare "session id".Not affected:
orca statusoutput, their worker preamble under a terminal coordinator, and theircheck,sendandaskare exactlymain's.main, and no data is migrated.session_chat_not_dispatchable). Making a chat a dispatch target is the stacked PR feat(orchestration): a native chat can be a dispatch worker, like a terminal agent #22972.check --waitoraskwaits. A chat waits exactly as long as a terminal agent, as onmain.What this changes for you
orca status --jsonreturnscaller: { orcaSessionId: "orca_session_id:<id>", live: true }, resolved by Orcaorca statusin a chat agent's shellorcaSessionId: orca_session_id:<id>, ororcaSessionId: none (refused: <code>)if Orca will not act as that sessionorca statusin a terminal agent's shellmain's preamble/clear/clearkeeps. Tooltip: "Orca's ID for this chat, separate from the agent CLI's own session ID. Agents use it to refer to each other through Orca." Toasts: "Orca session ID copied" / "Unable to copy Orca session ID"/cleared chat previews a dispatch or someone sends to its provider IDMechanism
orchestration.callerShow(new, read-only, no params). Orca's host already works out who is calling on every orchestration request, from the session ID the CLI sends in its request envelope.callerShowreturns that answer asorca_session_id:<id>, where the ID is the first session of the chat's/clearchain. For anyone who is not a session it answersnull. A session Orca will not act as (not running, another host, a provider's own ID) gets the same refusal every orchestration command gets.orca statuscallscallerShow(10 second limit) only when the process carries an Orca session ID (ORCA_AGENT_SESSION_ID) and the runtime is reachable. A terminal agent makes no extra call, so its text and JSON are exactlymain's. An older host that lacks the method, or any failure, leavescallerout; the exit code is unchanged.skill-guides/orchestration.md, bundled into the CLI) gains exactly that one line. Nothing in the guide is chat-specific.orca statushelp gains a note aboutcaller.orcaSessionId, and therun-use,run-currentandchecksummaries no longer say the caller is a terminal.preamble.ts) picks each identity line by the party's kind: a value spelledorca_session_id:gets the Orca session ID wording, anything else keepsmain's terminal-handle wording and no self line. Every path that builds a preamble (dispatch,dispatch --dry-run,dispatch-show,worker-start) names each party the same way: a session by its Orca session ID (its/clearroot's), anything else by its handle.--from,--terminal) use its Orca session ID, matching its self line. The host binds that ID to the worker's own mailbox, so its mail is stored exactly as onmain.session-recipient.ts) names the/clearchain's first session instead of the current one.NativeChatCopyOrcaSessionIdMenuItem.tsx, wired inuse-structured-native-chat-pane-commands.ts) asks the host that owns the chat (orchestration.sessionAddress, new) for the Orca session ID when the item is selected, because only the host's session records know a chat's/clearhistory. Against a host that predates the method it copiesorca_session_id:<current id>. Any other failure shows the error toast; the copy never claims a success it did not have. The tooltip uses the existing menu-item tooltip pattern and the shadcn tooltip primitive. New strings, with real translations, are in all six locales.Why
Why ask the host instead of reading the environment in the CLI. The CLI can read the session ID it was started with, but not whether Orca will act as that session (a released session, another host, a provider's own ID), and not a chat's
/clearhistory. The host already decides this for every command, sostatusreports that decision rather than a guess.Why terminal agents are left exactly as on
main. Terminal agents do not have an Orca session ID yet. Showing a terminal handle under a new name, or under a neutral word, would teach agents a name that changes when terminals move to Orca session IDs. So a terminal caller'sstatusand a terminal worker's preamble stay exactly as they are.Why a new method instead of a field on
status.get.status.getis the readiness probe. It is called without an orchestration envelope (the 1 second local probe, the version check, remote status), so it cannot see who is calling. It would also make every readiness probe read session records and turn a refused session into a failed readiness check.Why a structured worker's mail stays under its handle. A structured worker (a worker that runs as a chat session) has its mail stored under the handle Orca minted for it. Rewriting that handle to the Orca session ID wherever an agent reads mail would need a change at every read site, and any site that missed it would show the other spelling. Moving storage to Orca session IDs is its own change. Until then the worker is told its Orca session ID, which routes to the same mailbox.
Why chats get no special wait limit. We considered capping how long a chat's
check --waitandaskblock, on the theory that the chat provider's shell tool would kill a long command. Neither provider does: default Codex's command tool returns output after a few seconds and keeps the command running, and Claude Code moves a Bash command that passes its timeout to the background. Terminal agents run the same tools with no cap. A cap would only have made a chat coordinator re-runcheckevery few seconds. So a chat waits exactly as a terminal agent does.Why the menu item resolves at click time, and why its own label. A
/clearchanges the chat's current session but not its Orca session ID, so reading it on click uses the current/clearhistory. In Orca's UI "Session ID" already means the provider's own ID, so this gets its own item, and the tooltip says how the two differ; Copy Session ID is unchanged.Deviations
main's line. Onmainthat line prints the chat'sorca_session_id:value under "Your coordinator's terminal handle is:", which calls an Orca session ID a terminal handle. Every other line of that preamble ismain's.orchestration.sessionAddress, the menu copiesorca_session_id:<current id>. Safe because such a host routes that ID to the same chat.run-use,run-currentandcheckhelp summaries say "coordinator" or "this agent" instead of "terminal", for every agent. They stay accurate for terminal agents.worker-liststill show itsstructworker_handle, because its mail is stored under that handle. Messages to either reach it. Follow-up: store mail by Orca session ID, after which every surface shows the Orca session ID.dispatchandworker-startname the parties after the dispatch row is written (and, forworker-start, after the worker launches). This cannot fail on any input that reaches it today. Follow-up: work the names out before writing the dispatch row.orca statushelp note sayscalleris omitted when the agent is not an Orca session, but does not mentioncaller.refusalfor a session Orca refuses. Follow-up: add it to the note.orchestration.sessionAddressalthough it now returns{ orcaSessionId }. Only the renderer calls it, and it is unreleased. Follow-up: rename it before release, or accept the name.main, not caused by this PR): in a development build, a structured worker's preamble can name theorcaCLI instead oforca-devunless the coordinator's CLI identified itself as a dev build. Follow-up: use the CLI name the structured message lane uses.orchestration.sessionAddressanswers the current session's ID instead of the/clearchain's first one. Hard to reach, because a visible chat has already started that host. Follow-up: start the host first and refuse if it cannot.orca status, which shows nothing for terminal agents.Merge order
Base is
main. The stacked PR #22972 (a chat as a dispatch assignee) must be restacked onto this PR's final head before it merges: it used the wait cap and the worker-renaming helper this PR no longer has, and it must follow the Orca session ID wording.Linked Issue
None — part of the structured chat orchestration program. Base is
main.Visual Proof
Live Electron QA of this head,
1ce4007929, on a separate Mac (M4Air): a dev build with an isolated home and profile, a hidden window and CDP screenshots. The QA driver was Codex. The agents inside the app are structured Claude chats and a Claude terminal worker.A chat's right-click menu shows Copy Orca Session ID, with its tooltip
Selecting it shows the success toast
The copied value is
orca_session_id:<id>. Here it is pasted into the composer, and the chat's ownorca status --jsonreports the same valueA chat worker's instructions, from a terminal coordinator: main's coordinator line plus "Your Orca session ID is: orca_session_id:…"
A terminal worker's instructions match main. The text the worker received is byte-identical to main's preamble rendered for the same inputs. The identity lines ("Your coordinator's terminal handle is: term_…", with no Orca session ID line) had scrolled off the top of the pane. The end of the same preamble is shown here, with every command using the terminal handle.
Terminal menus are unchanged: Copy Terminal ID is still there, and there is no Copy Orca Session ID. This PR changes no terminal-pane files.
The two screenshots below come from an earlier head,
fd0c2a12bd. The behavior they show is unchanged here.A chat's
check --waitis not capped. With Claude Code's default 120 second Bash timeout, Claude moved the command to the background at 120 s instead of killing it; the wait kept running, a message sent at 150 s arrived once, and the chat picked it up on its own. In a second run, where Claude chose a 240 s tool timeout, the message arrived at about 165 s, also exactly once.Testing
Checks at
1ce4007929(mainmerged at8b76683b400):tc:node,tc:cli,tc:web) passes.preamble.test.tsand its snapshot, all ofrpc/methods/orchestration/, the CLI session-caller tests, the guide tests inconfig/scripts/, andNativeChatStructuredSession. A wider run at88383118d60(all ofsrc/main/runtime/orchestration,rpc/methods/orchestration, everyrpc/orchestration-*.test.ts, the CLI orchestration tests and the structured chat tests) passed: 293 files, 2673 tests.oxlint(full), the anti-slop rules on changed files,check:code-quality:changedandcheck:react-doctor:changedare clean.verify:rpc-params-catalog,verify:bundled-skill-guides,verify:skill-bundle-manifestand all fiveverify:localization-*scripts pass.New and changed tests:
preamble.test.ts: the identity lines for each pairing of kinds. The snapshot of a terminal worker under a terminal coordinator ismain's snapshot, unchanged.agent-facing-parity.test.ts: a chat worker's preamble equals a terminal worker's apart from its identity lines; the chat message-pointer text matches the terminal one in packaged and dev builds; the guide has no chat-only text and grows by one line. A guard checks that the guide and its references, every preamble pairing, and the refusals that name a session never call the Orca session ID an "address".src/cli/orca-session-id-wording.test.ts: the same guard over CLI help, specs andorca statustext.status-caller.test.ts: a chat caller'sorcaSessionIdfield and text line; a terminal agent, a pane key alone and a plain shell printmain's status and make no extra call; a refused session; an older host.orchestration-caller-show.test.ts:callerShowfor a chat, a structured worker (whose preamble names its Orca session ID while its mail stays under its handle), a/cleared chat, a released session, a provider ID, a paired client, a terminal agent and no identity.orchestration-worker-mode-opacity.test.ts: a structured worker is taught a terminal worker's text apart from its identity lines, and a structured worker's sub-worker is told its coordinator's Orca session ID.orchestration-party-addressing.test.ts:orchestration.sessionAddressanswers the Orca session ID for a chat and a worker; a/cleared chat'sdispatch-showpreview and provider-ID refusal name the Orca session ID it kept.use-native-chat-context-menu.test.tsx: the label, the exact tooltip text, both toasts, and the copied value.use-structured-native-chat-pane-commands.test.tsx: on a structured chat tab the item appears, and selecting it asksorchestration.sessionAddresswith the tab's host and session ID.orchestration-check-wait-session.test.ts: a chat'scheck --waitreaches the host's waiter with the full budget it asked for.Ablations (each change undone, then its tests re-run; all 12 went red):
main's snapshot.worker-start: 2 tests fail.orca statusasking the host for a terminal agent: 3 tests fail.callerShowanswering the mailbox handle: 1 fails.sessionAddressanswering a worker's handle: 1 fails.orca statushelp: the CLI guard fails.A separate fresh review of this head also checked:
mainhave no hand-resolved conflicts.main's over 24 input combinations, comparing against a copy ofmain'spreamble.ts.worker_done, heartbeats, asks and checks exactly as it does by its handle.Not verified: keyboard focus showing the tooltip in the running app; Linux, Windows and SSH by hand; Codex chats live (the Codex wait behavior comes from Codex's source and from real Orca Codex session logs).
AI Disclosure
Review
orca statusmakes one extra local call, bounded at 10 seconds, only for a process that carries an Orca session ID and only when the runtime is reachable.caller; an older CLI never calls the new method; a new app against an older host copiesorca_session_id:<current id>.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Security:
callerShowonly reports the identity the caller already presented, and a session claim from another host is refused as before. Cross-platform: no platform-specific code. SSH/remote: the menu asks the host that owns the chat, and a session claim from a paired client is refused as for every orchestration command. Mobile: no mobile change. Performance: one bounded local call perorca statusfor a chat agent, and one host call per menu selection.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)