Skip to content

fix(runtime): a paired client no longer keeps a finished remote pane on working - #29538

Merged
nwparker merged 1 commit into
mainfrom
nwparker/remote-working-latch
Oct 16, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/remote-working-latch

Conversation

@nwparker

@nwparker nwparker commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​104 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​104
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9

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

  • Before: on a paired client, a remote Muse pane kept its yellow working spinner after every turn, while the host itself showed done.
  • After: the client shows done once the agent's title settles, same as the host.

Mechanism: renewRuntimeMobileAgentStatusFromPtyTitle (src/main/runtime/runtime-mobile-agent-status-projection.ts) publishes a title-only working row stamped with the spinner frame's time while that frame is newer than the hook's done. 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 published updatedAt for the pane went backwards. That branch now advances updatedAt (the ordering clock) to the title evidence time and records the hook's original time in evidenceObservedAt, so freshness and decay still date from the hook. It does this only for non-working rows, so an old working row 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 updatedAt comparison instead, but the host would still publish a timestamp that goes backwards, and every other reader of session.tabs (mobile, older clients) would still get it wrong. updatedAt is already documented as the delivery/ordering clock that has to stay monotonic, with evidenceObservedAt as the freshness clock, so no new field or wire change is needed. Old clients that don't read evidenceObservedAt only see a newer stamp on a done/blocked row, 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

  • Automated tests added/updated, or explained why not below

New src/main/runtime/orca-runtime-mobile-agent-status-ordering.test.ts replays the issue's measured timeline through the real title observer and listMobileSessionTabs: a hook done at Stop, a trailing ⠧ muse frame 4.5 s later, then a plain muse title. On main it fails with expected 1700000000000 to be greater than or equal to 1700000004534. With the fix it passes, and evidenceObservedAt stays at the Stop time. The neighbouring projection suites (permission renewal, title truthfulness, status builder) also pass. pnpm tc:node and check:code-quality:changed are 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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No wire shape change. The change is host-side, so it covers SSH-managed and paired orca serve hosts, and folder workspaces as well as worktrees. Nothing platform-specific.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…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).
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 09b49118-a61a-4033-8c9d-ff159b68599b
📥 Commits

Reviewing files that changed from the base of the PR and between d982384 and 0a9b970.

📒 Files selected for processing: 2
  • src/main/runtime/orca-runtime-mobile-agent-status-ordering.test.ts
  • src/main/runtime/runtime-mobile-agent-status-projection.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: A paired client keeps a remote Muse pane on working after its turn ends

1 participant