Skip to content

Startup shows chats as Interrupted or Done without reading their history - #32146

Merged
brennanb2025 merged 49 commits into
mainfrom
brennanb2025/startup-chat-restore
Oct 29, 2026
Merged

brennanb2025 merged 49 commits into
mainfrom
brennanb2025/startup-chat-restore

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 62 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2832 $\color{#cf222e}{\Huge{\mathbf{−}}}$​797 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2035
Prod 61 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1491 $\color{#cf222e}{\Huge{\mathbf{−}}}$​480 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1011

ELI5

With hundreds of open chat tabs, Orca froze about a minute after every launch. At startup it opened and replayed every open chat's full saved history, gigabytes of it, just to learn whether each chat was Done or Interrupted. Native chat agents stop when Orca quits. Orca now saves each chat's latest-turn result on its record as turns start and finish, so startup can show Interrupted, Done, a neutral state or an existing Failed result directly from that record. No history is opened until you open a chat.

User-visible behavior

Flow Before This change
Startup with many chats Replays every open chat's history first; can freeze or exhaust memory Lists chats and their status from saved records; listing does not open history
Chat that was mid-reply when Orca quit Interrupted, after a full replay Interrupted immediately
Chat whose last turn succeeded Done, after a full replay Done immediately, at its original time
Chat whose last turn failed Failed, after a full replay Failed immediately, at its original time
Chat saved by an older Orca Status after a full replay Interrupted if the older build marked it as cut off; otherwise no status until it is opened or runs again
Opening a chat Already loaded Loads its history on open (as a closed chat already did)
Unsent kept messages from before the restart A kept message can remain on a sleeping chat Loads the same kept card on demand, without an unsolicited send; deliberate delivery still works
Orca crashed instead of quitting Status after replay Uses the last saved result; a crash can leave the saved status out of date

A user's Stop still reads Interrupted. Restart offers and the restart-failure list no longer open chats just to list them. Checks that need the chat's history now run when you act on an offer.

How it works

  • Saved data: one optional lastTurn field on the existing chat record: state, outcome, time, and short prompt and reply previews. There is no schema bump, no new column and no wire change. Older builds keep the field when they rewrite a record.
  • Writes: a status-feed observer writes the field only when the turn's state, outcome or start time changes. Streamed text never triggers a write. Writes drain before the database closes at quit.
  • Startup:
    • Tabs come from records and the visible tab index. When an older profile has no index, the first committed visibility change carries its complete saved local selection before applying the change. A chat created during startup cannot silently close another selected chat; a successfully closed chat cannot be reopened by delayed startup work.
    • Selected chats retain existing process-owner recovery without opening history.
    • Each unopened chat gets a status summary built from its record. It is published to the desktop, phone and status sinks without triggering mail, naming or notifications.
  • Opening a chat publishes its full status again after rewind recovery, so the saved field reflects the final result. That includes back-filling chats saved by older builds.
  • Removed:
    • The startup restore that replayed every listed chat, four at a time, and its gate.
    • The eager history replay behind five list/status RPCs (desktop, phone and CLI). They still await record preparation and hydration.
    • The journal opens in restart-offer and restart-failure listing.

This is the common pattern: a saved per-thread status kept current at turn edges, with history loaded only when a thread is opened.

Not in this PR

Verification

Full v2 review finished in six primary rounds, including whole-source correctness, reference, performance and readiness checks, unanimous final design-panel approval, and independent verification of the final completion delta. CI is green on ae4fc4f, including static analysis/typecheck, all ten Node test shards, cross-version compatibility, changed E2E specs and three WSL distributions. The PR is non-draft, mergeable and CLEAN with no unresolved review threads.

The one admitted lifecycle round uses a previous-build profile and real Claude and Codex agents: graceful upgrade, saved status, opening history, sleep, Stop, normal sends and replies, close/reopen through Session History, and crash recovery. The standalone packaged server also produced real replies from both agents; first-client list/status succeeded before and after server restart with zero passive journal opens. The explicit paused-card capability is hidden on the previous build. A genuine Claude kept card survived the upgrade and delivered with two real replies. Codex kept-card: no reliable public flow reaches it; covered by a test with recorded Codex state. That test uses the original recorded queue rows and production startup, demand-open, physical reload and deliberate dispatch paths; it is not a real Codex card UI or binary-upgrade pass.

The startup benchmark uses the same sealed profile with 724 nonempty journals (1,782,504 rows; 4.78 GB of JSON), main f245dc7 versus the QA head 26c4719. Over the first 180 seconds, main-process CPU fell from 21.02–21.09 seconds to 4.24–4.25 seconds, and sampled main-process peak RSS from 3,394.98 MiB to 412.63 MiB. A separate diagnostic counted 724 passive journal opens on main and zero on the branch through 188.65 seconds; opening chats then opened only their requested journals.

Observed interaction upper bounds were 32.33 seconds on main and 22.15 seconds on the branch, including driver attachment overhead. These are not earliest time-to-interaction measurements or a comparable latency ratio. Demand-open timings were measured separately: a mistaken hidden-region predicate left a baseline full-history timing gap, so the branch's 1,506 ms history/composer/paint diagnostic is not a comparison. RSS sampling began about 3.17 seconds after launch; descendant sums can double-count shared pages. An initial baseline overlapped a hook and was excluded, then only that baseline was repeated cleanly.

Intended limits: older records with no saved last-turn result remain neutral until demand-open, except the existing saved cutoff hint; a crash may leave a stale result. Opening a chat still loads its full history. Windowed opening, journal compaction and a global write-queue cap remain separate follow-ups (STA-11976, #34916 and STA-10949).

The runtime QA head is 26c4719. Later commits a2543b6, 5035b38 and b5a8353 repair test fixtures, clock usage, module mock placement and imports. Commit ae4fc4f adds the recorded Codex test, checks two fixture callbacks and corrects an erased internal forwarder type to the callee's existing contract; executable production code is unchanged. Review and green CI cover the latest head. Main was synchronized once before final QA. No conclusions from the superseded design are used.

…ts epoch

A restart could only tell whether a chat was cut mid-turn by replaying its
whole journal. journal_sessions now keeps the open root turn
(open_turn_id, open_turn_since), set by the row that opens a turn and
cleared only by a finish the provider reported, in that row's own
transaction. A turn a quit, crash or Stop cut short stays open, which is
what the next launch reads as Interrupted.

Journal schema version 5 adds the two nullable columns with a forward
migration; a new epoch starts with no turn open.
…history

Startup opened every chat in the saved tab index and replayed its whole
journal into the main process to learn its status. With hundreds of tabs
and gigabytes of history, Orca froze in GC on every launch.

Startup now lists each restored chat from its record and publishes its
row as Interrupted (a turn was open when its host stopped, or the last
quit's resume offer lists it) or Done, through the status stream and the
agent-status sink, reading only each chat's journal_sessions row and its
newest row's time. A chat's history is read when something opens it; that
open settles what the gone generation left running and publishes the
journal's own row over the restored one.

No other startup path replays chats: restart offers list from their
markers without opening chats, and orchestration mail opens the chats it
must read one at a time. Opened chats are capped at 24 resident folds;
opening one past the cap closes the least recently active folds that are
only a cache, with the idle sweep's own close test.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 23, 2026 09:01
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
Walkthrough

The pull request adds persisted journal REST facts, semantic-work records, restart-time session listing, and resident-session management. Child-work publication now supports admission results, retries, ordered writes, and durable settlement across ACP, Claude, Codex, and structured sessions. Runtime startup readiness gates background journal work. Restored-interruption metadata flows through journal, status, resume, renderer, and attention logic.

Priority: Normal

Merge Risk: High · up to bcf0c

The static-analysis CI job fails and blocks merging. Settlement reservations that are too small can permanently fail a chat's event sink at runtime. Fix the lint failures and size the settlement reservations before merging. The PR also still lists final CI, upgrade/restart QA and the startup benchmark as pending.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description follows the template's main sections (ELI5, What Changed/User-visible behavior, Why/How it works, Verification, Limits), and it explains the mechanism, the user-visible before/after, a… Add a linked issue (e.g., 'Fixes #') since the template says an actual issue must be linked. Attach before/after visual proof (screenshots or video of startup status with many chats) or state why it is not applicable. Tick the testin…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately summarizes the primary change: startup can show chats as Interrupted or Done without replaying their history.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description follows the template's main sections (ELI5, What Changed/User-visible behavior, Why/How it works, Verification, Limits), and it explains the mechanism, the user-visible before/after, and the scope exclusions. It is substantive and specific to the change. However, several template items are missing or incomplete: the 'Linked Issue' section has no 'Fixes #' issue reference, 'Visual Proof' has no before/after attachments for what is a user-visible startup behavior change (only a table is provided, and the paired visual comparison is noted as pending), the 'Testing' checkboxes are not ticked, the 'AI Disclosure' section is absent, the 'Agent skill upstream boundary' checkbox is not addressed, and the 'Checklist' is not marked. The 'Why' section is folded into the ELI5 and How-it-works sections rather than stated with alternatives considered.

Resolution

Add a linked issue (e.g., 'Fixes #<issue>') since the template says an actual issue must be linked. Attach before/after visual proof (screenshots or video of startup status with many chats) or state why it is not applicable. Tick the testing checkboxes that were actually performed and fill in the AI Disclosure section if applicable. Address the 'Agent skill upstream boundary' checkbox. Add an explicit 'Why' that states the alternatives considered. Complete the checklist items, including the lint/typecheck/test/build status, and state the platforms tested (macOS, Linux, Windows, SSH).

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c3369b3-9f43-451f-8931-14a3ca73e852
📥 Commits

Reviewing files that changed from the base of the PR and between 385418e and 2eceaed.

📒 Files selected for processing: 74
  • src/main/acp/acp-timeline-fixture.test-support.ts
  • src/main/native-chat/agent-session-journal/command-receipt-schema.spec.ts
  • src/main/native-chat/agent-session-journal/journal-adapter-rest-contract.test.ts
  • src/main/native-chat/agent-session-journal/journal-database-schema.ts
  • src/main/native-chat/agent-session-journal/journal-database.ts
  • src/main/native-chat/agent-session-journal/journal-derived-turn-scope.ts
  • src/main/native-chat/agent-session-journal/journal-dispatch-reducer.ts
  • src/main/native-chat/agent-session-journal/journal-epoch-replacement.ts
  • src/main/native-chat/agent-session-journal/journal-epoch-rollover.ts
  • src/main/native-chat/agent-session-journal/journal-mutation-map.ts
  • src/main/native-chat/agent-session-journal/journal-mutation-stage.ts
  • src/main/native-chat/agent-session-journal/journal-open-turn.test.ts
  • src/main/native-chat/agent-session-journal/journal-reducer.ts
  • src/main/native-chat/agent-session-journal/journal-rest-projection.ts
  • src/main/native-chat/agent-session-journal/journal-rewind-submission-retirement.ts
  • src/main/native-chat/agent-session-journal/journal-row-table.ts
  • src/main/native-chat/agent-session-journal/journal-row-writer.ts
  • src/main/native-chat/agent-session-journal/journal-store-collaborators.ts
  • src/main/native-chat/agent-session-journal/journal-store.ts
  • src/main/native-chat/agent-session-journal/journal-submission-fold.ts
  • src/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-close-verdict.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-conversation-lifetime.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-conversation-open.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-conversations.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-tabs.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-idle-sweep.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-residency.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-residency.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-newer-orca.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-records.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-withdrawal.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-contract.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-progress.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-set.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-wiring.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-reveal.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-shutdown-cut-row.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-listing.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-reconcile-failure.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-child-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-summary.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-task-queue.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-unsent-send-hold.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.ts
  • src/main/runtime/orchestration/structured-mailbox-pointer-host.test.ts
  • src/main/runtime/orchestration/structured-mailbox-pointer-host.ts
  • src/renderer/src/components/NativeChatResumeOnRestartAgentRow.tsx
  • src/renderer/src/components/dashboard/DashboardAgentRow.test.tsx
  • src/renderer/src/components/dashboard/DashboardAgentRow.tsx
  • src/renderer/src/components/native-chat-resume-on-restart-grouping.ts
  • src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
  • src/renderer/src/lib/activity-thread-display.ts
  • src/renderer/src/lib/agent-verdict-status-line.test.ts
  • src/renderer/src/lib/agent-verdict-status-line.ts
  • tests/e2e/structured-chat-owner-status-activation.unit.test.ts
💤 Files with no reviewable changes: 6
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-records.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c63f528a-d7cf-4d5a-9306-64fed9c9304c
Commits

Reviewing files that changed from the base of the PR and between 2eceaed and f085d8f.

Files selected for processing: 154
  • src/main/acp/acp-structured-acquire.ts
  • src/main/acp/acp-structured-background-task-stop.test.ts
  • src/main/acp/acp-structured-child-work-admission.test.ts
  • src/main/acp/acp-structured-child-work-delivery.ts
  • src/main/acp/acp-structured-grok-subagent-recordings.test.ts
  • src/main/acp/acp-structured-host-subagent-stop.test.ts
  • src/main/acp/acp-structured-host.test-support.ts
  • src/main/acp/acp-structured-lane.ts
  • src/main/acp/acp-structured-session-adapter-deps.ts
  • src/main/acp/acp-timeline-grok-subagent-retention.test.ts
  • src/main/agent-hooks/server/server-ingest-structured.ts
  • src/main/claude/claude-structured-child-work-delivery.ts
  • src/main/claude/claude-structured-event-delivery.ts
  • src/main/claude/claude-structured-session-acquisition.ts
  • src/main/claude/claude-structured-session-adapter.ts
  • src/main/claude/claude-structured-session-journal-control.ts
  • src/main/claude/claude-structured-session-state.ts
  • src/main/claude/claude-subagent-permission-request.test.ts
  • src/main/codex/codex-background-task-tracker.ts
  • src/main/codex/codex-background-terminals.test.ts
  • src/main/codex/codex-background-terminals.ts
  • src/main/codex/codex-default-mode-subagents.test.ts
  • src/main/codex/codex-structured-child-work-delivery.ts
  • src/main/codex/codex-structured-dispatch-echo.ts
  • src/main/codex/codex-structured-journal-contracts.ts
  • src/main/codex/codex-structured-notification-retry.ts
  • src/main/codex/codex-structured-session-acquire.ts
  • src/main/codex/codex-structured-session-adapter.ts
  • src/main/codex/codex-structured-session-background-tasks.test.ts
  • src/main/codex/codex-structured-session-close.ts
  • src/main/codex/codex-structured-session-start.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/codex/codex-subagent-interrupts.test.ts
  • src/main/ipc/runtime.test.ts
  • src/main/ipc/runtime.ts
  • src/main/native-chat/agent-session-journal/journal-context-rewind.ts
  • src/main/native-chat/agent-session-journal/journal-current-work-view.ts
  • src/main/native-chat/agent-session-journal/journal-derived-turn-scope.ts
  • src/main/native-chat/agent-session-journal/journal-dispatch-reducer.ts
  • src/main/native-chat/agent-session-journal/journal-epoch-replacement.ts
  • src/main/native-chat/agent-session-journal/journal-epoch-rollover.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.test.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.ts
  • src/main/native-chat/agent-session-journal/journal-lifecycle-batch-appender.ts
  • src/main/native-chat/agent-session-journal/journal-lifecycle-mutation.ts
  • src/main/native-chat/agent-session-journal/journal-open-turn.test.ts
  • src/main/native-chat/agent-session-journal/journal-open.ts
  • src/main/native-chat/agent-session-journal/journal-provider-activity.ts
  • src/main/native-chat/agent-session-journal/journal-reducer.ts
  • src/main/native-chat/agent-session-journal/journal-render-item.ts
  • src/main/native-chat/agent-session-journal/journal-rest-projection-index.ts
  • src/main/native-chat/agent-session-journal/journal-rest-projection.ts
  • src/main/native-chat/agent-session-journal/journal-row-builders.ts
  • src/main/native-chat/agent-session-journal/journal-row-schema.ts
  • src/main/native-chat/agent-session-journal/journal-row-table.ts
  • src/main/native-chat/agent-session-journal/journal-row-unusable-annotations.ts
  • src/main/native-chat/agent-session-journal/journal-row-writer.ts
  • src/main/native-chat/agent-session-journal/journal-settlement-id-retention.ts
  • src/main/native-chat/agent-session-journal/journal-step-writer.ts
  • src/main/native-chat/agent-session-journal/journal-store-collaborators.ts
  • src/main/native-chat/agent-session-journal/journal-store-contracts.ts
  • src/main/native-chat/agent-session-journal/journal-store-restore.ts
  • src/main/native-chat/agent-session-journal/journal-store.ts
  • src/main/native-chat/agent-session-journal/journal-structural-scratch.ts
  • src/main/native-chat/agent-session-journal/journal-submission-fold.ts
  • src/main/native-chat/agent-session-journal/journal-terminal-settlement.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-accepted-child-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-conversation-open.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-dead-generation-settlement.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-delivery-loop.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-event-sink.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-handing-over.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-handover.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-legacy-rest.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-journal-double-test-support.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-open-child-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-registry.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-residency.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-materialize.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-wiring.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-reveal.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-rewind-provenance.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-sink-watermarks.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-listing.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed-deps.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed-restoration.spec.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-summary-equality.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-summary.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-subagent-rows.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-transition.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-transition.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-unfinished-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-workspace-sleep.ts
  • src/main/native-chat/agent-session-wire/structured-rewind-cut.ts
  • src/main/runtime/construction/runtime-identity-state.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/orchestration/structured-mailbox-pointer-host.test.ts
  • src/main/runtime/orchestration/structured-mailbox-pointer-host.ts
  • src/main/runtime/orchestration/structured-worker-group-addressing.test.ts
  • src/main/runtime/rpc/dispatcher-transport-parity.test.ts
  • src/main/runtime/rpc/dispatcher.ts
  • src/main/runtime/rpc/methods/orchestration/messaging/send-group.ts
  • src/main/runtime/runtime-worktree-agent-rows.ts
  • src/main/runtime/runtime-worktree-agent-source.ts
  • src/main/runtime/session-graph/session-graph-authority.ts
  • src/main/runtime/session-graph/session-graph-promotion.ts
  • src/main/runtime/session-graph/session-graph-reload-lifecycle.ts
  • src/main/runtime/session-graph/session-window-graph.ts
  • src/main/runtime/structured-agent-runtime-registrations.ts
  • src/main/runtime/terminal/stop/hook-status-resume-records.ts
  • src/main/startup/main-process-runtime-launch-activation.test.ts
  • src/main/startup/main-process-runtime-launch.ts
  • src/renderer/src/app-shell/use-runtime-graph-sync.ts
  • src/renderer/src/components/dashboard/agent-finished-timestamp.ts
  • src/renderer/src/components/dashboard/useRetainedAgents.ts
  • src/renderer/src/runtime/sync-runtime-graph-scheduling.test.ts
  • src/renderer/src/runtime/sync-runtime-graph.ts
  • src/renderer/src/runtime/sync-runtime-graph/graph-publication.ts
  • src/renderer/src/runtime/sync-runtime-graph/graph-state.ts
  • src/renderer/src/store/slices/agent-status-drop-actions.ts
  • src/renderer/src/store/slices/agent-status-live-entry-builder.ts
  • src/renderer/src/store/slices/agent-status-recovery-collection.ts
  • src/renderer/src/store/slices/agent-status-worktree-drop-actions.ts
  • src/shared/agent-completion-time.ts
  • src/shared/agent-main-agent-verdict.ts
  • src/shared/agent-resume-record-equivalence.ts
  • src/shared/agent-resume-record-from-status.ts
  • src/shared/agent-session-journal-body-admission.ts
  • src/shared/agent-session-journal-schemas.ts
  • src/shared/agent-session-journal-types.ts
  • src/shared/agent-session-resume.ts
  • src/shared/agent-session-semantic-work.ts
  • src/shared/agent-session-wire.ts
  • src/shared/agent-state-history.ts
  • src/shared/agent-status-types.ts
  • src/shared/agent-transitions.ts
  • src/shared/runtime-session-contracts.ts
  • src/shared/runtime-worktree-contracts.ts
  • src/shared/sidebar-list/smart-attention-host-observed-end.test.ts
  • src/shared/sidebar-list/smart-attention.ts
  • src/shared/structured-agent-session-projection.ts
  • src/shared/workspace-layout/workspace-layout-disk-fields.ts
  • src/shared/workspace-session-sleeping-agents.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/main/runtime/rpc/dispatcher.ts Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 55f42dd2-7bd9-40d2-9c7f-74b438342785
Commits

Reviewing files that changed from the base of the PR and between c321441 and 77419e5.

Files selected for processing: 30
  • src/main/claude/claude-structured-event-delivery.ts
  • src/main/claude/claude-structured-exit-durability.test.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.test.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.ts
  • src/main/native-chat/agent-session-journal/journal-rest-projection-index.ts
  • src/main/native-chat/agent-session-journal/journal-structural-scratch.ts
  • src/main/native-chat/agent-session-journal/journal-work-bucket.test.ts
  • src/main/native-chat/agent-session-journal/journal-work-bucket.ts
  • src/main/native-chat/agent-session-journal/journal-work-index-flow.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-close-verdict.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-current-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-legacy-rest.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-legacy-candidates.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-r3-recovery.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-summary.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.ts
  • src/main/runtime/agent-session-record-store.ts
  • src/main/runtime/claude-structured-session-integration.test.ts
  • src/main/runtime/rpc/dispatcher-journal-background.test.ts
  • src/main/runtime/rpc/dispatcher.ts
  • src/renderer/src/components/dashboard/DashboardAgentRow.tsx
  • src/renderer/src/store/slices/agent-status-worktree-drop-actions.ts
  • src/renderer/src/store/slices/store-sleep-agent-status-retention.test.ts
Files skipped from review as they are similar to previous changes: 1
  • src/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c130d558-f1bd-4377-9fc5-ecbf336695d7
Commits

Reviewing files that changed from the base of the PR and between 77419e5 and bcf0c00.

Files selected for processing: 178
  • src/main/acp/acp-structured-acquire.ts
  • src/main/acp/acp-structured-background-task-stop.test.ts
  • src/main/acp/acp-structured-child-work-admission.test.ts
  • src/main/acp/acp-structured-grok-subagent-recordings.test.ts
  • src/main/acp/acp-structured-host.test-support.ts
  • src/main/acp/acp-structured-lane-deps.ts
  • src/main/acp/acp-structured-lane.ts
  • src/main/acp/acp-structured-session-adapter-deps.ts
  • src/main/acp/acp-timeline-fixture.test-support.ts
  • src/main/acp/acp-timeline-grok-subagent-retention.test.ts
  • src/main/agent-hooks/server/server-ingest-structured.ts
  • src/main/claude/claude-structured-acquisition-launch.ts
  • src/main/claude/claude-structured-event-delivery.ts
  • src/main/claude/claude-structured-session-acquisition.ts
  • src/main/claude/claude-structured-session-adapter.ts
  • src/main/claude/claude-structured-session-journal-control.ts
  • src/main/claude/claude-structured-session-state.ts
  • src/main/claude/claude-subagent-permission-request.test.ts
  • src/main/codex/codex-background-task-tracker.ts
  • src/main/codex/codex-background-terminals.test.ts
  • src/main/codex/codex-background-terminals.ts
  • src/main/codex/codex-default-mode-subagents.test.ts
  • src/main/codex/codex-structured-dispatch-echo.ts
  • src/main/codex/codex-structured-journal-contracts.ts
  • src/main/codex/codex-structured-journal-translation-turn-lifecycle.test.ts
  • src/main/codex/codex-structured-notification-retry.ts
  • src/main/codex/codex-structured-session-acquire.ts
  • src/main/codex/codex-structured-session-adapter.ts
  • src/main/codex/codex-structured-session-background-tasks.test.ts
  • src/main/codex/codex-structured-session-close.ts
  • src/main/codex/codex-structured-session-start.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/codex/codex-subagent-interrupts.test.ts
  • src/main/ipc/runtime.ts
  • src/main/native-chat/agent-session-journal/journal-context-rewind.ts
  • src/main/native-chat/agent-session-journal/journal-database-schema.ts
  • src/main/native-chat/agent-session-journal/journal-database.ts
  • src/main/native-chat/agent-session-journal/journal-derived-turn-scope.ts
  • src/main/native-chat/agent-session-journal/journal-dispatch-reducer.ts
  • src/main/native-chat/agent-session-journal/journal-display-overlay.ts
  • src/main/native-chat/agent-session-journal/journal-epoch-replacement.ts
  • src/main/native-chat/agent-session-journal/journal-epoch-rollover.ts
  • src/main/native-chat/agent-session-journal/journal-item-resolution.ts
  • src/main/native-chat/agent-session-journal/journal-item-selection.ts
  • src/main/native-chat/agent-session-journal/journal-keyed-heap.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-dependencies.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-display-corrections.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-queue-classification.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.test.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.ts
  • src/main/native-chat/agent-session-journal/journal-lifecycle-batch-appender.ts
  • src/main/native-chat/agent-session-journal/journal-lifecycle-mutation.ts
  • src/main/native-chat/agent-session-journal/journal-mutation-map.ts
  • src/main/native-chat/agent-session-journal/journal-mutation-set.ts
  • src/main/native-chat/agent-session-journal/journal-mutation-stage.ts
  • src/main/native-chat/agent-session-journal/journal-open.ts
  • src/main/native-chat/agent-session-journal/journal-population-bounds-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-cost-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-flow-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-legacy-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-meter-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-owner-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-queue-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-retained-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-retirement-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-selection-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-shared-legacy-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-sql-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-stage-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-upgrade-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-work-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-population-wrapper-test-support.ts
  • src/main/native-chat/agent-session-journal/journal-provider-activity.ts
  • src/main/native-chat/agent-session-journal/journal-public-read.ts
  • src/main/native-chat/agent-session-journal/journal-queue-fold.ts
  • src/main/native-chat/agent-session-journal/journal-queue-import.ts
  • src/main/native-chat/agent-session-journal/journal-queue-selection.ts
  • src/main/native-chat/agent-session-journal/journal-queued-hand-off-display.ts
  • src/main/native-chat/agent-session-journal/journal-queued-messages.ts
  • src/main/native-chat/agent-session-journal/journal-reducer-state.ts
  • src/main/native-chat/agent-session-journal/journal-reducer.ts
  • src/main/native-chat/agent-session-journal/journal-render-item.ts
  • src/main/native-chat/agent-session-journal/journal-rest-observation.ts
  • src/main/native-chat/agent-session-journal/journal-rest-projection-index.ts
  • src/main/native-chat/agent-session-journal/journal-rest-projection.ts
  • src/main/native-chat/agent-session-journal/journal-rest-work-projection.ts
  • src/main/native-chat/agent-session-journal/journal-rewind-submission-retirement.ts
  • src/main/native-chat/agent-session-journal/journal-row-builders.ts
  • src/main/native-chat/agent-session-journal/journal-row-schema.ts
  • src/main/native-chat/agent-session-journal/journal-row-table.ts
  • src/main/native-chat/agent-session-journal/journal-row-unusable-annotations.ts
  • src/main/native-chat/agent-session-journal/journal-row-writer.ts
  • src/main/native-chat/agent-session-journal/journal-selection-binding.ts
  • src/main/native-chat/agent-session-journal/journal-selection-groups.ts
  • src/main/native-chat/agent-session-journal/journal-selection-order.ts
  • src/main/native-chat/agent-session-journal/journal-selection-storage.ts
  • src/main/native-chat/agent-session-journal/journal-selection-tree.ts
  • src/main/native-chat/agent-session-journal/journal-selection.ts
  • src/main/native-chat/agent-session-journal/journal-source-reads.ts
  • src/main/native-chat/agent-session-journal/journal-step-writer.ts
  • src/main/native-chat/agent-session-journal/journal-store-collaborators.ts
  • src/main/native-chat/agent-session-journal/journal-store-contracts.ts
  • src/main/native-chat/agent-session-journal/journal-store-restore.ts
  • src/main/native-chat/agent-session-journal/journal-store.ts
  • src/main/native-chat/agent-session-journal/journal-structural-fold-step.ts
  • src/main/native-chat/agent-session-journal/journal-structural-scratch.ts
  • src/main/native-chat/agent-session-journal/journal-submission-fold.ts
  • src/main/native-chat/agent-session-journal/journal-terminal-settlement.ts
  • src/main/native-chat/agent-session-journal/journal-work-bucket.ts
  • src/main/native-chat/agent-session-journal/journal-work-index-flow.test.ts
  • src/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-close-verdict.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-command-turn.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-conversation-lifetime.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-conversation-open.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-conversations.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-current-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-dead-generation-settlement.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-delivery-loop.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-event-sink.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-handing-over.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-handover.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-legacy-rest.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-tabs.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-idle-sweep.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-journal-double-test-support.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-open-child-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-r3-recovery.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-registry.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-request-failures.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-newer-orca.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-records.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-withdrawal.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-contract.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-set.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-wiring.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-reveal.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-rewind-provenance.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-shutdown-cut-row.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-listing.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-reconcile-failure.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-child-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed-deps.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-summary-equality.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-summary.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-subagent-rows.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-transition.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-transition.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-unfinished-work.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-unsent-send-hold.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-workspace-sleep.ts
  • src/main/native-chat/agent-session-wire/structured-rewind-cut.ts
  • src/main/runtime/orca-runtime.ts
  • src/renderer/src/components/dashboard/DashboardAgentRow.test.tsx
  • src/renderer/src/components/dashboard/DashboardAgentRow.tsx
  • src/renderer/src/lib/agent-verdict-status-line.test.ts
  • src/shared/agent-session-journal-position.ts
  • src/shared/agent-session-journal-types.ts
Files with no reviewable changes: 4
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-read-restore.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the last review appear safe to merge; no new blocking issue was found.

Summary

Orca now restores chat lists and saved turn results without opening every chat’s history.

  • Chat lists show each turn’s saved result without opening its history.
  • Opening a chat loads its history; passive lists no longer do.
  • Older profiles keep their selected chats when the tab index is first saved.
  • The added tests cover saved chat status and startup tab behavior.

No new actionable issues were found in the changes since the last review. Tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Chat record] --> B[Startup tab list and saved status]
  C[User opens chat] --> D[Read history and recover]
  D --> E[Publish current status]
  E --> F[Save latest turn]
  F --> A
  G[Quit] --> H[Drain pending status writes]
  H --> I[Close database]
Loading

Reviews (14) · Last reviewed commit: "Check restore fixture contracts and reco..." · Reviewed by Greptile

Brennan 10-28: startup never reads chat history to learn status; the prior
open-turn journal fact, exactness machinery and legacy classification pass
are dropped. This merge takes main's tree; the new design follows.
@brennanb2025

brennanb2025 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Orca previously opened and replayed every listed chat history during startup just to recover status. Large profiles could freeze or exhaust memory. This change saves the latest-turn result at actual turn edges, lists chats from saved records, and reads a chat's history when it is opened. Active turns at normal quit and a user's Stop show Interrupted; successful turns show Done, real failures show Failed, and never-run chats stay neutral.

The full review completed six v2 rounds after the design was re-cut under the 10-28 ruling. The final panel unanimously kept the saved-status design and the captured-complete-base tab-authority repair. Fixes cover unexpected-stop settlement, scoped quit/Stop classification, repeated roster work, and startup create/close races; test fixtures and compiler contracts were repaired without weakening their assertions. The four whole-mechanism reference notes are pinned fresh. The new recorded Codex test and exact erased-type completion are independently verified at the reviewed head.

Verified on the admitted lifecycle QA head 26c4719 with real Claude and Codex: previous-build graceful upgrade and preserved histories, two sends/two real replies for each carried fixture, new-build saved Interrupted/Done/neutral statuses, sleep retention, Stop, close and same-ID Session History reopen, unexpected-stop recovery with a real subsequent reply, and standalone server first-client list/status plus real replies from both agents; server restart list/status again had zero passive opens. Passive startup diagnostics opened zero journals; demand opened only the requested chat. The independent audit accepted the underlying 18 drive receipts and scoped benchmark results. The final report revision d55db80f… is unchanged; the QA lead finished, all recorded owned processes stopped, four real-config hashes stayed unchanged and admission 3231 was released.

A genuine Claude kept card survived the previous-build upgrade, stayed unsent and delivered deliberately with two real replies. The previous build's explicit paused-card capability is hidden. Codex kept-card: no reliable public flow reaches it; covered by a test with recorded Codex state. This is not a Codex card UI or binary-upgrade pass. The test uses original recorded rows and production startup/demand/physical reload/manual-dispatch paths. Crash tests had no surviving provider/tool process, so the live-orphan branch is covered by existing deterministic production-path tests, not claimed as a real-run pass.

The accepted serial benchmark used the same sealed 724-journal profile (1,782,504 rows, 4.78 GB JSON), incoming main f245dc7 versus 26c4719. Over the first 180 seconds, main-process CPU was 21.02–21.09 s versus 4.24–4.25 s, and sampled main-process peak RSS was 3,394.98 versus 412.63 MiB. Descendant-sum peaks were 4,456.70 versus 1,463.92 MiB (shared pages may be counted twice). Sampling began about 3.17 s after launch. Separate opener diagnostics measured 724 passive journal opens on main and zero on the branch through 188.65 s.

Observed interaction upper bounds were 32.33 s versus 22.15 s, including late driver attachment; these do not measure earliest interaction or establish a latency speedup ratio. Opening the visible chat was measured separately. A mistaken hidden-region predicate left the baseline's full-history timing incomplete, so the branch's 1,506 ms history/composer/paint diagnostic is not a comparable ratio. One contaminated baseline overlapped a hook; it was excluded and only the baseline was repeated cleanly. An initial setup command incorrectly invoked a nested typecheck; it was stopped, audited and replaced by the corrected admitted build path. Neither failed setup nor contaminated timing is pass evidence.

Intended limits: old records without last-turn data remain neutral unless their existing cutoff hint supplies Interrupted, until demand-open; a crash can leave stale status. Full-history demand opening (STA-11976), compaction (#34916), a write-queue cap (STA-10949) and unrelated earlier retry/delivery changes remain deferred. The optional legacy-base API default is a deferred P3; all current callers supply it. No open P0/P1 remains. CI is green on the reviewed head (PR checks, WSL compatibility); the PR is non-draft, mergeable and CLEAN, with 0 unresolved review threads.

QA carry: runtime QA and benchmark ran on 26c4719 after the once-only main merge bb109e0. a2543b6,5035b388b4d8,b5a835366e7c change test fixtures/clock usage/mocks/imports. ae4fc4f adds a recorded-state test, corrects two checked test callbacks and changes only an erased internal forwarder type to match its existing callee contract. It changes no executable production expression or run-row flow. Latest-head review and CI cover this compiler-contract correction; QA remains attributed to its actual head.

For Brennan's review:

Flow Evidence
Graceful restart / Interrupted Previous build · Branch
Sleep and preserved history Previous build · Branch
Ordinary open / two real replies Branch
Saved Done Branch
Never-run neutral Branch
Kept Claude card Previous build · Branch
Deliberate card delivery / two replies Branch
Stop → Interrupted Branch
Session History same-ID reopen Branch
Crash recovery / Claude Branch
Crash recovery / Codex Branch
Accepted passive benchmark at180s Previous build · Branch

Three code boundaries worth checking:

Full-window QA screenshots

Previous build: real active-turn fixture

Branch: saved Interrupted after normal quit

Branch: saved Done

Branch: never-run neutral

Previous build: slept workspace fixture

Branch: preserved slept history

Branch: two real replies after opening carried history

Previous build: genuine Claude kept-card fixture

Branch: same kept card on open

Branch: deliberate kept-card delivery and two replies

Branch: user Stop reads Interrupted

Branch: same conversation reopened through Session History

Branch: Claude crash recovery and real reply

Branch: Codex crash recovery and real reply

Main: accepted passive benchmark at about180seconds

Branch: accepted passive benchmark at about180seconds

@brennanb2025
brennanb2025 merged commit 641e479 into main Oct 29, 2026
57 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/startup-chat-restore branch October 29, 2026 17:24
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.

2 participants