Dashboard › opencode › Distillation
1ed85e1e-2a41-46c4-afbd-afed989a41fe["lore_tm_v1_Jy5LHgE1-5ecfbbGm3BLOmHadBhJgjvK1UuBegwObf4","lore_tm_v1_MFGv0H0zXAp-MPAkSJqGaOWpu7U8-hFs4NHbX6yYKDs","lore_tm_v1_7uWq1WSH5Oq_rhOB1Vt0ChP-PP1tk-dgSFKjahN6ji8"]
Date: Sep 15, 2026
it.effect("never recovers a live execution lease", ...) and it.effect("never recovers an execution superseded by a newer assistant", ...) for SessionRecovery.recover(), with recovery behavior provided through SessionExecution.Service."Provider Step outcome unknown after server restart" and updates interrupted tool failures to "Tool execution outcome unknown after interruption" instead of "Tool execution interrupted".packages/schema/src/session-event.ts add Step.Interrupted, including continuationMessageID: SessionMessage.ID and an UnknownError.runTurnAttempt(sessionID, executionID, promotion, step, compaction.compactAfterOverflow) verifies the session_execution claim by matching both session_id and executionID; a lost claim defects with Session execution claim lost: ${executionID}.phase: "safe" with assistant_message_id: null after streaming/commit and phase: "unknown" with assistant_message_id: null when execution outcome becomes uncertain.packages/core/src/session/execution/local.ts implements current-process routing for implicit-local locations through SessionExecutionLocal.make; the source comment reserves future remote placement for this component.packages/core/src/session/execution/local.ts creates a per-process ownerID with crypto.randomUUID() and derives leaseDuration via Duration.toMillis(SESSION_EXECUTION_LEASE_MS).clear(sessionID, executionID?) deletes from SessionExecutionTable only where session_id matches, owner_id equals the current process’s ownerID, and—when supplied—id equals executionID.renew(executionID) updates expires_at to Date.now() + leaseDuration only when both execution id and owner_id match; if no row is returned, it defects with Session execution claim lost: ${executionID}.SessionRunCoordinator drain creates a new executionID and inserts a session_execution row with session_id, owner_id, phase: "ready", time_created: Date.now(), and expires_at: Date.now() + leaseDuration.session_execution upsert targets SessionExecutionTable.session_id; takeover resets id, owner_id, phase: "ready", assistant_message_id: null, time_created, and expires_at, but is allowed only when either the current owner already holds a "ready"/"safe" execution or the existing lease has expired via expires_at < Date.now().session_execution upsert returns no claim, the drain exits without starting input.run, preventing a second owner from running under a live lease.input.run(sessionID, force, executionID) against lease renewal repeated with Schedule.spaced("10 seconds"); non-interruption drain failures are logged as "Failed to drain Session" with sessionID.packages/core/src/session/execution/local.ts clears only the matching owned sessionID/executionID lease; failed or interrupted exits leave the row in place for lease-expiry/recovery handling.SessionExecution.Service maps active to coordinator.active, resume to coordinator.run, and wake to coordinator.wake; interrupt(sessionID) runs coordinator.interrupt(sessionID) and then clears leases for that session owned by the current ownerID.SessionStore.Service, defects with Session not found: ${sessionID} when absent, and invokes runner.run({ sessionID, force, executionID }) under locations.get(session.location).SessionExecutionLocal.node provides SessionExecution.Service through makeGlobalNode with dependencies [Database.node, SessionStore.node, LocationServiceMap.node].