Dashboard › opencode › Distillation
545967ec-7f14-4583-bb1f-a606a78cfd74["lore_tm_v1__lS7SLHUAE14sYokMdb3LnYJY66YyipWzK0C9FywtGA","lore_tm_v1_7eUAYJxa7nRe6su2hZGs79e-YehEcaxCZPup25BVSZQ","lore_tm_v1_0FGTiSxLYR8HJZDZ3WTiUu-Byw-3ByWvICBxG3XLPRY","lore_tm_v1_f17316aSqHLpA2fyK1YZb7eVEHiUgG52zL4XZWqWYIw","lore_tm_v1_jSCQ2_8DL5kJR8wNMSMsIAG1G6SMo54kJvlpn0NXQVM","lore_tm_v1_x746dvVnkM972hiuk0okV8u2qBfPbSG_FP70Rnn-Teg","lore_tm_v1_gYlk4lu-pvo4a6jKiN-U0GYZoeTziHJSE_1BaEkDhXM"]
Date: Sep 16, 2026
packages/core/src/session/recovery-id.ts defines message(executionID: string, assistantMessageID?: SessionMessage.ID), which returns the supplied assistantMessageID or deterministically creates SessionMessage.ID.make(\msg_recovery_${executionID}`)`.packages/core/src/session/recovery-id.ts defines continuation(executionID: string), which creates SessionMessage.ID.make(\msg_recovery_continue_${executionID}`)`.packages/schema/src/session-event.ts adds PromptExecutionRequested, Step.Interrupted, and Step.Recovered to both DurableDefinitions and Definitions; PromptAdmitted gains optional requestExecution: Schema.Boolean.pipe(optional).packages/core/test/database-migration.test.ts imports @opencode-ai/core/database/migration/20260914170650_session-recovery and includes the test "adds final recovery ownership tables to a populated predecessor".packages/core/schema.json contains the session_execution and session_recovery tables, with primary keys session_execution_pk and session_recovery_pk.packages/core/schema.json defines foreign keys fk_session_execution_session_id_session_id_fk, fk_session_recovery_session_id_session_id_fk, fk_session_recovery_assistant_message_id_session_message_id_fk, and fk_session_recovery_continuation_message_id_session_input_id_fk.packages/core/schema.json includes indexes session_execution_session_idx, session_execution_owner_idx, session_input_wake_pending_promoted_session_idx, session_recovery_continuation_message_idx, and session_recovery_wake_pending_error_attempts_created_execution_idx.packages/core/schema.json includes session_execution_phase_check, session_recovery_wake_attempts_check, and session_wake_attempts_check; both wake-attempt constraints enforce "wake_attempts" >= 0 AND "wake_attempts" <= 9007199254740991.packages/sdk/js/src/v2/gen/types.gen.ts exposes the recovery events across three naming surfaces: EventSessionNextPromptExecutionRequested / EventSessionNextStepInterrupted / EventSessionNextStepRecovered; SyncEventSessionNextPromptExecutionRequested / SyncEventSessionNextStepInterrupted / SyncEventSessionNextStepRecovered; and SessionNextPromptExecutionRequested / SessionNextStepInterrupted / SessionNextStepRecovered.packages/sdk/openapi.json includes unversioned event discriminators session.next.prompt.execution_requested, session.next.step.interrupted, and session.next.step.recovered, plus durable versioned discriminators session.next.prompt.execution_requested.1, session.next.step.interrupted.1, and session.next.step.recovered.1./tmp/opencode/session-recovery-final-v8.patch spans 33 changed-file sections, including recovery-related changes in 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-run-coordinator.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, packages/opencode/src/server/routes/instance/httpapi/server.ts, packages/schema/src/session-event.ts, packages/schema/test/event-manifest.test.ts, packages/sdk/js/src/v2/gen/types.gen.ts, packages/sdk/openapi.json, packages/server/src/routes.ts, packages/core/src/session/execution/claim.ts, and packages/core/src/session/recovery-id.ts.