Dashboard › opencode › Distillation
c81ec056-6a52-40f3-9d45-7a5e891c2669["lore_tm_v1_JR0xmtGMLh26ZgUewJpTXhIEgsrG1ZQqp1nr6-9-eeI"]
Date: Sep 15, 2026
/home/byk/Code/opencode/packages/core/src/session/recovery.ts:34-140 found execution recovery scans at a captured scanTime, processes at most BATCH_SIZE candidates, conditionally claims each SessionExecutionTable row with an update guarded by its execution ID and lease state, and skips candidates when the conditional update returns no row. Recovery determines the persisted execution phase; when a recoverable phase exists it publishes SessionEvent.Step.Recovered with Session ID, execution ID, optional assistant-message context, and phase.value, using a transactional commit hook to update recovery-related persistence. Per-execution failures are logged with sessionID and executionID./home/byk/Code/opencode/packages/core/src/session/recovery.ts:143-260 found recovery-wake redrive orders SessionRecoveryTable rows by ascending time_created, then ascending execution_id. For each row it loads the continuation input by continuation_message_id, optionally loads the recorded assistant message by assistant_message_id, queries the latest assistant message for the Session, and checks the deterministic synthetic message keyed by message(row.executionID). Invalid persisted state is made terminal by writing recovery_error, including the explicit diagnostics "Invalid recovery continuation input" and an assistant-message validation error; valid unresolved rows are redriven through the normal Session execution wake path, while already-settled state can clear wake_pending conditionally./home/byk/Code/opencode/packages/core/src/session/recovery.ts:263-283 found ordinary input wake redrive groups eligible SessionInputTable rows by session_id, orders Sessions by the ascending minimum input time_created and then ascending Session ID, and wakes execution once per selected Session rather than once per pending input./home/byk/Code/opencode/packages/core/src/session/recovery.ts:285-296 found the recovery worker runs its scan repeatedly with Schedule.spaced("10 seconds") and is installed through an Effect Layer whose exposed service is undefined.