Repository navigation
fix(ssh): relay-era terminals' orca orchestration commands work again, behind the per-host switch (STA-10765) - #29571
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…, behind the per-host switch (STA-10765)
…replay settled receipts, cancel on disconnect
… and legacy receipt replays
… completed retries after reassignment
… keep legacy retries replayable after reassignment
…nly, revoke and cap calls, exact-hash replays, target-aware identity, consent copy
… honor exact reply replays
nwparker
force-pushed
the
nwparker/sta-10765-relay-cli
branch
from
October 16, 2026 09:46
9aa06f7 to
1c8f74f
Compare
This was referenced Oct 16, 2026
nwparker
added a commit
that referenced
this pull request
Oct 16, 2026
…29835) optionalAskTimeout computed exactly what cappedWait does (an undefined timeout stays undefined; anything else clamps to 0..ORCHESTRATION_ASK_MAX_TIMEOUT_MS), so the ask call uses cappedWait. Three functions used only inside their own file lose their export, and the per-host switch's doc names the orchestration commands it has gated since #29571. Co-authored-by: Claude <noreply@anthropic.com>
Merged
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Some terminals on SSH hosts were started by an older Orca, before hosts moved to Orca's managed server. Orca keeps those terminals running in their old tabs, but
orcacommands typed in them stopped working. That includes the commands a supervised agent uses to check its inbox and report back to its coordinator. The only fix was to open a new terminal and restart the agent. This PR brings the orchestration commands back in those retained terminals, but only on hosts where the user turned on "Allow this host's orca CLI to control Orca".What Changed
Before: in a relay-era terminal,
orca orchestration check,send(includingworker_done),ask,replyandinboxall failed with "This terminal was started by an older version of Orca, so orca commands are unavailable in it." A supervised worker could not read its inbox or tell its coordinator it was finished.After: with the per-host switch on, those five commands work again in the retained terminal, with no new terminal and no restart. With the switch off, or for any other
orcacommand, the terminal gets a clear message saying why and what to do. The old relay is unchanged: it sends the sameorca.cliandorca.cli.postOutputrequests, and the reply has the same shape it always had.Mechanism:
orca.cliandorca.cli.postOutput. It now hands them to a small server (legacy-relay-cli-server.ts) that runs them on the desktop runtime. That is where a retained worker's Dispatch and Run records live; the managed server never received them. If the relay connection closes, an abort signal stops the call, so a waitingcheck --waitstops too.orchestration.check/inbox/send/ask/reply, and the caller is a paired scope with no grants. Each host terminal also gets its own mutation-receipt fingerprint, so a host can never replay another caller's result.legacy-relay-cli-caller.ts): everything the host sends is treated as a claim. A caller is accepted only if all of these hold:ORCA_PANE_KEYleaf matches a pane this desktop leased on that host, and the host's relay still lists it as running;ORCA_TERMINAL_HANDLE;registerOrchestrationCompatibilitySshAttachment) also carries the terminal's verified handle, pane and process incarnation. The pane-key and process-incarnation lookups, and compatibility-caller verification, fall back to it only for a handle the runtime does not otherwise know. Releasing the attachment removes it.Limits (from the security review):
askmay wait (30 minutes).The help text for "Allow this host's orca CLI to control Orca" now also says the switch lets relay-era terminals run orchestration commands. This is updated in every locale and in the Korean overrides file.
Why
ssh-bridgecaller kind and its credential. This change serves only the orchestration commands, which are the ones a retained worker needs. It reuses the dispatcher, the browser bridge's scope pattern, the existing SSH compatibility attachment and the orchestration handlers.worker_done, ask and reply would still fail there.ssh-bridgescope: none of the old opted-in workspace methods, and no terminal read or send.Linked Issue
Linear STA-10765 (no GitHub issue).
Visual Proof
N/A. There is no UI change; the change is the output of a CLI command in a retained terminal.
Testing
Not verified live: a real retained terminal needs a relay started by a pre-1.4.225 Orca desktop, and none was running on the test hosts. Automated coverage, using a real runtime and a real orchestration database:
worker_donesucceed. This fails without the runtime fallback, becauseworker_doneis rejected as "not the exact process".worker_donereplays after it settles.worker_donereplays after its Dispatch settles and after the terminal takes a new assignment; an emptied--retry-requestis refused.check --waitstops when the connection closes.check --wait;Review
Codex (
gpt-6.1-sol, high) was run for eight rounds, ending clean. Every finding was fixed, including all the security review findings:Agent skill upstream boundary
Notes
COMPAT(legacy-relay-bridge): this retires with the bridge on 2027-01-15. Wire compatibility: no new fields or opcodes; the old relay's existing request and reply shapes are served. The help text for the per-host switch still describes only the browser bridge (left unchanged so locales stay in sync); the error a retained terminal prints names the switch.
Checklist
pnpm tc:nodeandcheck:code-quality:changedpass locally