Dashboard › opencode › Distillation
952b7df3-a390-4305-9a94-5e530bfc137f["lore_tm_v1_is5Aa0NH3xEJZ4TjqnPyTWyQwPwp9iB2dT7jpyINWsc"]
Date: Sep 14, 2026
packages/core/src/session/execution/local.ts was refactored from a static local coordinator layer to export make = Effect.fnUntraced(function* (input: { readonly run: (sessionID: SessionSchema.ID, force: boolean) => Effect.Effect<void, SessionRunner.RunError> }) { ... }); new imports include and, eq from drizzle-orm, Exit from effect, Database, and SessionExecutionTable.db from Database.Service and assigns each process-local executor a unique ownerID = crypto.randomUUID().packages/core/src/session/execution/local.ts defines clear(sessionID) to delete from SessionExecutionTable only where both session_id = sessionID and owner_id = ownerID; the operation uses .run().pipe(Effect.orDie, Effect.asVoid).SessionRunCoordinator.make<SessionSchema.ID, SessionRunner.RunError> with an Effect.fnUntraced drain(sessionID, force) callback, routing execution through the injected input.run.packages/core/src/session/recovery.ts obtains EventV2.Service, creates continuationMessageID with SessionMessage.ID.create(), and publishes recovery work with delivery: "queue".SessionExecutionTable row was deleted; if not, it terminates with Effect.die(\Recovery execution claim changed: ${claim.id}`)`.const layer = Layer.effectDiscard(recover()).message_session_time_created_id_idx on (session_id, time_created, id) and foreign-key references using { onDelete: "cascade" }.