Dashboard › opencode › Distillation
9e9c0513-4892-43df-b0fd-22e27f609b28["lore_tm_v1_tZ46sx1ZDwt8exYWmXO52JvdPM__v-XRRjq2-jH78Sw","lore_tm_v1_GgdBU_F9PNsIfmBdmyj5GR97OkXW0xOw-qqiXxuBrOo","lore_tm_v1_PqBm8jy4jFRkDkEcJDTK9xsDR1plkSg_1hZHsq9aoiE","lore_tm_v1_a6jgSRZBanyOHZjXbzBOwMHQ7CBB6-k_GC6WFYpTvtM"]
Date: Sep 15, 2026
No files found; audit proceeded through direct source inspection.packages/core/src/session/execution/claim.ts, packages/core/src/session/recovery-id.ts, perf.data, and perf.data.old..lore.md, AGENTS.md, packages/core/schema.json, packages/core/src/database/migration.gen.ts, packages/core/src/database/migration/20260914170650_session-recovery.ts, packages/core/src/database/schema.gen.ts, packages/core/src/session.ts, packages/core/src/session/compaction.ts, packages/core/src/session/context-epoch.ts, packages/core/src/session/execution/local.ts, packages/core/src/session/input.ts, packages/core/src/session/message-updater.ts, packages/core/src/session/projector.ts, packages/core/src/session/recovery.ts, packages/core/src/session/run-coordinator.ts, packages/core/src/session/runner/index.ts, packages/core/src/session/runner/llm.ts, packages/core/src/session/runner/publish-llm-event.ts, packages/core/src/session/sql.ts, packages/core/test/database-migration.test.ts, packages/core/test/session-execution-local.test.ts, packages/core/test/session-projector.test.ts, packages/core/test/session-prompt.test.ts, packages/core/test/session-runner-recorded.test.ts, packages/core/test/session-runner-tool-events.test.ts, packages/core/test/session-runner.test.ts, and packages/schema/src/session-event.ts.packages/core/src/database/migration/20260914214636_session-execution.ts and packages/core/src/database/migration/20260914222526_session-execution-phase.ts; the earlier packages/core/src/database/migration/20260914170650_session-recovery.ts was modified.packages/core/src/session/recovery-id.ts:6 defines deterministic continuation IDs as SessionMessage.ID.make(\msg_recovery_continue_${executionID}`)`.packages/core/src/session/recovery.ts scans expired SessionExecutionTable claims only where expires_at <= scanTime and recovery_error IS NULL; invalid execution phases are quarantined by setting recovery_error to Invalid execution phase: ${String(claim.phase)}, with a guarded update that detects changed claims and dies with Recovery execution claim changed: ${claim.id} if quarantine loses the race.packages/core/src/session/recovery.ts selects recovery rows where SessionRecoveryTable.wake_pending = true and recovery_error IS NULL, ordered by time_created and execution_id; it validates deterministic continuation identity, continuation input, and projection identity, quarantining failures as Invalid recovery continuation identity, Invalid recovery continuation input, or Invalid recovery projection identity.packages/core/src/session/recovery.ts references both the recorded assistant message and a synthetic recovery message derived via message(row.executionID); ordinary wake scanning separately selects SessionInputTable rows with wake_pending = true and promoted_seq IS NULL, ordered by earliest creation time and session_id.packages/core/src/session/projector.ts projects both SessionEvent.Step.Ended and SessionEvent.Compaction.Ended; the Step.Ended path derives continuationMessageID = continuation(event.data.executionID), creates the continuation input, and creates a recovery row with continuation_message_id and wake_pending: true.packages/core/src/session/sql.ts defines SessionInputTable.wake_pending as a non-null boolean defaulting to false, with index session_input_wake_pending_promoted_time_created_id_idx; recovery rows have unique index session_recovery_continuation_message_idx, wake_pending defaulting to true, and nullable recovery_error; execution rows also have nullable recovery_error.packages/core/src/session/input.ts contains wake-state transitions that set wake_pending: true, clear it when assigning promoted_seq, and clear the corresponding SessionRecoveryTable.wake_pending for a matching continuation_message_id; it exports promoteExact.packages/core/src/session/execution/local.ts looks up a recovery continuation only where wake_pending = true and recovery_error IS NULL, then passes recovery?.continuationMessageID into input.run(claim, force, recovery?.continuationMessageID).packages/core/src/session/runner/llm.ts contains explicit V1-compatible decline handling: “declining a user prompt halts the loop instead of becoming model-facing tool output”; the decline path calls publisher.interruptAssistant("Tool execution declined").packages/core/src/session/runner/llm.ts detects continuation with execution?.phase === "continue"; non-continuation startup resets execution to { phase: "ready", assistant_message_id: null }, while recovery promotion calls SessionInput.promoteExact(...). The file’s comments still describe durable continuation recovery as “a separate future slice with an explicit retry policy” and leave “Continue for compaction or another continuation condition when required” unchecked, despite the current recovery implementation.packages/core/src/session/runner/publish-llm-event.ts documents persistence of one provider turn “without executing tools or starting a continuation turn,” while packages/core/src/session/runner/index.ts documents running “one local continuation from already-recorded Session history.”