Dashboard › opencode › Distillation
dad01fe7-6d26-4e17-a335-bf27e6bac229["lore_tm_v1_TZ3mTHznj4OEyLrjOtt9qIg4ErErlIA5Mk-3sughcHA","lore_tm_v1_xPcYwqoJ8rSGU1YmTv5GIF-NcrQXThdM1Opf64GPVkA","lore_tm_v1_JBug3J6ap4yZN16CUvUL1F46DRTEkzcINM344xMQix8","lore_tm_v1_wy_AmgJBF_a443p30xJG1x1cR3oocRsDu66t-dHsFVE","lore_tm_v1_BO8e3GoV2tYSS6A5qpS6CydnZ6q3p31XNj5_IEfzKD4","lore_tm_v1_VGh8GFBEpZ6XVUKks-u5vvLlJWuoKGQXnAY91z_6lMc","lore_tm_v1_BqrJvRPagwaq9530Np13z0Tr1J-rKs6CuQwQOUubkJE"]
Date: Sep 17, 2026
/tmp/opencode/session-recovery-v19-review/packages/core/src/session/projector.ts:500-538 showed the SessionEvent.RevertEvent.Committed projector: it finds the revert boundary via SessionMessageTable.session_id + message id; dies with Revert boundary message not found: ${event.data.messageID} if absent; deletes later session messages where seq > boundary.seq; deletes SessionInputTable rows where admitted_seq > boundary.seq or promoted_seq > boundary.seq; then clears SessionTable.revert and sets time_updated from event.data.timestamp. The global node is makeGlobalNode({ name: "session-projector", layer, deps: [EventV2.node, Database.node] }).Found 100 matches (more matches available) for recovery/execution-related symbols. Files shown were /tmp/opencode/session-recovery-v19-review/packages/core/src/session/input.ts, projector.ts, sql.ts, execution/claim.ts, execution/local.ts, and recovery.ts. Notable references included SessionRecoveryTable, SessionExecutionTable, wake_attempts, wake_pending, execution_id, recovery_error, SESSION_EXECUTION_LEASE_MS, execution phases including "cancelling"/"cancelled", recovery ordering by time_created then execution_id, and expired-execution scanning via expires_at <= scanTime./tmp/opencode/session-recovery-v19-review/packages/core/src/session.ts:330-459 showed V2Session.prompt is uninterruptible, validates the session with result.get, resolves the prompt, defaults messageID to SessionMessage.ID.create() and delivery to "steer", and calls SessionInput.admit with requestExecution: input.resume !== false. SessionInput.LifecycleConflict maps to PromptConflictError; a non-equivalent admission also returns PromptConflictError; execution.wake() runs only when admission.shouldWake. V2Session.resume calls SessionInput.requestPendingExecution(db, events, sessionID) before execution.resume(sessionID), while V2Session.interrupt wraps execution.interrupt(sessionID) in Effect.uninterruptible./tmp/opencode/session-recovery-v19-review/packages/core/src/session.ts inspection showed shell, skill, compact, and wait return OperationUnavailableError; switchAgent publishes SessionEvent.AgentSwitched; switchModel avoids publishing when provider ID, model ID, and normalized variant ("default") are unchanged; and revert operations delegate to SessionRevert.stage, SessionRevert.clear, and SessionRevert.commit with the required Database, EventV2, and location services./tmp/opencode/session-recovery-v19-review/packages/core/src/database/migration/20260914170650_session-recovery.ts has ID 20260914170650_session-recovery. It adds session_input.wake_pending (integer DEFAULT false NOT NULL) and session.wake_attempts (integer DEFAULT 0 NOT NULL, constrained to 0..9007199254740991).20260914170650_session-recovery creates session_execution with columns id, session_id, owner_id, nullable assistant_message_id, phase, assistant_seq DEFAULT -1, time_created, expires_at, and nullable recovery_error. Its primary key is id; allowed phases are 'ready', 'safe', 'unknown', 'continue', 'cancelling', and 'cancelled'; session_id references session(id) with ON DELETE CASCADE.20260914170650_session-recovery creates session_recovery with columns session_id, execution_id, nullable assistant_message_id, continuation_message_id, phase, wake_pending DEFAULT true, wake_attempts DEFAULT 0, nullable recovery_error, and time_created. Its primary key is execution_id; wake_attempts is constrained to 0..9007199254740991; foreign keys reference session(id), session_message(id), and session_input(id), all with ON DELETE CASCADE.20260914170650_session-recovery creates six indexes in order: 1. unique session_execution_session_idx on session_execution(session_id); 2. session_execution_owner_idx on (owner_id); 3. session_execution_recovery_scan_idx on (recovery_error, expires_at, time_created, id); 4. session_input_wake_pending_promoted_session_idx on session_input(wake_pending, promoted_seq, session_id); 5. unique session_recovery_continuation_message_idx on session_recovery(continuation_message_id); 6. session_recovery_wake_pending_error_attempts_created_execution_idx on (wake_pending, recovery_error, wake_attempts, time_created, execution_id)./tmp/opencode/session-recovery-v19-review/packages/core/schema.json identifies SQLite schema version "7" with ID 3bc49670-06d1-4eba-9a45-8c8128bdcf6f, predecessor ID d4ff43d2-c4f9-442c-bada-a7d488b42fd2, and 2,590 total lines.abf93718acd0193fa2ca6cfc205cde8714eff23d7df42a4f093a55e9921fd1a3 for standard input. A subsequent command failed with /usr/bin/bash: line 1: python: command not found.