Dashboard › opencode › Distillation
fccf1766-e580-4d85-98b5-2f331a2b140f["lore_tm_v1_xaWVb9r_luQNXshaxd87_GyXYbgfLaXpnJeASGz7lg8","lore_tm_v1_fTz3LPhTGnjCqfUamZozob4LBHCtJ8ONU9hSOAeJoNk","lore_tm_v1_ua9xYN_xtXzZRK4vGiRcOvXrop4SZjY_U9KDewJCV-I","lore_tm_v1_lxXPHJd1v9b-Vfb95KwSTtHxJ8wiVXFLeJzfd99_kIc","lore_tm_v1_v5z8FDPKDA9Gcb3H1r-J_VHk-y_uvPe3K8k_mp8lYtU","lore_tm_v1_nsEuI3vMYiKMYmm5qkZ3YvR5iEGDuV9iSAZsPOhybeA","lore_tm_v1_84Y42diWBxJH0Inl7L3_VF149e3-Aw24ptujiz9u6pw","lore_tm_v1_M6LVC6hVaK9KLFFIFptHOiYNXRZuF7Xb8eUQ1Wm3Pzk","lore_tm_v1_Sj5AumKxdVUeK66U-2Ddg9NFGciLqBZvrG3U4hMxgQU","lore_tm_v1_K8q2ncIr36iFo_LbtHGvxWi3uvBWIOaDkF8zfGTyMbk","lore_tm_v1_xZdLggRCD70zFDk6BmOQhXnEYRkxfIHYQa7Ki78PNAo","lore_tm_v1_7ZPDly_KKMV6UP_NBUhrzZKImqWJRQfLksdVt2jcBeY","lore_tm_v1_sX8BFJNyxCkzfqw9xmas7_ryETo2iahJRNu0jFTeyLQ","lore_tm_v1_9qEzpru4W4P96II5YZOHkvFeLbHD534qskgL5xKlDT0","lore_tm_v1_YoCJ1PNDc32yqbaUATD4JHF-N_hZXjQ5nD1MXdWlYUk","lore_tm_v1_B879X_S74Ty8V_IkXqpocwJSZJ7q3kHkuHNPHZpeFak","lore_tm_v1_AHbDAern8NDY3YXBU2yRy_YJjYDkDA1mj9c0LIJnSFo","lore_tm_v1_8LzmU2Ne6wBzwTZKDb3emH-KlAfc6UT7WxiiGCPqftw","lore_tm_v1_08XSZ-LSal9VJdEWOzqO4-aoE-dh3BYA2Dj5G0PWJmM","lore_tm_v1_28MhnVSYTSGAzrdJZ2fipis7r1u_nJyoA6wnk4s-ZMQ","lore_tm_v1_WIUR9gcqjm8Jwh5sxnEgMGdvjpEy4gRfEQc0SW9zduo","lore_tm_v1_5jkc8u5-rjQxzCgOXkBM-JN0UHk4kcgE5iD6_wzSYmk"]
Date: Sep 14, 2026
file:line evidence, any concrete correctness issue in currently modified files, and the exact command/error if blocked; required substantive evidence or an explicit blocker rather than an empty result..lore.md, AGENTS.md, packages/core/schema.json, packages/core/src/database/migration.gen.ts, packages/core/src/database/schema.gen.ts, packages/core/src/session/message-updater.ts, packages/core/src/session/projector.ts, packages/core/src/session/sql.ts, packages/opencode/src/server/routes/instance/httpapi/server.ts, packages/schema/src/session-event.ts, and packages/server/src/routes.ts; untracked files: packages/core/src/database/migration/20260914170650_session-recovery.ts, packages/core/src/session/recovery.ts, perf.data, and perf.data.old./home/byk/Code/opencode/packages/core/src/session/recovery.ts:15-34 defines decodeMessage = Schema.decodeUnknownSync(SessionMessage.Message) and continuation = Prompt.make({ text: "continue" }); its startup layer selects all assistant rows from SessionMessageTable, orders by ascending session_id and descending seq, then identifies the latest assistant per session whose decoded time.completed is undefined./home/byk/Code/opencode/packages/core/src/session/recovery.ts:35-69 processes recovery candidates by creating continuationMessageID, taking DateTime.now, and publishing SessionEvent.Step.Recovered with delivery: "queue", prompt "continue", and error { type: "unknown", message: "Provider step outcome unknown after server restart" }; publication defects are suppressed only when SessionRecoveryTable already has the (session_id, assistant_message_id) claim, and execution.wake(candidate.session_id) runs only after a newly published recovery./home/byk/Code/opencode/packages/core/src/session/recovery.ts:73-78 declares process-global node "session-recovery" via makeGlobalNode(...), with service: undefined and dependencies [Database.node, EventV2.node, SessionProjector.node, SessionExecution.node]; the file imports Prompt but does not import or call SessionPrompt./home/byk/Code/opencode/packages/core/src/session/sql.ts:168-188 defines SessionRecoveryTable as session_recovery with required fields session_id, assistant_message_id, continuation_message_id, and time_created; foreign keys cascade to SessionTable.id, SessionMessageTable.id, and SessionInputTable.id; primary key is (session_id, assistant_message_id), and session_recovery_continuation_message_idx uniquely indexes continuation_message_id./home/byk/Code/opencode/packages/core/src/database/migration/20260914170650_session-recovery.ts:4-25 has ID 20260914170650_session-recovery; it creates only session_recovery with the three cascading foreign keys and composite primary key, then creates unique index session_recovery_continuation_message_idx./home/byk/Code/opencode/packages/core/src/database/migration.gen.ts:36-45 now ends with ordered import import("./migration/20260914170650_session-recovery")./home/byk/Code/opencode/packages/server/src/routes.ts:13,27-39,53-64 imports SessionRecovery, includes SessionRecovery.node in standalone Serverβs process-global applicationServices, and compiles that graph with replacement [SessionExecution.node, SessionExecutionLocal.node] before providing it to routes./home/byk/Code/opencode/packages/opencode/src/server/routes/instance/httpapi/server.ts:69,299-305 imports SessionRecovery and builds LayerNode.group([SessionV2.node, SessionRecovery.node]) with replacements [LocationServiceMap.node, locationServiceMapV2] and [SessionExecution.node, SessionExecutionLocal.node]; /home/byk/Code/opencode/packages/opencode/src/server/routes/instance/httpapi/server.ts:307-313 separately provides the broader app graph and keeps Observability.layer last./home/byk/Code/opencode/packages/core/src/session/projector.ts:389-424 handles SessionEvent.Step.Recovered by requiring a durable sequence, confirming the target is the latest assistant for the session and remains unfinished, admitting the continuation input with event.durable.seq, running normal projection, and inserting the recovery claim into SessionRecoveryTable; invalid targets die with Recovery target is not the latest assistant: ${event.data.assistantMessageID} or Recovery target is not unfinished: ${event.data.assistantMessageID}./home/byk/Code/opencode/packages/core/src/session/execution/local.ts:20-55 creates process owner ID with crypto.randomUUID(), inserts into SessionExecutionTable before each drain, clears the matching (session_id, owner_id) row after non-interrupted completion/failure, and exposes active, interrupt, resume, and wake; /home/byk/Code/opencode/packages/core/src/session/execution/local.ts:59-63 declares its global node with dependencies [Database.node, SessionStore.node, LocationServiceMap.node]./home/byk/Code/opencode/packages/core/src/session/sql.ts:191-205 defines SessionExecutionTable as session_execution with id primary key, cascading session_id foreign key, required owner_id, and required time_created; it has unique index session_execution_session_idx on session_id and index session_execution_owner_idx on owner_id./home/byk/Code/opencode/packages/core/src/database/schema.gen.ts:181-192,281 contains generated full-schema SQL for session_recovery and its unique continuation index, while full-file searches returned no session_execution in packages/core/src/database/schema.gen.ts or packages/core/schema.json.SessionExecutionLocal imports and inserts into SessionExecutionTable at /home/byk/Code/opencode/packages/core/src/session/execution/local.ts:11,31-35, but neither the newest migration, migration registry, full generated schema, nor packages/core/schema.json creates session_execution; therefore fresh and upgraded databases will lack the table and local session drains can fail when attempting the insert./home/byk/Code/opencode/packages/core: bun script/migration.ts --name session-execution; stated it should generate a second migration and refresh generated artifacts, but did not run it because the assignment was read-only.