Repository navigation
Conversation
There was a problem hiding this comment.
Important
The broadened suppression drops a nested agent's non-done event entirely. That breaks src/main/agent-hooks/server-ingest-remote.test.ts — verified failing on this branch and passing on 646e9a5b — because the test pins the existing contract that nested tool progress still updates the row while identity stays pinned.
Reviewed changes
- Suppression predicate broadened —
shouldSuppressInheritedTerminalStatusnow also suppresses non-doneinherited hooks from the same terminal owner, not onlydone. sameTerminalOwnerthreaded through all three call sites — the main server uses its WSL-aware owner comparison; the two renderer paths compare stored vs incomingconnectionId.- Tests added — a nested Codex
workingno longer replaces the foreground Claude provider session, and a real agent switch is adopted once the foreground turn isdone.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📥 CommitsReviewing files that changed from the base of the PR and between 4a1e860d607aaab38465c110bb4f733c5d70a894 and 9460f29. 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughInherited active-pane statuses retain the existing provider session, model, and prompt when the terminal owner matches and the incoming state is not Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🟡 Moderate · up to A stale but still-running foreground session, or an inherited pane event from another worktree, may still show nested-agent context in the selected view. Resolve these ownership and freshness edge cases before merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change reduces accidental replacement of the foreground session and preserves the inspected completion and connection-switch behavior. Risk is limited, but consistent ownership handling across recovery and cross-worktree cases is not fully established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 587be35d-0428-4093-93a9-9beb6ed0e1a2
📥 Commits
Reviewing files that changed from the base of the PR and between 646e9a5 and 54cebf7c8b22d36abb79cf4c38b6c13c1c3c58d1.
📒 Files selected for processing (6)
src/main/agent-hooks/server-hook-http-ingest.test.tssrc/main/agent-hooks/server/server-status-update.tssrc/renderer/src/hooks/ipc-events/agent-status-event-applicator.tssrc/renderer/src/store/slices/agent-status-live-entry-builder.tssrc/renderer/src/store/slices/agent-status-provider-session.test.tssrc/shared/agent-status-identity.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
54cebf7 to
977e389
Compare
Sync update (
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Changes since the prior pullfrog review: the second commit reworks how a nested hook is held back, replacing the whole-event suppression that broke the active-pane contract.
- Split the inherited-hook predicate —
shouldSuppressInheritedTerminalStatusdrops the whole event only for a nesteddone; the newshouldRetainInheritedProviderSessionpins the foregroundproviderSessionwhile letting the nested hook's prompt/tool/lastAssistantMessagethrough. - Pinned the transcript at all three call sites — the main server substitutes
previous.providerSessionintosessionPinnedPayload, the renderer applicator rewrites the metadata source, and the live-entry builder keepsexisting.providerSessionand clearsproviderSessionChanged. - Fixed the WSL relay ownership comparison — the renderer now compares against the normalized
ownershipConnectionId(null for a WSL relay) instead of the rawwsl:id, matching main's WSL-awaresameTerminalOwner. - Tests — added nested-working retention, different-connection replacement, post-
doneadoption, and a WSL-relay snapshot-replay case; the previously failingserver-ingest-remote.test.ts:197active-pane contract passes again.
Verified on the head commit: src/main/agent-hooks/ (101 files, 1049 passed), agent-status store slices (25 files, 211 passed), and ipc-events (15 files, 57 passed).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Independent field repro on 1.4.217 (macOS host, iOS over LTE): Claude Code in a terminal pane ran One gap vs this diff: |
977e389 to
4a1e860
Compare
|
Thanks for the field repro. A nested event from the same terminal owner now retains the foreground pane's |
There was a problem hiding this comment.
Important
Retaining the foreground prompt for an inherited nested hook re-breaks server-ingest-remote.test.ts:197 — the exact pre-existing contract the previous commit restored. The suite is red on this head: 1 failed / 1193 passed.
Reviewed changes
Changes since the prior pullfrog review (977e389c): the follow-up commit 4a1e860 extends the inherited-hook retention from the provider session to the foreground model and prompt.
- Widened inherited-context retention —
shouldRetainInheritedProviderSessionis renamed toshouldRetainInheritedPaneContext; the main server and the renderer live-entry builder now also keepprevious.payload.modelandprevious.payload.prompt, not justproviderSession. - Reordered
promptInteractionKey— computed abovecommandCodeNewTurn, so a retained prompt is also treated as unchanged and does not trip command-code new-turn detection. - Extended the tests — the nested-Codex assertions now expect
prompt: 'foreground claude'andmodel: 'claude-sonnet'.
ℹ️ Nitpicks
- The PR body still says "A nested hook on the same terminal is now ignored for the whole turn", but the implementation only pins the foreground context and still applies the nested hook's tool progress and
lastAssistantMessage. Update the description to match.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
…s the pane A background Codex CLI started from Claude inherits ORCA_PANE_KEY. While that foreground turn is still active, the nested hook replaced the pane's provider session, so mobile Chat UI followed the background transcript. Drop that hook on the same terminal. A different connection may still take the pane, and a real switch after the foreground turn is done is unchanged.
4a1e860 to
9460f29
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Changes since the prior pullfrog review (4a1e860): the follow-up commit reconciles the stale nested-hook test with the intentional prompt-retention behavior.
- Aligned the active-pane contract —
server-ingest-remote.test.ts:197is renamed to "…active pane context…" and now expects the foregroundprompt: 'parent codex'instead of the nested prompt, matching the4a1e860behavior change; the nestedtoolName/toolInputstill flow through, so the test still exercises the "activity/tool evidence keeps updating" contract. - Prior regression cleared — the four focused suites (60 tests) and the full
src/main/agent-hooks/directory (1165 passed / 11 skipped) are green on9460f29. The PR body now documents the tradeoff.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Closing as superseded by merged #29264 and #29386. The merged implementation preserves the foreground session by rejecting inherited cross-provider updates at the execution host before status and cache mutation. It also retains an identified idle Claude process after Stop and checks exit/suspension before permitting a genuine provider replacement. The #22767 path is covered by the real mobile transcript resolver and transcript reader over a paired client in three hidden Electron runs each on macOS and Linux; 197 focused tests passed. Proof and verification limits are recorded in #29386 and the issue closure. This PR's narrower field-preservation approach is no longer needed. |

Orca Mobile showed a background Codex CLI transcript in place of the foreground Claude Code session.
Claude starts that Codex process with the foreground pane's ORCA_PANE_KEY. While the foreground turn was still active, the nested hook replaced the pane's provider session, and mobile chat follows that session.
While an inherited pane-key hook comes from the same terminal owner during an active foreground turn, Orca keeps the foreground provider session, model, and prompt. The nested event can still update activity, tool evidence, and output.
Focused fix
Preserves
Evidence
Vitest 4.1.11: 60 tests passed across
server-ingest-remote.test.ts,server-hook-http-ingest.test.ts,agent-status-provider-session.test.ts, anduseIpcEvents-agent-status-snapshot-replay.test.ts.User-regression tradeoffs
While a foreground turn is still active, a second agent that inherited that pane key cannot replace the visible transcript. Its activity and output remain visible.
Fixes #22767