Repository navigation
Orchestration v3: coordinators end their turn and Orca wakes them - #36137
Merged
Merged
Conversation
…ther terminal, and let settled structured workers take further tasks A plain orchestration check consumed the named terminal's mail whatever terminal ran it, so a coordinator checking a worker's handle took the worker's message. A consuming check from a terminal whose own live pane is a different terminal's is now refused; --peek and --all still read it without consuming. worker-start --terminal and dispatch --inject routed a structured worker (structworker_ handle) as a terminal and failed with terminal_unsupported_for_agent_session. Any agent-session party now takes its task as a send into its session, while a structured worker keeps the pane and process authority its first Dispatch had.
…jecting structured workers Review fixes for the mail fence and structured worker reuse: - The check fence compares the caller's and the mailbox's live terminal process instead of recorded panes, so exited terminals keep the old behaviour and two processes sharing a recorded pane are told apart. It also covers --ack in every read mode. The caller lookup is shared with the lifecycle caller fence. - dispatch --inject to a structured worker stays refused as before: an injected Dispatch takes no custody, so releasing the first Dispatch could close a session working on the second. worker-start --terminal reuse transfers custody and stays supported. - worker-start decides pane-less chat authority from the resolved party and passes the session down, so delivery and next commands no longer re-derive it from the address spelling. - Receipts name an agent session, not a chat.
The caller lookup fell back to the env pane key whenever the env handle was not live, so an exited terminal's pane resolved to whatever terminal now occupies it, and a tmux worker's own check was refused. The pane fallback now applies only when the env handle is not proven exited.
…tart Main now attaches every live local daemon session it adopts at startup, not only ones a window pane or remote view is showing, and re-attaches after a daemon endpoint drop. The attach snapshot seeds main's screen, tail and title, and an attached-but-silent agent gets an output clock so readiness can see it has gone quiet. Waits on a survivor main could not attach fail at once instead of timing out.
…e attach state - Endpoint loss re-attaches in main only sessions no renderer view reports; a pane restores its own. - The attach hide skips views mid-attach and leaves a pane's own hidden claim alone on failure. - One per-session stream state (attaching, attached, lost) replaces three sets and is forgotten on exit. - Waits retry the attach before failing, including after a failed re-attach. - The output clock starts wherever a reattach result is seeded, so pane reattaches get it too.
…s on unattached survivors fail at once; one ptyId output clock
…uiet clock per generation, keep main's hidden mark on failed attach
…d safety rules, fixed scope and settled wording
…gram still reports working Claude Code keeps its OSC 7501 report on working while an agent-teams teammate is alive, even after the lead's own turn ends. The mailbox gate, idle edges and tui-idle all read that report, so worker mail was stored and never typed. A hook turn end newer than the program's working report now counts as rest; hook rows re-classify the PTY so the existing idle edge delivers. Agent Teams panes now join their claude hook rows.
…ceipt A child's hook restamps the row's receivedAt while the lead's turn is still the old one, which could mark rest under a newer program working report. Use the lead's turn-end stamp on this runtime's clock, after the latest input.
…aring clocks Drop programActivitySince and the turn-end clock mapping: replays and SSH host clocks made the comparison unreliable. A Claude lead counts as at rest under a program working report when its hook turn end is a live transition from this pane's host and launch, past the existing input and respawn floors.
…in tab menu tests
…s converge with automatic release - Record worker takeover at the owning runtime when it accepts UI input, before the bytes reach the PTY. - Run remote attachment releases through the same per-resource single-flight as local ones. - Apply the confirmed-release home projection when host observation reports a host-side release, and carry the host deadline in fleet snapshots. - Prove restart recovery with a file-backed database reopened by a fresh runtime.
… counting methods
This was referenced Oct 31, 2026
Open
Open
4 tasks done
This was referenced Nov 2, 2026
10 of 11 tasks
nwparker
added a commit
that referenced
this pull request
Nov 6, 2026
…eir stream The daemon adapter's inventory listing reported every surviving session's title as "shell", though the listing carries no title. That made-up value became the fallback tab title when adoption ran before the attach seed, and a terminal.create retry that adopted a survivor after a restart recorded it as the terminal's observed title and returned it. That create-retry adoption also never attached the session's stream, so the adopted terminal's output never reached main: lastOutputAt stayed null and its real title never landed until some later inventory refresh attached it. - The daemon listing reports no title. The attach snapshot's lastTitle and the stream stay the single source, as for every other terminal. - A create retry that adopts a survivor attaches it through the same main attachment inventory adoption uses. - A new runtime record treats an empty title as unknown, as an update already does, so it never reads as a manual title. Inventory adoption already attaches survivors (#36137); this closes the create retry path and drops the made-up title. No wire change: old and new daemons send the same listing. Fixes #22809
nwparker
added a commit
that referenced
this pull request
Nov 6, 2026
…eir stream (#38760) The daemon adapter's inventory listing reported every surviving session's title as "shell", though the listing carries no title. That made-up value became the fallback tab title when adoption ran before the attach seed, and a terminal.create retry that adopted a survivor after a restart recorded it as the terminal's observed title and returned it. That create-retry adoption also never attached the session's stream, so the adopted terminal's output never reached main: lastOutputAt stayed null and its real title never landed until some later inventory refresh attached it. - The daemon listing reports no title. The attach snapshot's lastTitle and the stream stay the single source, as for every other terminal. - A create retry that adopts a survivor attaches it through the same main attachment inventory adoption uses. - A new runtime record treats an empty title as unknown, as an update already does, so it never reads as a manual title. Inventory adoption already attaches survivors (#36137); this closes the create retry path and drops the made-up title. No wire change: old and new daemons send the same listing. Fixes #22809
8 of 9 tasks
hiphapis
added a commit
to hiphapis/orca
that referenced
this pull request
Nov 9, 2026
Upstream's Orchestration v3 rewrite (stablyai#36137 and following) compressed the guide and deleted the "Launch preferences" section this branch edited, so re-home the policy in the new idiom instead of restoring the old prose: extend the kernel's existing `--model` bullet to cover `--agent` and `--effort` and to route `agent_unconfigured` back to the user, and drop `--agent` from the worker-start examples. Regenerate the bundled guides. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011nnNsG3p4Do9eiyfXGr2rB
2 tasks
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
A coordinator agent now starts its workers, ends its turn, and gets woken by Orca when a worker reports. Before, coordinators waited inside their turn with long blocking calls, polled, and did bookkeeping (create a Run, acknowledge mail, release workers). Now Orca does that bookkeeping, wakes the coordinator wherever it is (a background or never-opened workspace, after an Orca restart, or mid-turn), tells it when a worker stops without reporting, and closes finished workers you never looked at.
This combines the orchestration PRs listed at the bottom into one change, plus the fixes found while testing them together.
What changes for users
worker-startcreates the Run in one step;nexthint ("Orca wakes you when workers report; end your turn when you're done");worker_done, or sits at a permission or question prompt, sends the coordinator one message with its last output. Nothing is settled automatically.worker_done, unless you opened it (its tab was on screen while you were present) or typed into it. A new setting, "Auto-close finished workers" (on by default), turns this off.next.Mixed versions
Features are gated on capabilities the other side advertises, never on version numbers:
run-create).nextexplains how to userun-use.Measured (real app, 3 runs each, same fixture and prompts)
Final round on this head's predecessor, all passing:
worker_done, a permission prompt, and a chat error;Known limits (follow-ups)
Supersedes
#34564, #34704, #34706, #34744, #34754, #34900, #35274, #35293, #35294, #35343, #33720, #34056. They will be closed with a link to this PR.