Skip to content

fix(remote): keep the host's last assistant message on client-owned agent rows (#12906) - #14716

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/remote-agent-rows-3596
Aug 18, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/remote-agent-rows-3596

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When your laptop is paired to a remote Orca runtime, every agent pane has two things writing its status into one slot: the remote host (which reads the real agent hooks and knows what the agent last said) and your own laptop (which watches the terminal bytes and can only tell "spinner on / spinner off").

To stop the two from fighting, we let the laptop win for panes it is actively streaming. But the "laptop wins" rule threw away the whole host row — including the one thing the laptop can never know: the agent's last message. So the remote agent row showed the agent's name and its status, and the message line underneath stayed blank forever.

This keeps that one field from the host, exactly the way we already keep the host's session id.

What Changed

buildMirroredAgentStatusPatch (src/renderer/src/runtime/web-session-tabs-sync.ts) now carries lastAssistantMessage from the host frame onto a client-owned entry, alongside the providerSession it already carried:

lastAssistantMessage:
  (hostIdentityPredatesCurrentTurn ? undefined : entry.lastAssistantMessage) ??
  existing.lastAssistantMessage
  • hostIdentityPredatesCurrentTurn is the predicate this line already computes for providerSession; reusing it keeps local parity (a pane that has started a new turn shows no completion text, because setAgentStatus writes payload.lastAssistantMessage straight through and a working payload carries none).
  • The ?? existing fallback means a host that stops publishing the field cannot blank a line it already delivered. Host-first, unlike the providerSession line above it, because only the host can ever mint one.

Receive-side only. No wire change, no new field, no new opcode, no capability, nothing new published. 6 added lines in one file, plus a new test file.

Why

Where the message is lost: (c), not (a) or (b)

The message is published by the host, received by the client, and then discarded by the client's own status-arbitration merge.

A remote pane has two writers for one agentStatusByPaneKey key:

Writer Path Carries lastAssistantMessage?
Host session.tabs snapshot → remapHostAgentStatus Yes — it reads the real hook rows
This renderer pty-connection.ts OSC pipeline (shouldOwnAgentStatusInRenderer = runtimeEnvironmentId !== null, i.e. every remote pane) No — bytes never carry a Stop event

renderer-owned-agent-status-registry.ts fences the host out of a pane the client both claimed and wrote, so the mirror keeps the client entry wholesale and copies only paneKey / worktreeId / tabId / providerSession off the host frame. Two things then compound:

  1. setAgentStatus writes lastAssistantMessage: payload.lastAssistantMessage with no merge, so every byte-derived OSC write blanks whatever the host had delivered.
  2. The fence prevents the next host republication from putting it back.

Net: on a remote pane, the field is destroyed and can never be restored. terminalTitle/agentType/state survive because the client does produce those — which is exactly the reported shape: identity and status render, the message line never does.

Both row renderers read that field and nothing else — DashboardAgentRowMessage renders its blank spacer when lastAssistantMessage is falsy, and getCompactAgentSecondary falls through to the agent-type label.

That also explains why the reporter's orca worktree ps --json on the node shows a populated agents[].lastAssistantMessage: worktree ps is a different projection that never passes through this merge.

The #14621 pattern, again: a surface claiming authority it does not have

isClientAuthoritativeAgentStatusPane grants the client authority over the whole status
row on the strength of "claimed at transport creation and wrote once" — regardless of whether
the client can produce the field being arbitrated. That is the same shape as #14621's hook
diagnostic reporting installed for a host where nothing was: an authority claim wider than
the evidence behind it. providerSession was already recognised as an exception; every other
host-only field was silently swept up with it.

The narrow fix is to carve out the field the ticket names. The general shape — the fence still
discards interrupted, toolName/toolInput, model, subagents, orchestration for the
same reason — is left for whoever has a ticket that needs one of those, rather than widened
speculatively here.

Checked for the #14649 shape too (one bad element voiding a whole aggregate): the mirror loops
per surface and per pane key with no Promise.all and no all-or-nothing collection, so a single
pane cannot void the batch.

Why the fix is on the client

The hard rule is don't make the client infer content it was not sent. This does the opposite — the client was sent the text and is throwing it away. Nothing is inferred, synthesized, or reconstructed: if the host frame carries no message and none was ever mirrored, the line stays blank (covered by a test).

Relationship to #9930 — complementary, NOT superseded

No PRs are superseded by this one.

#9930 (@innocarpe) fixes a host-side drop: listMobileSessionTabs demotes a stale working status under a neutral live title and omits lastAssistantMessage from the demoted projection. That is a real, separate loss on the publication side and it should still land.

This PR fixes the client-side drop that happens after a host frame carrying the message arrives. #12906 filed separately from #9914 precisely because it suspected a different cause — it is. Neither fix subsumes the other:

Remote wire compatibility

Assessed against all three rules in docs/reference/remote-wire-compatibility.md:

  • Rule 1 (new optional field) — N/A. lastAssistantMessage has always been on AgentStatusEntry and has always been published on the terminal surface; this only stops the receiver discarding it.
  • Rule 2 (new opcode) — N/A. No opcode, no framing change, no handshake change.
  • Rule 3 (changed host projection) — N/A. The host publishes nothing new. The only change is which fields the client keeps when it merges a frame it already receives, so no old client sees anything different and no capability gate is warranted.

Both skew directions are covered by tests anyway:

  • Old host / new client — an old host that never carries the field must not make the client fabricate one, and must not blank a message an earlier frame already delivered. Two dedicated tests.
  • New host / old client — unchanged by construction: this PR sends nothing, so an old client sees byte-identical frames. The unchanged path is pinned by the control: test (a pane the client never wrote status for takes the host entry verbatim, exactly as before).

tests/e2e/cross-version-wire/cross-version-terminal-wire.unit.test.ts runs green.

On STA-3455 (agent status has no explicit owner)

This adds no new cross-machine clock comparison. The two that exist on this line (existing.updatedAt > entry.updatedAt, and hostIdentityPredatesCurrentTurn's stateStartedAt compare) are untouched; the new field reuses the second one's already-computed result rather than introducing a third.

Linked Issue

Fixes #12906

Related (not fixed here): #9914 — the host-side half, addressed by #9930.

Visual Proof

The change is data plumbing with no layout, styling, or component change; the rendered difference is the existing DashboardAgentRowMessage slot going from its blank spacer to the agent's text. Reproducing it on screen needs a live paired remote runtime with an agent mid-turn, which this environment has no sanctioned host for.

Behavioural before/after is pinned instead by a test that runs the real seams end to end — the real applyFreshWebSessionTabsSnapshot mirror, the real store, the real buildWorktreeAgentRows — and asserts on the exact field both row renderers read:

Before (working tree at ab9d1a29a9, new test file only):

 × shows the message on a pane this renderer owns from the byte stream
 × keeps a mirrored message when a later host frame omits the field (old host / new client)
   Tests  2 failed | 3 passed (5)

  {
-   "web-terminal-host-tab-1:11111111-...": "좌→우 가로 파이프라인으로 다시 그렸습니다",
+   "web-terminal-host-tab-1:11111111-...": undefined,
  }

After:

   Tests  5 passed (5)

The 3 tests that pass in both directions are the non-regression half: the host-authoritative control path and the two "never fabricate a message" invariants are unchanged by the fix.

The render half of the chain — entry.lastAssistantMessage ⇒ the visible secondary line — is already pinned by the repo's own suite and needs no new coverage:

src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx:240
  expect(markup).toContain('<span class="text-muted-foreground/65"> - Inspecting changes</span>')

So this PR restores the field, and that test proves the field is the line.

Testing

New: src/renderer/src/runtime/remote-agent-row-last-assistant-message.test.ts (5 cases). It replays byte-for-byte what pty-connection does for a remote pane — claim the key at transport creation, prove the claim with a byte-derived write — then drives real host snapshots through the real mirror.

Case Asserts Pre-fix
owned pane keeps the host message the fenced pane's row shows the host text after republication fails
control: pane the client never wrote host-authoritative path unchanged passes
never invents a message (old host / new client) host frame with no field ⇒ row stays blank, row still exists passes
keeps a mirrored message when a later host frame omits it (old host / new client) an old host's demoted frame cannot blank an already-mirrored line fails
does not paste last turn's message under a restarted turn local parity: a new turn shows no completion text passes

Every case guards against a vacuous pass — the blank-line assertions also assert the row exists.

pnpm exec vitest run --config config/vitest.config.ts \
  src/renderer/src/runtime/remote-agent-row-last-assistant-message.test.ts        # 5 passed

# neighbours on the same merge path
pnpm exec vitest run --config config/vitest.config.ts \
  src/renderer/src/runtime/web-session-tabs-sync.test.ts \
  src/renderer/src/runtime/web-session-tabs-sync-remote-status-title-flap.test.ts \
  src/renderer/src/runtime/web-session-tabs-sync-mirror-identity.test.ts \
  src/renderer/src/runtime/paired-reconnect-sidebar-agent-count.test.ts           # 107 passed

pnpm exec vitest run --config config/vitest.config.ts \
  src/renderer/src/runtime/web-session-tabs-sync-visibility-collision.test.tsx \
  src/renderer/src/runtime/web-session-tabs-sync-window-visibility.test.tsx \
  src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts \
  src/renderer/src/store/slices/agent-status                                      # 194 passed

pnpm exec vitest run --config config/vitest.config.ts \
  src/renderer/src/components/sidebar/useWorktreeAgentRows.test.ts \
  src/renderer/src/components/sidebar/worktree-agent-row-selectors.test.ts        # 40 passed

pnpm exec vitest run --config config/vitest.config.ts \
  src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx \
  src/renderer/src/components/dashboard/DashboardAgentRow                          # 45 passed

pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/runtime     # 783 passed (78 files)

# wire-compatibility enforcement, both skew directions
pnpm exec vitest run --config config/vitest.config.ts \
  tests/e2e/cross-version-wire/cross-version-terminal-wire.unit.test.ts           # 5 passed

node config/scripts/check-changed-code-quality.mjs
# code quality: 0 new finding(s) across 2 changed file(s).
# type-aware code quality: 0 new finding(s) across 2 changed file(s).
# React Doctor: 0 new finding(s) across 2 changed file(s).

npx oxfmt --check <changed files>   # All matched files use the correct format.

Platforms: the changed code is renderer-side TypeScript with no OS-dependent branch. The path it fixes is by definition the remote/paired one (macOS client ↔ Linux orca serve in the report); local panes never reach this merge.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Review

  • Security — no new IPC, RPC, or trust boundary; the string already crosses this exact channel and is already capped at AGENT_STATUS_ASSISTANT_MESSAGE_MAX_LENGTH (8 KB) upstream.
  • Cross-platform — renderer TypeScript, no platform branch.
  • Remote SSH / pairing — this is the remote path; local status flow is untouched.
  • Mobile — mobile mirrors through the same function and gets the same fix.
  • Backwards compatibility — receive-side only; see the Rule 1/2/3 assessment above.
  • Performance — one nullish coalesce on an object already being built per changed pane. agentStatusEntryEqual already compares lastAssistantMessage, so no extra republication churn; a message-only change is deliberately not sort- or aggregate-relevant, so it does not bump agentStatusEpoch.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • 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)
    • Scoped suites above run locally and pass. Full pnpm typecheck deliberately not run locally (OOM risk in this environment); the changed-code type-aware gate is green over both changed files and CI covers the rest.

Out of scope

  • The host-side half — leaving lastAssistantMessage on the demoted projection in listMobileSessionTabs is fix(runtime): retain completion subtitles for paired workspaces #9930's change, not duplicated here.

  • STA-3521 (remote agent rows cannot open their tabs when several remote agents share a project). Not the same root cause — that is activation, not content — so it is deliberately not bundled. Handing over the lead this investigation turned up, unreproduced but code-verified:

    Activating a remote terminal tab requires two things, and the reference implementation is the workspace tab palette (workspace-tab-palette-activation.ts:105-113):

    if (isWebRuntimeSessionActive(runtimeEnvironmentId)) {
      void activateWebRuntimeSessionTab({ worktreeId, tabId: entityId, environmentId })  // host RPC
    }
    state.setActiveTab(result.entityId)                                                  // local store

    The RPC is what records the focus intent (recordWebSessionFocusIntent) and sends intent: 'user' — commented in web-runtime-session.ts:1157 as "the gesture that is supposed to wake a slept pane".

    activateTabAndFocusPane — the sidebar agent row's path — does only the local half. setActiveTab → activateTab (store/slices/tabs.ts:1037) never reaches web-runtime-session, so the host is never told and no focus intent is recorded. The other three activation entry points (Terminal.tsx, useTabGroupWorkspaceModel.ts, tab-number-shortcuts.ts) all do call the RPC; activateTabAndFocusPane's five callers — sidebar agent rows, Manage Sessions, the Activity page, terminal-handle links, and the dashboard popout bridge — do not.

    That asymmetry fits the report's shape, including why multiplicity matters: with one agent the host's active tab already is the target, so a local-only flip is indistinguishable from a correct activation; with several it is not, and the target pane is never asked to wake.

    Ruled out along the way, so nobody re-walks it: the paired mirror subscribes via session.tabs.subscribeAll, so non-active worktrees do get their tabs mirrored — a missing-tab theory is not the gap. The one other silent no-op is handleActivateAgentTab (WorktreeCardAgents.tsx:176-181), reachable only by rows from buildWorktreeAgentRows' worktree-attributed fallback (worktree-agent-rows.ts:271-296); worth instrumenting second.

  • Wiring consumers to feat(agent-status): step 1 — stamp observation provenance and ordering at every status ingress (STA-4293) #14706's observation provenance facet.

Author

  • X / Twitter: @BrennanKB5

…gent rows

A remote pane has two writers for one agent-status key: this renderer's OSC
byte pipeline and the mirrored host session.tabs snapshot. When the client owns
the key, buildMirroredAgentStatusPatch keeps the client's entry wholesale and
copies only paneKey/worktreeId/tabId/providerSession off the host frame.

lastAssistantMessage is hook-only content the byte pipeline can never see, and
setAgentStatus writes payload.lastAssistantMessage straight through, so every
OSC write also blanks it. The host publishes the text and the client receives
it, then discards it on every republication — the remote agent row's message
line is permanently empty while identity and status render fine (#12906).

Adopt it across the fence the same way providerSession already is, falling back
to the mirrored value so a host that stops publishing the field cannot blank a
line it already delivered.
@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@brennanb2025, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ca715a5-65bd-4a0f-9862-40c182b88e6f

📥 Commits

Reviewing files that changed from the base of the PR and between ab9d1a2 and ae09024.

📒 Files selected for processing (2)
  • src/renderer/src/runtime/remote-agent-row-last-assistant-message.test.ts
  • src/renderer/src/runtime/web-session-tabs-sync.ts

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.

@innocarpe

Copy link
Copy Markdown
Contributor

Agreed this is complementary, not a supersede.

#9930 remains the host-side half: listMobileSessionTabs should keep lastAssistantMessage on the demoted projection. This PR is the client-owned merge half that was discarding the host message for panes the laptop streams. No change planned on #9930 beyond staying out of this client path.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review status

State: MERGEABLE / CLEAN against main. CI green — 43 successful checks, 1 skipped, 0 failing. 2 files, +429/-1 (one source file, one new test file). Branch is 2 ahead / 146 behind main.

The review loop located the loss before fixing it. It distinguished publish / transit / render rather than patching the first plausible spot, and concluded the message is published by the host, received by the client, and then discarded by the client's own status-arbitration merge — case (c), not (a) or (b). The supporting evidence is that a remote pane has two writers for one agentStatusByPaneKey key: the host snapshot via remapHostAgentStatus, which reads the real hook rows and does carry the field, and this renderer's OSC byte pipeline, which claims every pane with a runtimeEnvironmentId and can never carry it, because bytes do not carry a Stop event. renderer-owned-agent-status-registry.ts then fences the host out of a pane the client claimed and wrote, keeping the client entry wholesale and copying only paneKey / worktreeId / tabId / providerSession off the host frame. Two things compound: setAgentStatus writes lastAssistantMessage with no merge, so every byte-derived OSC write blanks whatever the host delivered, and the fence stops the next host republication putting it back. Net — on a remote pane the field is destroyed and can never be restored, while terminalTitle / agentType / state survive because the client does produce those. That is exactly the reported shape: identity and status render, the message line never does. It also explains why the reporter's orca worktree ps --json shows a populated agents[].lastAssistantMessage — that is a different projection which never passes through this merge.

I verified the production change is a single hunk in buildMirroredAgentStatusPatch (src/renderer/src/runtime/web-session-tabs-sync.ts:1228), 6 added lines:

lastAssistantMessage:
  (hostIdentityPredatesCurrentTurn ? undefined : entry.lastAssistantMessage) ??
  existing.lastAssistantMessage

The asymmetry with the line above it is real and deliberate: providerSession is existing ?? host (client-first), while this is host ?? existing (host-first), because only the host can ever mint a message. hostIdentityPredatesCurrentTurn is the predicate already computed on that line, reused rather than added, so a pane that has started a new turn shows no completion text.

I also confirmed the oracle claim — the field really is what the row renderers read. DashboardAgentRowMessage.tsx:18 returns its blank spacer when the message is falsy, and worktree-card-compact-agent-row.tsx:53-55 falls through to the agent-type label. (DashboardAgentRowMessage also reads isInterrupted; see the residual limit below.)

No wire change, and this is worth stating explicitly. Both changed files are under src/renderer/, one of them a test. The host publishes nothing new, no field is added, no opcode, no capability gate, no handshake change. The only difference is which fields the client keeps when merging a frame it already receives — so an old client sees byte-identical frames and no version-skew risk under docs/reference/remote-wire-compatibility.md arises. A remote-facing fix that had needed a wire change would carry that risk; this one does not. Both skew directions are covered by tests anyway (an old host that never carries the field must not make the client fabricate one, and must not blank a message an earlier frame already delivered), and tests/e2e/cross-version-wire/cross-version-terminal-wire.unit.test.ts runs green.

Validation — what was and was not done.

Done: a 5-case suite that replays byte-for-byte what pty-connection does for a remote pane — claim the key at transport creation, prove the claim with a byte-derived write — then drives real host snapshots through the real seams: the real applyFreshWebSessionTabsSnapshot mirror, the real store, the real buildWorktreeAgentRows. The red/green oracle is recorded concretely: at ab9d1a29a9 with the new test file only, 2 of 5 fail with the diff showing the field as undefined; with the fix, 5 pass. The 3 that pass both ways are the non-regression half (the host-authoritative control path and the two "never fabricate a message" invariants), and every blank-line assertion also asserts the row exists, so none of them can pass vacuously. Neighbouring suites on the same merge path: 107, 194, 40, 45, and 783 across src/renderer/src/runtime (78 files). check-changed-code-quality.mjs reports 0 new findings on all three gates across both files; oxfmt --check clean.

Not done: no live paired remote runtime was exercised. The PR states plainly that reproducing it on screen needs a live paired remote runtime with an agent mid-turn and that this environment has no sanctioned host for it, so there is no visual proof and no end-to-end run against a real orca serve. The behavioural claim rests entirely on the test above driving the real seams. The render half of the chain is not newly covered either — it leans on an existing assertion (WorktreeCardAgents.test.tsx:239, which pins the secondary line markup), which I confirmed exists. Full pnpm typecheck was not run locally (OOM risk); the changed-code type-aware gate is green over both files and CI covers the rest. No platform matrix: the code is renderer TypeScript with no OS branch, and the path it fixes is by definition the remote/paired one.

This is the client half only — #9930 is the host half, and it is still open

#9930 (@innocarpe, fix(runtime): keep lastAssistantMessage on demoted remote agent status) is OPEN, MERGEABLE / UNSTABLE, and touches src/main/runtime/orca-runtime.ts — host-side, disjoint from this PR's renderer-side file. Note its check rollup currently reports only a single successful check, so the full suite has not run against it recently.

@innocarpe commented on this PR on 2026-08-15 and their account agrees with the PR body — there is no divergence to reconcile. Their words: this is "complementary, not a supersede"; #9930 "remains the host-side half: listMobileSessionTabs should keep lastAssistantMessage on the demoted projection. This PR is the client-owned merge half that was discarding the host message for panes the laptop streams." They add that no change is planned on #9930 beyond staying out of this client path.

What remains broken without #9930: panes whose host status is demoted under a neutral live shell title publish no message at all, so there is nothing for this client-side fix to adopt. Conversely, #9930 alone would leave this client still discarding the message for any pane it streams. Neither subsumes the other, and #12906 was filed separately from #9914 precisely because it suspected a different cause — which the analysis confirms. No PRs are superseded by this one.

Known limits a reviewer should read

  • The carve-out is deliberately narrow. The fence still discards every other host-only field for the same reason — interrupted, toolName/toolInput, model, subagents, orchestration. I confirmed the patch adds only lastAssistantMessage beside the existing four keys, so those remain lost on a client-owned remote pane. The PR leaves the general fix to whoever has a ticket needing one of them rather than widening speculatively. Worth noting DashboardAgentRowMessage also branches on isInterrupted, which is one of the still-discarded fields.
  • The underlying authority model is unchanged: isClientAuthoritativeAgentStatusPane still grants the client authority over the whole row on the strength of "claimed at transport creation and wrote once", regardless of whether the client can produce the field being arbitrated. The PR names this as the same shape as fix(agent-hooks): report hook status per host, and stop remote Codex reusing an env-less app-server (#8711, #11941) #14621's over-broad authority claim; it carves out one field rather than fixing the model.
  • STA-3521 is explicitly not bundled (remote agent rows cannot open their tabs when several remote agents share a project) — activation, not content. The investigation did hand over an unreproduced but code-verified lead: activateTabAndFocusPane does only the local half (setActiveTab → activateTab, which never reaches web-runtime-session), so the host is never told and no focus intent is recorded, whereas the three other activation entry points do call the RPC. Its five callers — sidebar agent rows, Manage Sessions, the Activity page, terminal-handle links, and the dashboard popout bridge — are all affected. That is stated as unreproduced, and I did not verify it.
  • No new cross-machine clock comparison is added; the new field reuses hostIdentityPredatesCurrentTurn's already-computed result rather than introducing a third comparison.

Given the branch is 146 commits behind main, a rebase before merge would be worth doing.

@innocarpe

Copy link
Copy Markdown
Contributor

Thanks for the review-status write-up — still agreed this is complementary, not a supersede.

#9930 is rebased onto current main (b5230c0d2) so it can get a full CI run instead of the stale single track-community-pr check. Scope is unchanged and still host-only: listMobileSessionTabs keeps lastAssistantMessage (and interrupted) on the demoted projection when a shell/management title proves the pane was released. It does not touch the client merge in buildMirroredAgentStatusPatch.

Local check after the rebase: the demotion + last-message case and the neighbouring listMobileSessionTabs suppressions passed (4), and check-changed-code-quality.mjs is clean on the 2-file diff.

Without this host half, a demoted-under-shell-title pane still publishes no message for this PR to adopt. Without this client half, the host message is still discarded for any pane the laptop streams. Staying out of the client path.

@brennanb2025
brennanb2025 merged commit 6414a3a into main Aug 18, 2026
44 checks passed
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 21, 2026
…gent rows (stablyai#12906) (stablyai#14716)

* fix(remote): keep the host's last assistant message on client-owned agent rows

A remote pane has two writers for one agent-status key: this renderer's OSC
byte pipeline and the mirrored host session.tabs snapshot. When the client owns
the key, buildMirroredAgentStatusPatch keeps the client's entry wholesale and
copies only paneKey/worktreeId/tabId/providerSession off the host frame.

lastAssistantMessage is hook-only content the byte pipeline can never see, and
setAgentStatus writes payload.lastAssistantMessage straight through, so every
OSC write also blanks it. The host publishes the text and the client receives
it, then discards it on every republication — the remote agent row's message
line is permanently empty while identity and status render fine (stablyai#12906).

Adopt it across the fence the same way providerSession already is, falling back
to the mirrored value so a host that stops publishing the field cannot blank a
line it already delivered.

* refactor: mirror providerSession's coalesce shape and tighten the comment
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
…gent rows (stablyai#12906) (stablyai#14716)

* fix(remote): keep the host's last assistant message on client-owned agent rows

A remote pane has two writers for one agent-status key: this renderer's OSC
byte pipeline and the mirrored host session.tabs snapshot. When the client owns
the key, buildMirroredAgentStatusPatch keeps the client's entry wholesale and
copies only paneKey/worktreeId/tabId/providerSession off the host frame.

lastAssistantMessage is hook-only content the byte pipeline can never see, and
setAgentStatus writes payload.lastAssistantMessage straight through, so every
OSC write also blanks it. The host publishes the text and the client receives
it, then discards it on every republication — the remote agent row's message
line is permanently empty while identity and status render fine (stablyai#12906).

Adopt it across the fence the same way providerSession already is, falling back
to the mirrored value so a host that stops publishing the field cannot blank a
line it already delivered.

* refactor: mirror providerSession's coalesce shape and tighten the comment
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…gent rows (stablyai#12906) (stablyai#14716)

* fix(remote): keep the host's last assistant message on client-owned agent rows

A remote pane has two writers for one agent-status key: this renderer's OSC
byte pipeline and the mirrored host session.tabs snapshot. When the client owns
the key, buildMirroredAgentStatusPatch keeps the client's entry wholesale and
copies only paneKey/worktreeId/tabId/providerSession off the host frame.

lastAssistantMessage is hook-only content the byte pipeline can never see, and
setAgentStatus writes payload.lastAssistantMessage straight through, so every
OSC write also blanks it. The host publishes the text and the client receives
it, then discards it on every republication — the remote agent row's message
line is permanently empty while identity and status render fine (stablyai#12906).

Adopt it across the fence the same way providerSession already is, falling back
to the mirrored value so a host that stops publishing the field cannot blank a
line it already delivered.

* refactor: mirror providerSession's coalesce shape and tighten the comment
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.

Remote runtime: agent row shows title/subtitle but the last assistant message line is always empty

2 participants