Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds transcript parsing that classifies the latest Claude turn. Adds validation for restored Claude panes through PTY, process, host, and transcript checks. Adds server state confirmation and startup reconciliation. Adds tests for parsing, confirmation, persistence, liveness, filtering, failure isolation, and repeat prevention. 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
Full details: Title checkExplanation The title accurately describes the files changed, but it conflicts with the stated PR objective. The objective describes terminal response echo cleanup for OSC 11 and DSR 997 responses, not restored Claude turn confirmation. Full details: Description checkExplanation The description contains the required sections and detailed testing information, but it documents restored Claude working-state confirmation rather than the stated objective of fixing terminal response echoes. It is therefore off-topic relative to the declared PR objective. 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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 814123f1-2cf9-4722-8906-d8af9cd65982
📥 Commits
Reviewing files that changed from the base of the PR and between a1ec047 and 45d83323dd5e1790feffdc296c047784d181e293.
📒 Files selected for processing (8)
src/main/agent-hooks/claude-transcript-tail-read.tssrc/main/agent-hooks/restored-claude-turn-confirmation.test.tssrc/main/agent-hooks/restored-claude-turn-confirmation.tssrc/main/agent-hooks/server-restored-turn-confirmation.test.tssrc/main/agent-hooks/server.tssrc/main/index.tssrc/shared/claude-transcript-turn-openness.test.tssrc/shared/claude-transcript-turn-openness.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
4783531 to
237bf82
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a472ceac-9975-42fe-8144-4e2c1d2a4e20
📥 Commits
Reviewing files that changed from the base of the PR and between 47835315c7a80f0b64dd56db8e37f5603ef51760 and 237bf82b41f02a9dfd5ca8232d6ce8abe8b8ac28.
📒 Files selected for processing (8)
src/main/agent-hooks/restored-claude-turn-confirmation.test.tssrc/main/agent-hooks/restored-claude-turn-confirmation.tssrc/main/agent-hooks/server.tssrc/main/index.tssrc/main/native-chat/transcript-turn-markers.tssrc/shared/claude-transcript-turn-markers.tssrc/shared/claude-transcript-turn-openness.test.tssrc/shared/claude-transcript-turn-openness.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.
7b03b56 to
96cf203
Compare
… restart A pane that was working when Orca quit comes back idle: hydrate stamps every non-terminal row `restoredUnconfirmed`, and the flag only clears on the agent's next hook event — so a pane inside a long tool call renders as not-running for the whole call. Chat already answers "is this turn still open" from the transcript, settling its spinner off provider-authored lifecycle records. Reuse that reader and decoder rather than inventing a second opinion about what a Claude transcript means: it handles interrupt markers, `stop_reason` terminals, tool-result continuations and harness noise rows, over a tail reader that is WSL-gated, byte-capped and safe against a file that shrinks mid-walk. Confirmation demands two independent positive proofs: Claude is the pane's foreground process on this machine, and the transcript's newest boundary opened a generation that never ended. An agent killed mid-tool leaves the same open-looking transcript while its shell keeps the PTY alive, so neither counts alone. Absence of a boundary is not evidence either — a quiet pane emits no hook to correct a wrong guess — and an open boundary older than twelve hours is refused, because an abandoned mid-turn transcript stays open forever while a real one is minutes to hours old. Confirmation passes the same disposition gate every other status ingress uses, so a retired pane is never revived, and it withdraws the runtime-observation claim the accept path stamps: a transcript may restore what the pane looks like without holding the machine awake for it. Remote/SSH panes are skipped — their agent and transcript live on the execution host, where absence is a read failure, never a verdict — while WSL relay ids count as local, per wsl-hook-relay-contract.
96cf203 to
ace3e69
Compare
…-agent-status # Conflicts: # src/main/agent-hooks/server.ts
|
Final review verification (Brennan), refreshed on exact live head Node 24 verification passed 5 focused files / 67 tests, Fresh exact-head Electron evidence used Playwright CDP only. A real Claude turn was visibly |
|
QA/evidence (Brennan), refreshed on exact SHA The replacement process visibly rendered Focused Node 24 regression coverage passed 67/67, typecheck and changed-code quality passed, and branch-head export parity passed. Exact-head CI is 44 success / 3 failure / 1 skipped: only Node 24/26 shard 10 plus dependent |

ELI5
After an Orca update, a Claude process could keep running in its preserved terminal while every Orca status surface looked idle until Claude emitted another hook. Orca now confirms that restored status only when the same local pane still runs Claude and Claude's own transcript shows a recent open turn.
What Changed
workingrows.Why
The failure source was persisted non-terminal status hydrating as
restoredUnconfirmed; production renderers intentionally hide that row, and only a later hook could clear it. The reliability invariant is: a restored Claude row is visible as working only when current process identity and provider-authored turn lifecycle independently agree, under the current pane and execution-host authority.The deterministic oracle covers restart hydration, current/persisted PTY identity, daemon foreground confirmation, transcript completion/interruption/age, local/WSL/SSH/folder ownership, retirement, replay side effects, and error isolation. No new wire field or opcode is introduced; mixed-version clients receive an ordinary existing status update.
Linked Issue
Fixes STA-5647
Visual Proof
Before: the Linear report shows Claude visibly running after an update while its worktree, tab, and agent row have no working state; deterministic baseline coverage reproduces the row as
working + restoredUnconfirmed, which production summary logic hides.After: a CDP-only Electron restart-shaped validation preserved the daemon PTY, restored a recent open Claude turn, and rendered Working simultaneously on the worktree, agent row, and terminal tab on the first mounted frame.
Backing proof from the same frame: intended branch identity
nwparker/restart-keep-agent-status; foregroundclaude; main snapshotstate=workingwith norestoredUnconfirmed; renderer snapshotstate=working; observation originprocess; originalstateStartedAtpreserved.Testing
Commands and results:
pnpm tc— passed under Node 24.18.0.pnpm run check:code-quality:changed— passed with zero new regular, type-aware, or React Doctor findings.Platform/provider coverage: deterministic contracts cover macOS/Linux/Windows-neutral orchestration, local worktrees, local folder workspaces, WSL relay provenance, SSH/remote fail-closed ownership, daemon incarnation routing, and current-versus-persisted PTY rebinds. Live Electron proof is macOS/local; live WSL, Windows, Linux, SSH, and paired-runtime UI journeys remain unrun.
Performance budget: the startup pass is one-shot after daemon readiness, filters irrelevant rows before provider/filesystem work, memoizes foreground scans per PTY, uses the existing two-slot transcript filesystem gate, and carries a 30-second pass deadline. A 4,097-row irrelevant snapshot performs zero foreground scans, path translations, transcript reads, or confirmations.
AI Disclosure
Review
Reviewed until clean for root cause, status/title ownership, daemon generation, PTY rebind races, update lifecycle, wake locks, plugin replay, remote/SSH/folder/WSL ownership, mixed-version behavior, bounded work, and Windows/Linux compatibility. The review found and fixed one fail-open edge: a future-dated transcript boundary previously had negative age and passed the maximum-age check.
Agent skill upstream boundary
Notes
Accepted residual gaps, each corrected by Claude's next real hook:
done; completion notifications and unread badges are intentionally out of scope.Diagnostics are startup warnings for reconciliation failures plus the existing hook/daemon logs; no timer, polling loop, dependency, or remote-wire change was added.
Checklist
pnpm tc, focused tests, changed-code quality, and a dev build pass; CI covers the full matrix