Dashboard › opencode › Distillation
23484c83-cfe0-4a5b-895e-89fd844c5253["lore_tm_v1_26hhpw329AWVfEeTpNZXMuOexDi0ZvGs-2qZ1WGoHwQ","lore_tm_v1_heg2neOR6PSGsfRfEAjVYycKohu9UoTklvO3dC_Cyps"]
Date: Sep 16, 2026
packages/core/src/session/execution/local.ts:62-67 racing input.run(claim, force, recovery?.continuationMessageID) against repeated SessionExecutionClaim.update(db, claim) heartbeats spaced at Duration.millis(leaseDuration / 3).packages/core/src/session/execution/local.ts:73-95 deleting the matching entry from activeClaims on exit, clearing the claim on success, preserving interrupted claims, and clearing failed non-interrupted claims only when their current phase is neither "unknown" nor "continue".packages/core/src/session/execution/local.ts:103-115 passing claim cleanup to coordinator.interrupt; cleanup calls SessionExecutionClaim.clear(db, claim) and suppresses only SessionExecutionClaim.Lost, while other defects die.packages/core/src/session/recovery.ts:117-149: ready assistant-less claims with pending execution intent are cleared; "safe" claims and assistant-owned claims whose latest assistant no longer matches are cleared; otherwise recovery publishes SessionEvent.Step.Recovered with sessionID, timestamp, executionID, optional assistantMessageID, and phase.packages/core/src/session/execution/local.ts:62-67; interrupted drains preserve "unknown" and "continue" claims at lines 73-96; packages/core/src/session/run-coordinator.ts:107-108 waits for Fiber.interrupt(owner) before claim cleanup; and packages/core/src/session/execution/local.ts:103-116 silently accepts a lost claim.packages/core/src/session/recovery.ts:70-91 to take ownership, publish Step.Recovered at lines 123-163, and enqueue a wake; when old-owner cleanup eventually finishes, its clear is ignored and the coordinator starts the queued successor, causing the cancelled Session to resume. Assistant distinguished this as elapsed cleanup time rather than the declared wall-clock-skew residual.packages/core/test/session-execution-local.test.ts:200-238 blocks a finalizer but never advances past lease expiry and never runs recovery.Step.Ended, including phase "continue". Hosted-tool reconciliation immediately before settlement runs only when stream._tag === "Success" at packages/core/src/session/runner/llm.ts:395-398; Step.Ended can then commit at lines 399-433 whenever an in-memory settlement exists and no provider-error event was observed; stream failure propagates only afterward at lines 436-438.step-finish and then dies can bypass hosted-tool reconciliation and commit continuation. For typed LLMError, the earlier failure branch reconciles tools and fails the assistant, but the same ordering can append Step.Ended after Step.Failed.packages/core/test/session-runner.test.ts:1954-2004 covers a successful stream followed by a reconciliation database failure, not a stream failure after step-finish.packages/core/test/session-projector.test.ts:559-625 records successful wake calls rather than no-op or failing wakes and invokes recover() twice within one runtime instead of reconstructing the recovery layer after restart.packages/core/test/session-projector.test.ts:949-1117 use assistant-owned recovery; none covers an assistant-less synthetic recovery superseded before scanner validation. The implementation nevertheless persists attempt counters before wake at packages/core/src/session/recovery.ts:193-244 and lines 255-299, and validates latest-assistant sequence at packages/core/src/session/input.ts:321-395.packages/core/test/session-runner.test.ts:1996-2002 queries durable event version session.next.step.ended.1, while packages/schema/test/event-manifest.test.ts:40-43 establishes current Step.Ended as version 2. The phase assertion still detects the tested ordering defect, but the event-count assertion cannot prove that no current Step.Ended event committed.packages/core/schema.json:1-8 does not descend directly from the frozen base snapshot. The base snapshot ID is f14a9b18-8207-487e-a3d3-227e629ba9ad, while patched prevIds names 797e6838-8a41-4793-932a-d200aa8d51fb; runtime migration SQL and full-schema output agree on new tables and indexes, but metadata indicates regeneration from an intermediate lineage.Step.Ended; recovery validates identity before wake and again during exact promotion; persisted attempt ordering prevents the first 100 no-op wakes from permanently starving later Sessions; and coordinator interruption finalizes state and starts a pending successor before propagating cleanup failure at packages/core/src/session/run-coordinator.ts:99-124.packages/core/src/session/execution/claim.ts:26-66 consistently fence by Session, execution, owner, and unexpired lease. Promotion and Context Epoch writes pair claim renewal with the durable transaction. Stale-owner tests cover provider dispatch, streamed publication, local tools, interrupted-tool settlement, and Context Epoch updates.packages/core/src/session/recovery.ts:61-299.packages/core/src/session/input.ts:52-598.wake_pending; resume:false remains admit-only; exact retries can add one deterministic execution-request event; conflicting retries remain inert; historical v1 admission defaults to no execution intent."unknown" during physical summarization and commits "continue" only with Compaction.Ended; settled local-tool continuation uses the same atomic Step.Ended boundary; no legacy SessionPrompt recovery path was found.Schema -> Core/Protocol -> Server; generated client code does not import Core or Server.repo-setup skill was unavailable, so the assistant directly read applicable immutable AGENTS.md, CONTRIBUTING.md, and affected package scripts.c2c8afb07a7b6a49c1d40c5515d718ad5a934c9291e80a068693259c26c566a0; SEA SHA-256 56c1bc48b6e21397db05eb0d41f73d243a4b64da093fcfbe209baed65457f6e8.ab9408c81cc9916177641ae8e9f08624fc27b5b9 as an immutable commit. The patch applied cleanly to that exact base through an isolated temporary index and contained exactly 33 changed files, all inspected from base-plus-patch evidence.DO-NOT-MERGE.