Dashboard › opencode › Distillation
ff98dd7c-68dc-4d85-b1ab-3be74d8713c9["lore_tm_v1_Xo46OCJ4xjq2M6dpamz9dN6k8TSj96iZkQvPnwNZPro","lore_tm_v1_YiYXSHnbWJmU-TsyQKROEE4TyzP5gJUp1EupWxilqaA","lore_tm_v1_VKtrK4VSt00Jta7CNCIFUwMASJM6YjdtZ6KO6aWQWo8","lore_tm_v1_D4MRwvewPiYvpuFMB2mcuvw95yNkPA1BOGPoixdabfA","lore_tm_v1_nAgL7W9RBjbXzV9W9WgnuhgrxcqpvZYzx1CkJMmPZTs","lore_tm_v1_IoZtxwQqqAqvVZL-ZxX8fX7avjVkYsCYNczD_3kHzAc","lore_tm_v1_W6JF_gvvUAngU0e69CqZpvckz6-ApFWvvzQPFx2HMck","lore_tm_v1_fsCvXzJYwYwTFOXu2-CmRUAxmtpyK-jb9PxTr5BeU3g","lore_tm_v1_mXIiEAhugFMatDNZg-WsTYcbYXsWsQVLrwgzGF0DfZ0","lore_tm_v1_Paip9ond5b1IDMo4k-7j5mQvk_ktPAqQZDuJ8mGotfk","lore_tm_v1_i94b0yLVxlvI26VV4qK-KjJSi9V6zLx3UKz8r-DRVFE"]
Date: Sep 15, 2026
/home/byk/Code/opencode/packages/core/src/session/runner/publish-llm-event.ts:207-218 showed endToolInput rejects a missing tool, changed tool name, or duplicate input end before calling toolInput.end(event.id); flush delegates to flushFragments()./home/byk/Code/opencode/packages/core/src/session/runner/publish-llm-event.ts:220-256 showed failAssistant and interruptAssistant both flush, start the assistant, set assistantActive = false and assistantFailed = true, then publish terminal events with { type: "unknown", message }; failAssistant publishes SessionEvent.Step.Failed with input.terminalCommit(assistantMessageID), while interruptAssistant publishes SessionEvent.Step.Interrupted with input.interruptedCommit(assistantMessageID)./home/byk/Code/opencode/packages/core/src/session/runner/publish-llm-event.ts:258-266 showed failUnsettledTools(message, hostedOnly = false) skips settled tools and, when hostedOnly is true, tools not executed by the provider; it marks each remaining tool settled before publishing SessionEvent.Tool.Failed./home/byk/Code/opencode/packages/core/src/session/sql.ts:141-173 showed SessionInputTable fields include primary-key id, session_id, JSON prompt, delivery, admitted_seq, nullable promoted_seq, wake_pending defaulting to false, and time_created; indexes enforce unique (session_id, admitted_seq) and (session_id, promoted_seq) and index pending delivery plus (wake_pending, promoted_seq, time_created, id)./home/byk/Code/opencode/packages/core/src/session/sql.ts:176-199 showed SessionRecoveryTable uses execution_id as primary key, permits nullable assistant_message_id, requires a unique continuation_message_id, has phase type "ready" | "unknown" | "continue", defaults wake_pending to true, and stores nullable recovery_error./home/byk/Code/opencode/packages/core/src/session/sql.ts:202-225 showed SessionExecutionTable uses primary-key id, a unique index on session_id, owner_id, nullable assistant_message_id, phase type "ready" | "safe" | "unknown" | "continue" enforced by session_execution_phase_check, time_created, expires_at, and nullable recovery_error; SESSION_EXECUTION_LEASE_MS = 30_000./home/byk/Code/opencode/packages/core/src/database/migration/20260914170650_session-recovery.ts:4-24 showed migration 20260914170650_session-recovery originally creates session_recovery with required session_id, required assistant_message_id, required continuation_message_id, and time_created; primary key (session_id, assistant_message_id); cascading foreign keys; and unique index session_recovery_continuation_message_idx./home/byk/Code/opencode/packages/core/src/database/migration/20260914214636_session-execution.ts:4-25 showed migration 20260914214636_session-execution creates session_execution with id, session_id, owner_id, nullable assistant_message_id, and time_created; adds required execution_id to session_recovery; creates unique session_execution_session_idx, non-unique session_execution_owner_idx, and unique session_recovery_execution_idx./home/byk/Code/opencode/packages/core/src/database/migration/20260914222526_session-execution-phase.ts:4-10 showed migration 20260914222526_session-execution-phase adds required text column phase to session_execution./home/byk/Code/opencode/packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts:4-53 showed migration 20260915193000_session-recovery-fencing conditionally adds session_input.wake_pending integer DEFAULT false NOT NULL, then drops and recreates both session_recovery and session_execution, thereby discarding rows from the earlier table forms.session_execution in /home/byk/Code/opencode/packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts:15-27 adds required expires_at, nullable recovery_error, primary key id, cascading session foreign key, and phase check allowing exactly 'ready', 'safe', 'unknown', and 'continue'.session_recovery in /home/byk/Code/opencode/packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts:30-43 changes the primary key to execution_id, makes assistant_message_id nullable, and adds required phase, wake_pending integer DEFAULT true NOT NULL, and nullable recovery_error, while retaining cascading foreign keys for session, assistant message, and continuation input./home/byk/Code/opencode/packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts:45-52 recreates unique session_execution_session_idx, non-unique session_execution_owner_idx, session_input_wake_pending_promoted_time_created_id_idx using IF NOT EXISTS, and unique session_recovery_continuation_message_idx./home/byk/Code/opencode/packages/core/src/database/migration.gen.ts:36-47 confirmed migration order includes 20260914170650_session-recovery, then 20260914214636_session-execution, then 20260914222526_session-execution-phase, then 20260915193000_session-recovery-fencing./home/byk/Code/opencode/packages/core/test/session-runner.test.ts found 15 "continue"-related matches, including recovery after Compaction.Ended around lines 1511-1559, recovery after settled Step.Ended around lines 1942-2000, committed-promotion listener defects around lines 2940-2946, local-tool/policy/permission continuation tests around lines 3138, 3186, and 3291, and a provider-error non-continuation test around lines 3744-3750.recovers the continuation committed with Compaction.Ended in /home/byk/Code/opencode/packages/core/test/session-runner.test.ts:1511-1560 injects a defect when the durable execution phase becomes "continue", confirms the compacted summary "## Objective\n- Preserve recovery" is persisted without a synthetic message, manually expires the claim with expires_at: 0, invokes SessionRecovery.recover(), and verifies the recovery model receives "continue" while preserving the compacted context.recovers the continuation committed with a settled tool step in /home/byk/Code/opencode/packages/core/test/session-runner.test.ts:1942-2000 runs tool call call-recovery with input { text: "settled" }, injects a defect after execution reaches phase "continue", verifies the tool is already completed, manually expires the claim, runs SessionRecovery.recover(), and confirms: the tool executes exactly once, the recovery request user texts are ["Recover settled tool continuation", "continue"], the pre-recovery context remains unchanged, and one SessionRecoveryTable row remains./home/byk/Code/opencode/packages/core/test/session-runner.test.ts found the decline-path test interrupts runner continuation when permission approval is declined at line 3235; nearby fixtures use tool declined, prompt "Call declined", call ID call-declined, and expected error message "Tool execution declined".