Repository navigation
fix(runtime): a paired client no longer keeps a finished remote pane on working - #29538
Merged
Merged
Conversation
…turn's trailing spinner ends The host projected a title-only working row stamped with the spinner frame, then republished the older Stop-time done once the title went plain, so a paired client kept the newer working row forever (#28102).
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 3 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 |
This was referenced Oct 27, 2026
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
When an agent on a remote Orca server finishes, the server tells connected clients "done". But for a few seconds after finishing, some agents (Muse) keep spinning their terminal title, and the server briefly reports "working" with a newer time. When the title stops spinning, the server goes back to the earlier "done" report, which carries the older time. Clients keep whichever report looks newer, so they stay on "working" forever. Now the final "done" carries a time at least as new as the last "working".
What Changed
Mechanism:
renewRuntimeMobileAgentStatusFromPtyTitle(src/main/runtime/runtime-mobile-agent-status-projection.ts) publishes a title-onlyworkingrow stamped with the spinner frame's time while that frame is newer than the hook'sdone. Once the title goes plain (no agent status, not a shell title), it returned the hook row unchanged, which carries the older Stop time, so the publishedupdatedAtfor the pane went backwards. That branch now advancesupdatedAt(the ordering clock) to the title evidence time and records the hook's original time inevidenceObservedAt, so freshness and decay still date from the hook. It does this only for non-workingrows, so an oldworkingrow is never made to look fresh.Why
AGENTS.md says the execution host owns agent status and readers keep only presentation policy, so the fix belongs where the host publishes, not in the client merge. #20692 removes the client's
updatedAtcomparison instead, but the host would still publish a timestamp that goes backwards, and every other reader ofsession.tabs(mobile, older clients) would still get it wrong.updatedAtis already documented as the delivery/ordering clock that has to stay monotonic, withevidenceObservedAtas the freshness clock, so no new field or wire change is needed. Old clients that don't readevidenceObservedAtonly see a newer stamp on adone/blockedrow, which is harmless.Linked Issue
Fixes #28102
Refs #25136 (client-side frozen pane titles under keys that are no longer in the layout, plus a sync pause while the window is hidden: a separate renderer cause) and #15317 (Claude background tasks or a missed SubagentStop leave the host's hook store on
working; draft #15591 covers that).Visual Proof
N/A: this changes which status timestamp the host publishes. The spinner's look is unchanged; the visible effect is that it stops when it should, and the test below covers that.
Testing
New
src/main/runtime/orca-runtime-mobile-agent-status-ordering.test.tsreplays the issue's measured timeline through the real title observer andlistMobileSessionTabs: a hookdoneat Stop, a trailing⠧ museframe 4.5 s later, then a plainmusetitle. Onmainit fails withexpected 1700000000000 to be greater than or equal to 1700000004534. With the fix it passes, andevidenceObservedAtstays at the Stop time. The neighbouring projection suites (permission renewal, title truthfulness, status builder) also pass.pnpm tc:nodeandcheck:code-quality:changedare clean. Tested on macOS (unit tests only); I did not run a live paired Muse session against a candidate host.AI Disclosure
Review
Codex (gpt-6.1-sol, high): no findings.
Agent skill upstream boundary
Notes
No wire shape change. The change is host-side, so it covers SSH-managed and paired
orca servehosts, and folder workspaces as well as worktrees. Nothing platform-specific.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)