Repository navigation
Keep finished agents marked Done while their panes sleep - #41793
Merged
Merged
Conversation
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 20, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 20, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 20, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 21, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 21, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 21, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 21, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 21, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 21, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 22, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 22, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 23, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 23, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 23, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 23, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 24, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 24, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 24, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 24, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 24, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
6 of 11 tasks
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 26, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 26, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 26, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 26, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 26, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 27, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 27, 2026
Upstream keeps agent statuses in one live map shared by every store version (stablyai#41793) and dropped finished-agent retention (stablyai#40774). Indexing that map like a record finds nothing, so read-aloud never saw a turn finish, Ask named no target agent and Ctrl+Enter never steered. Ask and steering read it with get/has; read-aloud keeps its own copy of the rows it last saw, because the previous store state reads the same live rows as the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd
added a commit
to registered2nd/orca
that referenced
this pull request
Nov 27, 2026
… contract and pane status The queued-prompt observer imports the send contract from where v1.4.261 regrouped it. Its test now gives the runtime the per-pane status lookup that v1.4.261's submission gate reads (stablyai#41793), so the busy agent it models reads as working again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
You finish a task, then Orca puts its terminal pane to sleep. The pane should still say Done in the workspace card, Agents list and dashboard until you close it. This companion to #40774 keeps that finished result with the sleeping pane, including across an Orca restart.
What Changed
Why
Orca previously recreated finished rows after live status disappeared. That confused a sleeping pane with an exited process or lost host. #40774 removes that inference; this change records deliberate sleep at its source and keeps the finished result until its pane closes. Updating records by key also removes full-list copies from ordinary status updates.
Merge dependency: #40774, then this PR, then #42104, the separate sender change that sends only changed agent status rather than every workspace, back to back. Brennan requires these changes to merge together in that order. This PR is not ready to merge alone: without the sender change, faster updates here can make the old sender resend the full workspace list more often.
Linked Issue
Tracked in STA-14820.
Visual Proof
Real Windows/WSL and Mac checks verified manual sleep, restart, closing one side of a sleeping split, and real Claude and Codex follow-ups. The final remote Sleep check also preserved the original completion times and kept the workspace read. Local automatic sleep now passes with both real agents. Remote automatic Sleep does not trigger on main or on this branch; it is tracked separately.
Remote Sleep, before: both real agents have replied and the workspace is read.
Remote Sleep, after: both processes stopped, their sleeping Done rows kept the original times, and the Projects bell stayed at zero.
Manual sleep: the workspace stays asleep with its finished agents shown as Done.
Restart: sleeping Done rows remain after a graceful Orca restart. The paired host preserved their original completion times.
Codex resume: waking the pane and sending another message produced a real reply in the previous conversation.
Close while asleep: closing a sleeping tab through its previously issued terminal handle removed its row and left another tab's Done row. The later Mac check also closed the Claude side of an asleep split using its pre-sleep handle: the Claude row left, and the same Codex sibling stayed Done with its original completion time.
Close one side while asleep: the pre-sleep Claude handle closed only its leaf; the inactive split kept its Codex Done row with the original time.
Claude resume: after the remote processes stopped for sleep, Claude reopened the original conversation and recalled the codeword given before sleep. This proves the resume reply. A later targeted remote Sleep check also preserved completion clocks and read state.
Local automatic sleep: a finished Claude pane remains Done after its process automatically stops, with its original age and no new unread. Codex passed the same flow separately.
Testing
cc8be2168aa7b7c81985a086b3ef53269a48afafis green, including typechecks, all 12 unit shards, cross-version compatibility, both managed-SSH shards, and the aggregate PR gate. The integration preserves keyed status ownership and main's moved modules. Author checks also passed typechecking and 25 named suites/139 tests. The host-scoped compact-card regression covers 100/1,000 sleeping roots, unrelated updates and row drops, and relevant host/acknowledgement changes.Benchmark: one M4Air, Node 24.19, pinned main versus this change; 100 and 1,000 active workspaces, three independent processes per side in alternating order, ten trials per process. All 12 runs completed. Values are medians of each side's three process medians, in milliseconds.
Status updates were consistently faster at both sizes. At 1,000 workspaces, create timings overlapped and close timings were inconclusive: the branch's three process medians were 508.8, 259.4 and 296.8 ms, versus main's 294.5, 268.4 and 269.0 ms. The slow process and run-order effects prevent attributing the close difference to the code; no improvement for large-workspace tab operations is claimed. These windows include React commits, scheduling and garbage collection with a fixed fake-clock tail; they are not Electron frame times or network latency. Later title/prompt handling uses changed pane keys and constant-time active-agent checks; mounted readers have focused real-store coverage and are not measured in the table.
A focused SQL check found no additional database statements: changing one record uses six statements; moving one while deleting another uses seven. Neither reads the full agent list. Four unchanged development-build watcher tests failed on both this branch and pinned main on this Mac with matching Node dependencies; full CI passed.
Risk
Intended error handling: a failed internal state listener is logged without cancelling an accepted update or preventing its remaining notifications and follow-up actions. Errors that reject the update itself still reach the caller.
Level: High. The riskiest part is preserving a sleeping pane's finished result while retiring its process, then removing it on real close. A mistake can hide Done too early or leave a stale row. Remote manual Sleep now passes its completion-time and read-state check. Local automatic sleep passes with both agents and both raw-packet audits are complete. UNTESTED: remote automatic Sleep does not trigger on main or on this branch; tracked separately. The three PRs require joint landing.
Review
Independent review and carried evidence are recorded in the PR's status comment. Local automatic-sleep evidence and both raw-packet audits are complete. Remote automatic Sleep does not trigger on main or on this branch; tracked separately.
Agent skill upstream boundary
Notes
macOS, Linux, Windows, WSL, remote hosts, mobile and older saved-data compatibility are covered by the tests and CI listed above; the remote Sleep check passed; local automatic sleep passes with both agents, the separate remote automatic-sleep bug remains unresolved, and CLI-wrapper coverage is incomplete.
Checklist