Repository navigation
Startup shows chats as Interrupted or Done without reading their history - #32146
Conversation
…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.
|
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:
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
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
📒 Files selected for processing: 74
src/main/acp/acp-timeline-fixture.test-support.tssrc/main/native-chat/agent-session-journal/command-receipt-schema.spec.tssrc/main/native-chat/agent-session-journal/journal-adapter-rest-contract.test.tssrc/main/native-chat/agent-session-journal/journal-database-schema.tssrc/main/native-chat/agent-session-journal/journal-database.tssrc/main/native-chat/agent-session-journal/journal-derived-turn-scope.tssrc/main/native-chat/agent-session-journal/journal-dispatch-reducer.tssrc/main/native-chat/agent-session-journal/journal-epoch-replacement.tssrc/main/native-chat/agent-session-journal/journal-epoch-rollover.tssrc/main/native-chat/agent-session-journal/journal-mutation-map.tssrc/main/native-chat/agent-session-journal/journal-mutation-stage.tssrc/main/native-chat/agent-session-journal/journal-open-turn.test.tssrc/main/native-chat/agent-session-journal/journal-reducer.tssrc/main/native-chat/agent-session-journal/journal-rest-projection.tssrc/main/native-chat/agent-session-journal/journal-rewind-submission-retirement.tssrc/main/native-chat/agent-session-journal/journal-row-table.tssrc/main/native-chat/agent-session-journal/journal-row-writer.tssrc/main/native-chat/agent-session-journal/journal-store-collaborators.tssrc/main/native-chat/agent-session-journal/journal-store.tssrc/main/native-chat/agent-session-journal/journal-submission-fold.tssrc/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.tssrc/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-close-verdict.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-conversation-lifetime.tssrc/main/native-chat/agent-session-wire/structured-agent-session-conversation-open.tssrc/main/native-chat/agent-session-wire/structured-agent-session-conversations.tssrc/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-tabs.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-types.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-idle-sweep.tssrc/main/native-chat/agent-session-wire/structured-agent-session-read-restore.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-read-restore.tssrc/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.tssrc/main/native-chat/agent-session-wire/structured-agent-session-residency.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-residency.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-newer-orca.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-records.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-withdrawal.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-contract.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-progress.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-set.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-wiring.tssrc/main/native-chat/agent-session-wire/structured-agent-session-reveal.tssrc/main/native-chat/agent-session-wire/structured-agent-session-shutdown-cut-row.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-listing.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-reconcile-failure.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-child-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-summary.tssrc/main/native-chat/agent-session-wire/structured-agent-session-task-queue.tssrc/main/native-chat/agent-session-wire/structured-agent-session-unsent-send-hold.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.tssrc/main/runtime/orchestration/structured-mailbox-pointer-host.test.tssrc/main/runtime/orchestration/structured-mailbox-pointer-host.tssrc/renderer/src/components/NativeChatResumeOnRestartAgentRow.tsxsrc/renderer/src/components/dashboard/DashboardAgentRow.test.tsxsrc/renderer/src/components/dashboard/DashboardAgentRow.tsxsrc/renderer/src/components/native-chat-resume-on-restart-grouping.tssrc/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsxsrc/renderer/src/lib/activity-thread-display.tssrc/renderer/src/lib/agent-verdict-status-line.test.tssrc/renderer/src/lib/agent-verdict-status-line.tstests/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.
There was a problem hiding this comment.
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
Files selected for processing: 154-
src/main/acp/acp-structured-acquire.tssrc/main/acp/acp-structured-background-task-stop.test.tssrc/main/acp/acp-structured-child-work-admission.test.tssrc/main/acp/acp-structured-child-work-delivery.tssrc/main/acp/acp-structured-grok-subagent-recordings.test.tssrc/main/acp/acp-structured-host-subagent-stop.test.tssrc/main/acp/acp-structured-host.test-support.tssrc/main/acp/acp-structured-lane.tssrc/main/acp/acp-structured-session-adapter-deps.tssrc/main/acp/acp-timeline-grok-subagent-retention.test.tssrc/main/agent-hooks/server/server-ingest-structured.tssrc/main/claude/claude-structured-child-work-delivery.tssrc/main/claude/claude-structured-event-delivery.tssrc/main/claude/claude-structured-session-acquisition.tssrc/main/claude/claude-structured-session-adapter.tssrc/main/claude/claude-structured-session-journal-control.tssrc/main/claude/claude-structured-session-state.tssrc/main/claude/claude-subagent-permission-request.test.tssrc/main/codex/codex-background-task-tracker.tssrc/main/codex/codex-background-terminals.test.tssrc/main/codex/codex-background-terminals.tssrc/main/codex/codex-default-mode-subagents.test.tssrc/main/codex/codex-structured-child-work-delivery.tssrc/main/codex/codex-structured-dispatch-echo.tssrc/main/codex/codex-structured-journal-contracts.tssrc/main/codex/codex-structured-notification-retry.tssrc/main/codex/codex-structured-session-acquire.tssrc/main/codex/codex-structured-session-adapter.tssrc/main/codex/codex-structured-session-background-tasks.test.tssrc/main/codex/codex-structured-session-close.tssrc/main/codex/codex-structured-session-start.tssrc/main/codex/codex-structured-session-state.tssrc/main/codex/codex-subagent-interrupts.test.tssrc/main/ipc/runtime.test.tssrc/main/ipc/runtime.tssrc/main/native-chat/agent-session-journal/journal-context-rewind.tssrc/main/native-chat/agent-session-journal/journal-current-work-view.tssrc/main/native-chat/agent-session-journal/journal-derived-turn-scope.tssrc/main/native-chat/agent-session-journal/journal-dispatch-reducer.tssrc/main/native-chat/agent-session-journal/journal-epoch-replacement.tssrc/main/native-chat/agent-session-journal/journal-epoch-rollover.tssrc/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.test.tssrc/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.tssrc/main/native-chat/agent-session-journal/journal-lifecycle-batch-appender.tssrc/main/native-chat/agent-session-journal/journal-lifecycle-mutation.tssrc/main/native-chat/agent-session-journal/journal-open-turn.test.tssrc/main/native-chat/agent-session-journal/journal-open.tssrc/main/native-chat/agent-session-journal/journal-provider-activity.tssrc/main/native-chat/agent-session-journal/journal-reducer.tssrc/main/native-chat/agent-session-journal/journal-render-item.tssrc/main/native-chat/agent-session-journal/journal-rest-projection-index.tssrc/main/native-chat/agent-session-journal/journal-rest-projection.tssrc/main/native-chat/agent-session-journal/journal-row-builders.tssrc/main/native-chat/agent-session-journal/journal-row-schema.tssrc/main/native-chat/agent-session-journal/journal-row-table.tssrc/main/native-chat/agent-session-journal/journal-row-unusable-annotations.tssrc/main/native-chat/agent-session-journal/journal-row-writer.tssrc/main/native-chat/agent-session-journal/journal-settlement-id-retention.tssrc/main/native-chat/agent-session-journal/journal-step-writer.tssrc/main/native-chat/agent-session-journal/journal-store-collaborators.tssrc/main/native-chat/agent-session-journal/journal-store-contracts.tssrc/main/native-chat/agent-session-journal/journal-store-restore.tssrc/main/native-chat/agent-session-journal/journal-store.tssrc/main/native-chat/agent-session-journal/journal-structural-scratch.tssrc/main/native-chat/agent-session-journal/journal-submission-fold.tssrc/main/native-chat/agent-session-journal/journal-terminal-settlement.tssrc/main/native-chat/agent-session-wire/structured-agent-session-accepted-child-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-conversation-open.tssrc/main/native-chat/agent-session-wire/structured-agent-session-dead-generation-settlement.tssrc/main/native-chat/agent-session-wire/structured-agent-session-delivery-loop.tssrc/main/native-chat/agent-session-wire/structured-agent-session-event-sink.tssrc/main/native-chat/agent-session-wire/structured-agent-session-handing-over.tssrc/main/native-chat/agent-session-wire/structured-agent-session-handover.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-legacy-rest.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-journal-double-test-support.tssrc/main/native-chat/agent-session-wire/structured-agent-session-open-child-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-registry.tssrc/main/native-chat/agent-session-wire/structured-agent-session-residency.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-materialize.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-wiring.tssrc/main/native-chat/agent-session-wire/structured-agent-session-reveal.tssrc/main/native-chat/agent-session-wire/structured-agent-session-rewind-provenance.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-sink-watermarks.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-listing.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed-deps.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed-restoration.spec.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-summary-equality.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-summary.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-subagent-rows.tssrc/main/native-chat/agent-session-wire/structured-agent-session-transition.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-transition.tssrc/main/native-chat/agent-session-wire/structured-agent-session-unfinished-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-workspace-sleep.tssrc/main/native-chat/agent-session-wire/structured-rewind-cut.tssrc/main/runtime/construction/runtime-identity-state.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/orchestration/structured-mailbox-pointer-host.test.tssrc/main/runtime/orchestration/structured-mailbox-pointer-host.tssrc/main/runtime/orchestration/structured-worker-group-addressing.test.tssrc/main/runtime/rpc/dispatcher-transport-parity.test.tssrc/main/runtime/rpc/dispatcher.tssrc/main/runtime/rpc/methods/orchestration/messaging/send-group.tssrc/main/runtime/runtime-worktree-agent-rows.tssrc/main/runtime/runtime-worktree-agent-source.tssrc/main/runtime/session-graph/session-graph-authority.tssrc/main/runtime/session-graph/session-graph-promotion.tssrc/main/runtime/session-graph/session-graph-reload-lifecycle.tssrc/main/runtime/session-graph/session-window-graph.tssrc/main/runtime/structured-agent-runtime-registrations.tssrc/main/runtime/terminal/stop/hook-status-resume-records.tssrc/main/startup/main-process-runtime-launch-activation.test.tssrc/main/startup/main-process-runtime-launch.tssrc/renderer/src/app-shell/use-runtime-graph-sync.tssrc/renderer/src/components/dashboard/agent-finished-timestamp.tssrc/renderer/src/components/dashboard/useRetainedAgents.tssrc/renderer/src/runtime/sync-runtime-graph-scheduling.test.tssrc/renderer/src/runtime/sync-runtime-graph.tssrc/renderer/src/runtime/sync-runtime-graph/graph-publication.tssrc/renderer/src/runtime/sync-runtime-graph/graph-state.tssrc/renderer/src/store/slices/agent-status-drop-actions.tssrc/renderer/src/store/slices/agent-status-live-entry-builder.tssrc/renderer/src/store/slices/agent-status-recovery-collection.tssrc/renderer/src/store/slices/agent-status-worktree-drop-actions.tssrc/shared/agent-completion-time.tssrc/shared/agent-main-agent-verdict.tssrc/shared/agent-resume-record-equivalence.tssrc/shared/agent-resume-record-from-status.tssrc/shared/agent-session-journal-body-admission.tssrc/shared/agent-session-journal-schemas.tssrc/shared/agent-session-journal-types.tssrc/shared/agent-session-resume.tssrc/shared/agent-session-semantic-work.tssrc/shared/agent-session-wire.tssrc/shared/agent-state-history.tssrc/shared/agent-status-types.tssrc/shared/agent-transitions.tssrc/shared/runtime-session-contracts.tssrc/shared/runtime-worktree-contracts.tssrc/shared/sidebar-list/smart-attention-host-observed-end.test.tssrc/shared/sidebar-list/smart-attention.tssrc/shared/structured-agent-session-projection.tssrc/shared/workspace-layout/workspace-layout-disk-fields.tssrc/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.
-
There was a problem hiding this comment.
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
Files selected for processing: 30-
src/main/claude/claude-structured-event-delivery.tssrc/main/claude/claude-structured-exit-durability.test.tssrc/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.test.tssrc/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.tssrc/main/native-chat/agent-session-journal/journal-rest-projection-index.tssrc/main/native-chat/agent-session-journal/journal-structural-scratch.tssrc/main/native-chat/agent-session-journal/journal-work-bucket.test.tssrc/main/native-chat/agent-session-journal/journal-work-bucket.tssrc/main/native-chat/agent-session-journal/journal-work-index-flow.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-close-verdict.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-current-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-legacy-rest.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-legacy-candidates.tssrc/main/native-chat/agent-session-wire/structured-agent-session-r3-recovery.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.tssrc/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-summary.tssrc/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.tssrc/main/runtime/agent-session-record-store.tssrc/main/runtime/claude-structured-session-integration.test.tssrc/main/runtime/rpc/dispatcher-journal-background.test.tssrc/main/runtime/rpc/dispatcher.tssrc/renderer/src/components/dashboard/DashboardAgentRow.tsxsrc/renderer/src/store/slices/agent-status-worktree-drop-actions.tssrc/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.
-
There was a problem hiding this comment.
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
Files selected for processing: 178-
src/main/acp/acp-structured-acquire.tssrc/main/acp/acp-structured-background-task-stop.test.tssrc/main/acp/acp-structured-child-work-admission.test.tssrc/main/acp/acp-structured-grok-subagent-recordings.test.tssrc/main/acp/acp-structured-host.test-support.tssrc/main/acp/acp-structured-lane-deps.tssrc/main/acp/acp-structured-lane.tssrc/main/acp/acp-structured-session-adapter-deps.tssrc/main/acp/acp-timeline-fixture.test-support.tssrc/main/acp/acp-timeline-grok-subagent-retention.test.tssrc/main/agent-hooks/server/server-ingest-structured.tssrc/main/claude/claude-structured-acquisition-launch.tssrc/main/claude/claude-structured-event-delivery.tssrc/main/claude/claude-structured-session-acquisition.tssrc/main/claude/claude-structured-session-adapter.tssrc/main/claude/claude-structured-session-journal-control.tssrc/main/claude/claude-structured-session-state.tssrc/main/claude/claude-subagent-permission-request.test.tssrc/main/codex/codex-background-task-tracker.tssrc/main/codex/codex-background-terminals.test.tssrc/main/codex/codex-background-terminals.tssrc/main/codex/codex-default-mode-subagents.test.tssrc/main/codex/codex-structured-dispatch-echo.tssrc/main/codex/codex-structured-journal-contracts.tssrc/main/codex/codex-structured-journal-translation-turn-lifecycle.test.tssrc/main/codex/codex-structured-notification-retry.tssrc/main/codex/codex-structured-session-acquire.tssrc/main/codex/codex-structured-session-adapter.tssrc/main/codex/codex-structured-session-background-tasks.test.tssrc/main/codex/codex-structured-session-close.tssrc/main/codex/codex-structured-session-start.tssrc/main/codex/codex-structured-session-state.tssrc/main/codex/codex-subagent-interrupts.test.tssrc/main/ipc/runtime.tssrc/main/native-chat/agent-session-journal/journal-context-rewind.tssrc/main/native-chat/agent-session-journal/journal-database-schema.tssrc/main/native-chat/agent-session-journal/journal-database.tssrc/main/native-chat/agent-session-journal/journal-derived-turn-scope.tssrc/main/native-chat/agent-session-journal/journal-dispatch-reducer.tssrc/main/native-chat/agent-session-journal/journal-display-overlay.tssrc/main/native-chat/agent-session-journal/journal-epoch-replacement.tssrc/main/native-chat/agent-session-journal/journal-epoch-rollover.tssrc/main/native-chat/agent-session-journal/journal-item-resolution.tssrc/main/native-chat/agent-session-journal/journal-item-selection.tssrc/main/native-chat/agent-session-journal/journal-keyed-heap.tssrc/main/native-chat/agent-session-journal/journal-legacy-dependencies.tssrc/main/native-chat/agent-session-journal/journal-legacy-display-corrections.tssrc/main/native-chat/agent-session-journal/journal-legacy-queue-classification.tssrc/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.test.tssrc/main/native-chat/agent-session-journal/journal-legacy-rest-initializer.tssrc/main/native-chat/agent-session-journal/journal-lifecycle-batch-appender.tssrc/main/native-chat/agent-session-journal/journal-lifecycle-mutation.tssrc/main/native-chat/agent-session-journal/journal-mutation-map.tssrc/main/native-chat/agent-session-journal/journal-mutation-set.tssrc/main/native-chat/agent-session-journal/journal-mutation-stage.tssrc/main/native-chat/agent-session-journal/journal-open.tssrc/main/native-chat/agent-session-journal/journal-population-bounds-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-cost-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-flow-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-legacy-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-meter-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-owner-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-queue-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-retained-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-retirement-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-selection-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-shared-legacy-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-sql-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-stage-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-upgrade-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-work-test-support.tssrc/main/native-chat/agent-session-journal/journal-population-wrapper-test-support.tssrc/main/native-chat/agent-session-journal/journal-provider-activity.tssrc/main/native-chat/agent-session-journal/journal-public-read.tssrc/main/native-chat/agent-session-journal/journal-queue-fold.tssrc/main/native-chat/agent-session-journal/journal-queue-import.tssrc/main/native-chat/agent-session-journal/journal-queue-selection.tssrc/main/native-chat/agent-session-journal/journal-queued-hand-off-display.tssrc/main/native-chat/agent-session-journal/journal-queued-messages.tssrc/main/native-chat/agent-session-journal/journal-reducer-state.tssrc/main/native-chat/agent-session-journal/journal-reducer.tssrc/main/native-chat/agent-session-journal/journal-render-item.tssrc/main/native-chat/agent-session-journal/journal-rest-observation.tssrc/main/native-chat/agent-session-journal/journal-rest-projection-index.tssrc/main/native-chat/agent-session-journal/journal-rest-projection.tssrc/main/native-chat/agent-session-journal/journal-rest-work-projection.tssrc/main/native-chat/agent-session-journal/journal-rewind-submission-retirement.tssrc/main/native-chat/agent-session-journal/journal-row-builders.tssrc/main/native-chat/agent-session-journal/journal-row-schema.tssrc/main/native-chat/agent-session-journal/journal-row-table.tssrc/main/native-chat/agent-session-journal/journal-row-unusable-annotations.tssrc/main/native-chat/agent-session-journal/journal-row-writer.tssrc/main/native-chat/agent-session-journal/journal-selection-binding.tssrc/main/native-chat/agent-session-journal/journal-selection-groups.tssrc/main/native-chat/agent-session-journal/journal-selection-order.tssrc/main/native-chat/agent-session-journal/journal-selection-storage.tssrc/main/native-chat/agent-session-journal/journal-selection-tree.tssrc/main/native-chat/agent-session-journal/journal-selection.tssrc/main/native-chat/agent-session-journal/journal-source-reads.tssrc/main/native-chat/agent-session-journal/journal-step-writer.tssrc/main/native-chat/agent-session-journal/journal-store-collaborators.tssrc/main/native-chat/agent-session-journal/journal-store-contracts.tssrc/main/native-chat/agent-session-journal/journal-store-restore.tssrc/main/native-chat/agent-session-journal/journal-store.tssrc/main/native-chat/agent-session-journal/journal-structural-fold-step.tssrc/main/native-chat/agent-session-journal/journal-structural-scratch.tssrc/main/native-chat/agent-session-journal/journal-submission-fold.tssrc/main/native-chat/agent-session-journal/journal-terminal-settlement.tssrc/main/native-chat/agent-session-journal/journal-work-bucket.tssrc/main/native-chat/agent-session-journal/journal-work-index-flow.test.tssrc/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.tssrc/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-close-verdict.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-command-turn.tssrc/main/native-chat/agent-session-wire/structured-agent-session-conversation-lifetime.tssrc/main/native-chat/agent-session-wire/structured-agent-session-conversation-open.tssrc/main/native-chat/agent-session-wire/structured-agent-session-conversations.tssrc/main/native-chat/agent-session-wire/structured-agent-session-crash-turn-end.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-current-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-dead-generation-settlement.tssrc/main/native-chat/agent-session-wire/structured-agent-session-delivery-loop.tssrc/main/native-chat/agent-session-wire/structured-agent-session-event-sink.tssrc/main/native-chat/agent-session-wire/structured-agent-session-handing-over.tssrc/main/native-chat/agent-session-wire/structured-agent-session-handover.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-legacy-rest.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-tabs.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host-types.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-idle-sweep.tssrc/main/native-chat/agent-session-wire/structured-agent-session-journal-double-test-support.tssrc/main/native-chat/agent-session-wire/structured-agent-session-open-child-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-r3-recovery.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-read-restore.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-read-restore.tssrc/main/native-chat/agent-session-wire/structured-agent-session-readable-restorer.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-registry.tssrc/main/native-chat/agent-session-wire/structured-agent-session-request-failures.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-newer-orca.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-records.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-offer-withdrawal.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-restore.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-contract.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-set.tssrc/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-wiring.tssrc/main/native-chat/agent-session-wire/structured-agent-session-reveal.tssrc/main/native-chat/agent-session-wire/structured-agent-session-rewind-provenance.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-shutdown-cut-row.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-listing.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-reconcile-failure.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-child-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed-deps.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-ownership.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-summary-equality.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-summary.tssrc/main/native-chat/agent-session-wire/structured-agent-session-subagent-rows.tssrc/main/native-chat/agent-session-wire/structured-agent-session-transition.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-transition.tssrc/main/native-chat/agent-session-wire/structured-agent-session-unfinished-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-unsent-send-hold.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-wedged-profile-migration.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-workspace-sleep.tssrc/main/native-chat/agent-session-wire/structured-rewind-cut.tssrc/main/runtime/orca-runtime.tssrc/renderer/src/components/dashboard/DashboardAgentRow.test.tsxsrc/renderer/src/components/dashboard/DashboardAgentRow.tsxsrc/renderer/src/lib/agent-verdict-status-line.test.tssrc/shared/agent-session-journal-position.tssrc/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.
-
[Medium impact] The changes since the last review appear safe to merge; no new blocking issue was found. SummaryOrca now restores chat lists and saved turn results without opening every chat’s history.
No new actionable issues were found in the changes since the last review. Tests were not run.
|
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.
|
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:
Three code boundaries worth checking:
|
















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
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
lastTurnfield 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.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.