Dashboard › opencode › Distillation
100245f6-6c4a-4c9e-b40b-5912b8e85792["lore_tm_v1_qr6tH5KCWHEhB_ten0JL8rc4TwY6ZuCLdxSHTIr93MY","lore_tm_v1_TWhhsTFoLeiWWXHrVLJlaI7GeG5jVPaK4J-2UfHqvoo","lore_tm_v1_IdM5xitqFZKCtkXvbltMyjopvtXKriNgV_JB9IqSiWw","lore_tm_v1_fKAtl2ykDgd1_yvLZAh8Y8jttnfrEVgy--GAd-VXjuo","lore_tm_v1_MbHV5uPX36cfGxsIP-zGFmFTx-SQMl4PhJzNa8E7uT4"]
Date: Sep 16, 2026
/tmp/opencode/session-recovery-final-v8.patch changes packages/core/src/session/run-coordinator.ts: Coordinator.interrupt now accepts optional cleanup?: Effect.Effect<void> and is documented to stop active execution, run cleanup, then start work that arrived while stopping.packages/core/src/session/run-coordinator.ts adds exit?: Exit.Exit<void, E> to Entry<E>; settle() stores the exit and returns while entry.stopping is true, deferring completion decisions to interruption cleanup.interrupt(key, cleanup = Effect.void) behavior in packages/core/src/session/run-coordinator.ts: if no active owner exists it runs cleanup; otherwise it sets stopping = true, clears the existing pendingWake, interrupts the owner, captures cleanupExit, verifies the interrupted execution settled, and either deletes the active entry or creates and starts one successor when work arrived during cleanup.Effect.uninterruptible; it completes the old waiter with Deferred.doneUnsafe(entry.done, exit), throws "Interrupted Session execution did not settle" if no exit was captured, and propagates cleanup failure via Effect.failCause(cleanupExit.cause)./tmp/opencode/session-recovery-final-v8.patch adds import type { SessionMessage } from "../message" to packages/core/src/session/runner/index.ts.packages/core/test/session-prompt.test.ts contains 29 matched it.effect(...) tests covering: exposing the execution registry; delegating continuation and process-local interruption through SessionExecution; interruption without a recorded Session; durable admission before transcript promotion; attachment MIME resolution; aggregate-sequenced durable Session events; resume through an existing message without appending another prompt; distinct IDs when omitted; exact-ID retry recovery; wake behavior for recovered committed messages; durable execution intent before advisory wake; replay of historical admit-only prompts; converting an admit-only retry into durable execution intent; conflicting ID, prompt, and delivery-mode rejection; concurrent exact retry and promotion behavior; inbox-cutoff steering; pending-input reprojection without execution; legacy projected prompt retries; globally unique IDs across sessions; visible-history ID rejection; and resume default/true/false behavior."never wakes execution when retrying an already promoted prompt" in packages/core/test/session-prompt.test.ts at line 330."never arms durable wake for a conflicting execution retry" in packages/core/test/session-prompt.test.ts at line 514.packages/core/test/session-runner-recorded.test.ts is 187 lines and defines a recorded HTTP integration test named "executes one recorded V2 prompt through the recorded HTTP transport".packages/core/test/session-runner-recorded.test.ts uses cassette "session-runner/openai-chat-streams-text" under fixtures/recordings; RECORD === "true" selects HttpRecorderInternal.cassetteLayer(..., { mode: "record" }), otherwise it uses HttpRecorder.http(...).baseURL: "https://api.openai.com/v1", bearer auth from OPENAI_API_KEY ?? "fixture", generation settings { maxTokens: 20, temperature: 0 }, and model ID "gpt-4o-mini".Location to AbsolutePath.make("/project"), uses Snapshot.noopLayer, ToolOutputStore.nodeWithoutConfig, empty SkillGuidance and ReferenceGuidance, and a Config.Service whose entries() returns [].SessionExecutionLocal.make({ run: (claim, force, recoveryInputID) => sessionRunner.run({ ...claim, force, recoveryInputID }) }) and provides it as SessionExecution.node."ses_runner_recorded", records the prompt "Say hello in one short sentence." with resume: false, explicitly calls session.resume(sessionID), and expects exactly 2 context messages: the original user prompt and an assistant message with agent: "build", finish: "stop", and text "Hello!"."session.next.prompt.admitted.1", 2. "session.next.prompted.1", 3. "session.next.step.started.1", 4. "session.next.text.started.1", 5. "session.next.text.ended.1", 6. "session.next.step.ended.2".packages/core/test/session-runner.test.ts found 97 matched runner tests, including recovery redrive, durable execution intent, ownership fencing, compaction, context-overflow recovery, tool reconciliation, concurrent resume/steering, FIFO queued-input promotion, interruption/finalizer safety, provider failure projection, and streamed text/tool-input ordering."never dispatches a provider after ownership changes" in packages/core/test/session-runner.test.ts at line 752."never publishes streamed output after ownership changes" in packages/core/test/session-runner.test.ts at line 778."never starts a local tool after ownership changes" in packages/core/test/session-runner.test.ts at line 805."never fails interrupted tools after ownership changes" in packages/core/test/session-runner.test.ts at line 845.