Dashboard › opencode › Distillation
2f383815-43f0-4c95-9593-c11d65d44fe6["lore_tm_v1_q5_qLirCqaGbCh13Otsrd9yQQ2PcA8OWGfCvxNL9HI0","lore_tm_v1_9-5yVChsQlTo57JmDAawoOhvGHe9WEr_e7zu8GZIGlQ","lore_tm_v1_tI8L3Ebxc-K7ahozfugNkiCSjPo32g08ASHxu_MLli0","lore_tm_v1_xzx234ia6YqWbQaHZZCpsrecPSrLP8qsDHZrnP48ae0","lore_tm_v1_e7temTCQQDp0YyYSNNsosxN1ElHvNt32AOpkPksbOdE","lore_tm_v1_8f5KFUPC7vQ2Ot2372CjdHWXr0rzfVXFQXHF8unisYs","lore_tm_v1_yW7BlahFgKSYJsvhFigKBZph2PGbe33tbcF54XAnapc"]
Date: Sep 17, 2026
SESSION_EXECUTION_LEASE_MS must exceed maximum deployment clock skew plus one renewal interval.packages/core/test/session-projector.test.ts (+2,819/-3), packages/core/test/session-runner.test.ts (+1,205/-70), packages/core/schema.json (+567/-48), packages/core/src/session/recovery.ts (+508), packages/core/src/session/input.ts (+391/-31), and packages/core/src/session/runner/llm.ts (+289/-104).packages/core/package.json identifies @opencode-ai/core version 1.18.30; its scripts are "db": "bun drizzle-kit", "migration": "bun run script/migration.ts", "fix-node-pty": "bun run script/fix-node-pty.ts", "test": "bun test --only-failures", and "typecheck": "tsgo --noEmit".packages/core/src/session/execution/claim.ts defines SessionExecutionClaim.update, renew, settleCancellation, clear, and transaction; all claim mutations fence on session_id, execution id, owner_id, and expires_at > now, extend expiry by SESSION_EXECUTION_LEASE_MS, and die with SessionExecutionClaim.Lost when no matching live claim exists.SessionExecutionClaim.update enforces phase transitions in packages/core/src/session/execution/claim.ts: setting cancelled requires current phase cancelling; setting cancelling is prohibited from current cancelled; other updates are prohibited from current cancelling or cancelled. settleCancellation only updates a live claim currently in cancelling.packages/core/src/session/recovery-id.ts deterministically generates fallback assistant message IDs as msg_recovery_${executionID} and continuation IDs as msg_recovery_continue_${executionID} via SessionMessage.ID.make(...).packages/core/src/database/migration/20260914170650_session-recovery.ts, ID 20260914170650_session-recovery, adds session_input.wake_pending defaulting to false, adds session.wake_attempts defaulting to 0 with range 0..9007199254740991, and creates session_execution plus session_recovery.session_execution table has primary key id, a unique index on session_id, an owner index, recovery-scan index (recovery_error, expires_at, time_created, id), phases ready|safe|unknown|continue|cancelling|cancelled, assistant_seq default -1, and cascading deletion from session.session_recovery table uses primary key execution_id, requires a unique continuation_message_id, supports phases represented in packages/core/src/session/sql.ts as ready|unknown|continue, defaults wake_pending to true and wake_attempts to 0, and indexes (wake_pending, recovery_error, wake_attempts, time_created, execution_id).packages/core/src/session/sql.ts defines MAX_WAKE_ATTEMPTS = Number.MAX_SAFE_INTEGER and SESSION_EXECUTION_LEASE_MS = 30_000; SessionInputTable.wake_pending defaults to false, while SessionRecoveryTable.wake_pending defaults to true.packages/core/src/session/sql.ts:3: import * as DatabasePath from "../database/path" uses a prohibited star import.