Dashboard › opencode › Distillation
bfc7a3ff-dd2a-4e2c-b102-b3345a2c21d2["lore_tm_v1_MEVHOlMAmWSRG14hz3Vpz7BSoynqYUtLMwOHeCoe0XE","lore_tm_v1_a9lJa1Olut9wMpnnjykNPbgTLHxLHeozFbq1LLxESlw","lore_tm_v1_iAuuJnBd4vDLkK0SR7yOiri26cSeO5fJCmNLLH0di0k","lore_tm_v1_AVvYOSfV5jHH5RLDu6mq5GcNZ9sdfvlS2zLA7a0x7uI","lore_tm_v1_mgKOwpcmiDZQgv9D3Xs0VR8WFU-vjw5fnclTIkR09LI","lore_tm_v1_wnxlmSkVl8U81mwb7g4zketFUF9HtD_l3jSyQ28gAO4","lore_tm_v1_QvMiBeNff6JCAqOb6_Nwqf7dOg16JMDFtNAeK43qJCM","lore_tm_v1_XAdmK-2M-M52j3g5HsBy4iNiFly9VYm1Ye2DlrcDr5I","lore_tm_v1_1nA8YK9gz9scCd3I3ptE0Q9s0QgVghjDiDfOv0Lo5go","lore_tm_v1_1LCsltgWDk1lsLRU9n32saHDC-sv9BwKDYkXt8jJohw","lore_tm_v1_KjSMw3oyGfJrU-s-tqvEjT8Lk_I18QfS85KcSThH67E","lore_tm_v1_OvTieW-54SoEGEhJFmSeQ7sLyBGPNTAHDe10WSEV6LY"]
Date: Sep 16, 2026
packages/core/test/session-runner-recorded.test.ts configures cassette session-runner/openai-chat-streams-text under fixtures/recordings; RECORD=true selects HttpRecorderInternal.cassetteLayer(..., { mode: "record" }), otherwise HttpRecorder.http(...).https://api.openai.com/v1, bearer auth from OPENAI_API_KEY with fallback "fixture", generation { maxTokens: 20, temperature: 0 }, and model gpt-4o-mini.Location to AbsolutePath.make("/project"), uses Snapshot.noopLayer and ToolOutputStore.nodeWithoutConfig, and mocks SkillGuidance and ReferenceGuidance to return SystemContext.empty.ses_runner_recorded, prompts Say hello in one short sentence., resumes the session, and expects 2 context messages: the original user prompt and an assistant message from agent build with 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-tool-events.test.ts uses session ID ses_tool_event_test, call ID call-image, tool read, input { path: "pixel.png" }, and base64 fixture iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB.session.next.tool.success.1, exactly one occurrence of the base64 payload in serialized event data, no result property, and reconstructed content containing text Image read successfully plus an image/png data-URI file.providerExecuted: true and expects session.next.tool.success.1 data to retain result.{ type: "error", value: "Cannot read binary file" } and expects no session.next.tool.success.1 but does expect session.next.tool.failed.1.SessionEvent.Tool.Success.data accepts legacy result content and decodes it as { type: "content" }.LLMEvent.stepStart({ index: 0 }) and LLMEvent.stepFinish({ index: 0, reason: "stop" }), expects no session.next.step.ended.2, and expects publisher.stepSettlement() to contain { finish: "stop" }.packages/core/test/session-run-coordinator.test.ts test “interrupts active execution and clears its pending wake” expects the joined run to fail with interrupt-only cause, coordinator.active to be empty, and exactly 1 drain run.SessionRunCoordinator test “runs a wake registered during interruption cleanup” blocks interrupt cleanup on cleanupGate, registers a wake during cleanup, and expects a second execution with runs === 2.SessionRunCoordinator test “finalizes interruption when cleanup dies” uses new Error("cleanup defect"); after a wake during cleanup and the cleanup defect, it expects a die cause, a second run, an empty active set, and runs === 2.SessionRunCoordinator test “starts a resume registered during interruption cleanup” expects the force sequence [false, true]: the initial wake is unforced, while coordinator.run("session") registered during cleanup starts a forced follow-up.SessionRunCoordinator test “starts one follow-up when a wake races with failure” uses new Error("failed"); the first run fails after a queued wake, the caller receives that same failure, and exactly one follow-up starts (runs === 2).SessionRunCoordinator test “does not cancel execution when a joined waiter is interrupted” starts two waiters for the same session, interrupts the second waiter, lets the first finish, and expects only 1 drain run.SessionRunCoordinator test “runs different keys concurrently” starts keys "first" and "second" and waits until both executions are active simultaneously.SessionRunCoordinator includes test “trampolines synchronous self-waking execution” with limit = 20_000.packages/sdk/js/src/v2/gen/types.gen.ts expose optional requestExecution?: boolean on session.next.prompt.admitted.session.next.prompt.execution_requested with properties timestamp, sessionID, and messageID.session.next.step.recovered with required timestamp, sessionID, executionID, and phase; assistantMessageID is optional and phase is "ready" | "unknown" | "continue".packages/sdk/openapi.json mirrors the public prompt-admission schema: requestExecution is an optional boolean, while required fields are timestamp, sessionID, messageID, prompt, and delivery.packages/sdk/openapi.json defines session.next.prompt.execution_requested with required timestamp, sessionID, and messageID, disallows additional properties, and applies ^ses and ^msg_ patterns to session and message IDs.packages/sdk/openapi.json defines session.next.step.recovered with required timestamp, sessionID, executionID, and phase; optional assistantMessageID; phases ready, unknown, and continue; and additionalProperties: false.packages/schema/test/event-manifest.test.ts expects EventManifest.ServerDefinitions.length === 61, EventManifest.Definitions.length === 91, EventManifest.Latest.size === 91, and EventManifest.Durable.size === 38.SessionV1.Event.Definitions order: 1. Created, 2. Updated, 3. Deleted, 4. MessageUpdated, 5. MessageRemoved, 6. PartUpdated, 7. PartRemoved, 8. PartDelta, 9. Diff, 10. Error.Session.Event === SessionEvent, Session.Event.Definitions === SessionEvent.Definitions, Workspace.Event === WorkspaceEvent, and Workspace.Event.Definitions === WorkspaceEvent.Definitions.session.next.step.ended to SessionEvent.Step.Ended, todo.updated to SessionTodo.Event.Updated, and project.updated to Project.Event.Updated.Project.Event.Definitions contains only Project.Event.Updated; FileSystem.Event.Definitions contains only FileSystem.Event.Edited; Integration.Event.Definitions contains Updated then ConnectionUpdated; Permission.Event.Definitions contains Asked then Replied; and Reference.Event.Definitions contains only Updated.EventManifest.Latest intentionally excludes ide.installed, although IdeEvent.Definitions contains IdeEvent.Installed.EventManifest.Definitions.slice(46, 49) is expected to be SessionV1.Event.PartDelta, SessionV1.Event.Diff, and SessionV1.Event.Error.session.next.step.ended.1; session.next.step.ended.2 maps to SessionEvent.Step.Ended; and session.next.prompt.execution_requested.1 maps to SessionEvent.PromptExecutionRequested.packages/core/schema.json 531/48; packages/core/src/database/migration.gen.ts 1/0; packages/core/src/database/migration/20260914170650_session-recovery.ts 58/0; packages/core/src/database/schema.gen.ts 48/1; packages/core/src/session.ts 5/4; packages/core/src/session/compaction.ts 31/16; packages/core/src/session/context-epoch.ts 54/34; packages/core/src/session/execution/local.ts 135/19; packages/core/src/session/input.ts 342/31; packages/core/src/session/message-updater.ts 69/0; packages/core/src/session/projector.ts 77/1; packages/core/src/session/recovery.ts 413/0; packages/core/src/session/run-coordinator.ts 30/5; packages/core/src/session/runner/index.ts 4/0; packages/core/src/session/runner/llm.ts 265/104; packages/core/src/session/runner/publish-llm-event.ts 79/29; packages/core/src/session/sql.ts 78/1; packages/core/test/database-migration.test.ts 66/1; packages/core/test/session-execution-local.test.ts 283/0; packages/core/test/session-projector.test.ts 1866/3; packages/core/test/session-prompt.test.ts 247/25; packages/core/test/session-run-coordinator.test.ts 45/0; packages/core/test/session-runner-recorded.test.ts 4/10; packages/core/test/session-runner-tool-events.test.ts 46/7; packages/core/test/session-runner.test.ts 857/17; packages/opencode/src/server/routes/instance/httpapi/server.ts 2/1; packages/schema/src/session-event.ts 43/1; packages/schema/test/event-manifest.test.ts 8/5; packages/sdk/js/src/v2/gen/types.gen.ts 190/0; packages/sdk/openapi.json 657/44; packages/server/src/routes.ts 2/0; packages/core/src/session/execution/claim.ts 66/0; packages/core/src/session/recovery-id.ts 6/0.LLMEvent.providerError({ message: "Provider unavailable" }) after step start and expects one request plus assistant projection finish: "error" with { type: "unknown", message: "Provider unavailable" }.LLMEvent.providerError({ message: "Provider unavailable" }) and still expects one request plus a terminal assistant error projection.Partial before provider error { message: "prompt too long", classification: "context-overflow" }; it expects no retry, exactly 1 request, and an assistant error retaining the partial text.Stream.fail(providerUnavailable()); session.resume(sessionID) returns that failure, and replay projects an assistant with finish: "error" and message Provider unavailable.echo call call-before-provider-error with input { text: "settled" }, then receives Provider unavailable; it expects exactly 1 model request and execution result sequence ["settled"].web_search call call-hosted-provider-error with { query: "effect" }, then emits Provider unavailable; it expects one request and the projected tool state status: "error".web_search call call-hosted-eof unresolved; after resume and projection replay, its tool state must be status: "error".web_search call call-hosted-raw-failure, then the stream fails with providerUnavailable(); resume returns the failure, and replay projects both assistant finish: "error" with Provider unavailable and the tool state status: "error".