Dashboard › opencode › Distillation
4acb489f-deb5-4ab0-8af5-8a67dbd13159["lore_tm_v1_Rvw_8bAhN-BCUxIHqC4gv2d2H0D5UF9P-JYfU0u8EXQ","lore_tm_v1_slELmBm_a8bmWcX7_9fBXc5UqQn_PvRQD25yBW3fmHE","lore_tm_v1_zmEE6M2jxVJ8Zca7tWxbtvTWcV74Mxj0FqyA0KUcq0o","lore_tm_v1_QXs-JJ1shL_-rFT9CIjvOEzpXPhHG4MTfj1YNq3ssao","lore_tm_v1_MGj70LgFydB4zer4VBjoQXyY4mFP0lR7z7nMTCNxhgA","lore_tm_v1_jfS2js461-jP9U7klxr1U5kJ8KMlj6qTGJQvz01QH8w","lore_tm_v1_FrgMcwn7EE02wyk-rPStRsQsJwJMvJq60wpDy3ByjGQ","lore_tm_v1_e_Oqy65CdPZBLqi5XXKZqB7sPZ69qJcVu5ceLLfR3kg","lore_tm_v1_e-05Qwdi5wScKgGM32U69gQQvGbYHcBdy84ztlxdXYM","lore_tm_v1_98PHPr-3YY2eMLX4XxjOcHKQDW_Ih_kqRXWn94apbkA"]
Date: Sep 17, 2026
packages/core/test/session-runner.test.ts line 752.packages/core/test/session-runner.test.ts line 778.packages/core/test/session-runner.test.ts line 805.packages/core/test/session-runner.test.ts line 845.packages/core/test/session-runner.test.ts line 1975.packages/core/test/session-runner.test.ts integration coverage includes advertising/executing a globally attached application tool (line 902), starting a real runner turn after default prompt recording (line 958), streaming one request with registry definitions from chronological V2 user history (line 977), and retrying the first provider turn after system context becomes available (line 1002).packages/core/test/session-runner.test.ts context and agent-system coverage includes graceful failure for an undecodable stored context snapshot (line 1060), reusing one durable baseline after the context producer changes (line 1085), including the effective default agent system before durable context (line 1119), using the configured default agent system for omitted-agent sessions (line 1140), using an explicitly selected non-build agent system (line 1167), updating selected-agent skill guidance after an agent switch (line 1196), admitting removed context as a chronological System message (line 1285), keeping the baseline and chronological System updates after a model switch (line 1306), and preserving the baseline while context is temporarily unavailable (line 1351).packages/core/test/session-runner.test.ts compaction coverage includes rebuilding the baseline directly after completed compaction (line 1383), automatically compacting into a completed summary and retained recent turn (line 1422), keeping automatic compaction unknown until Compaction.Ended commits (line 1495), recovering the continuation committed with Compaction.Ended (line 1542), retaining only complete serialized messages during compaction (line 1596), summarizing an oversized newest message without retaining a fragment (line 1628), forcing one compaction and retry after provider context overflow (line 1657), persisting a second context overflow after one recovery (line 1686), recovering once from raw context-overflow failure (line 1709), publishing the original overflow when recovery summarization fails (line 1737), interrupting overflow recovery while the summary provider runs (line 1757), and preserving effective System updates while compaction rebaseline is blocked (line 1782).packages/core/test/session-runner.test.ts also verifies projecting reasoning and tool events without executing or continuing tools (line 1819), restoring durable reasoning-provider metadata in a second-turn request (line 2348), durably failing pending tool input left by a prior process before continuing (line 3155), promoting the first queued input when awakened while idle (line 3194), retrying inbox input after prompt projection rolls back (line 3214), and not stranding a committed promotion when a post-commit listener defects (line 3240).packages/core/test/session-runner.test.ts concurrency and request-metadata coverage includes running different Sessions concurrently (line 3262), adding Session correlation headers to model requests (line 3294), adding the parent Session header to child model requests (line 3310), bounding 64-character Session prompt cache keys (line 3331), and fanning out one failed run while allowing a later retry (line 3361).packages/core/test/session-runner.test.ts local-tool outcome coverage includes durably settling local-tool failures before continuing (line 3392), returning unexpected local-tool defects to the model and continuing (line 3438), returning policy-blocked tools to the model and continuing (line 3486), interrupting continuation when permission approval is declined (line 3535), returning permission corrections to the model and continuing (line 3649), and interrupting continuation when a question is dismissed (line 3698).packages/core/test/session-runner.test.ts interruption and cancellation coverage includes awaiting started local tools before surfacing provider-stream failure (line 3754), durably failing blocked local tools when a provider turn is interrupted (line 3845), settling cancellation when interrupted-tool publication defects (line 3906), settling cancellation after Step failure while a local tool is active (line 3952), settling cancellation when Step-start notification is interrupted (line 4001), retaining the claim after Step interruption until runner finalizers finish (line 4055), interrupting a blocked provider turn without local-tool execution (line 4120), and durably failing blocked local tools when interrupted while awaiting settlement (line 4143).packages/core/test/session-runner.test.ts final-step and provider-failure coverage includes forcing a text response on an agentβs configured final step (line 4183), resetting the configured step allowance when steering input promotes (line 4231), projecting provider errors as terminal assistant Step failures (line 4283), projecting provider errors emitted before assistant Step start (line 4305), not recovering context overflow after durable assistant output (line 4324), projecting raw provider-stream failures as terminal assistant Step failures (line 4353), and not automatically continuing after a provider error follows a local-tool call (line 4370).packages/core/test/session-runner.test.ts hosted-tool and stream-block coverage includes durably failing a hosted tool when its provider errors before returning a result (line 4395), at normal provider EOF (line 4426), or after raw provider-stream failure (line 4458); keeping interleaved assistant text blocks separate (line 4495); broadcasting provider deltas without storing projection rewrites (line 4532); and durably closing partial provider blocks when the stream fails (line 4536) or is interrupted (line 4538).packages/server/src/handlers/session.ts, the session.prompt handler at lines 140β170 passes sessionID, id, prompt, delivery, and resume: ctx.payload.resume to session.prompt(). It maps Session.NotFoundError to SessionNotFoundError and Session.PromptConflictError to ConflictError with resource error.messageID.packages/server/src/handlers/session.ts, session.compact at lines 173β194 and session.wait at lines 197β218 map Session.OperationUnavailableError to ServiceUnavailableError with service session.${error.operation}; session.interrupt at lines 366β370 calls session.interrupt(ctx.params.sessionID) and returns HttpApiSchema.NoContent.make().packages/server/src/handlers/session.ts behavior: session.history uses after: ctx.query.after and limit: ctx.query.limit ?? DefaultSessionHistoryLimit, returning data: page.events and hasMore: page.hasMore (lines 333β355); session.events streams session.events({ sessionID, after }).pipe(Stream.orDie) (lines 357β364); and session.message returns MessageNotFoundError when no message exists (lines 372β382).packages/sdk/js/src/v2/gen/types.gen.ts define SyncEventSessionNextPromptAdmitted with event type session.next.prompt.admitted.1, delivery "steer" | "queue", and optional requestExecution?: boolean (lines 3416β3433), plus SyncEventSessionNextPromptExecutionRequested with event type session.next.prompt.execution_requested.1 and fields timestamp, sessionID, and messageID (lines 3435β3449).packages/sdk/js/src/v2/gen/types.gen.ts define: SyncEventSessionNextStepStarted as session.next.step.started.1 with assistantMessageID, agent, model: ModelRef, and optional snapshot; SyncEventSessionNextStepEnded as session.next.step.ended.2 with finish, cost, token counts (input, output, reasoning, cache read/write), optional snapshot, and optional files; and SyncEventSessionNextStepFailed as session.next.step.failed.2 with error: SessionErrorUnknown (lines 3520β3583).packages/sdk/js/src/v2/gen/types.gen.ts define SyncEventSessionNextStepInterrupted as session.next.step.interrupted.1 with assistantMessageID and error: SessionErrorUnknown, and SyncEventSessionNextStepRecovered as session.next.step.recovered.1 with executionID, optional assistantMessageID, and phase "ready" | "unknown" | "continue" (lines 3585β3618).packages/core/schema.json includes tables session_context_epoch, session_execution, session_input, session_message, and session_recovery (lines 61β79). Search results also identify primary keys session_execution_pk and session_recovery_pk, foreign keys from session_execution/session_recovery to Session-related records, indexes including session_execution_session_idx, session_execution_owner_idx, session_execution_recovery_scan_idx, session_recovery_continuation_message_idx, and session_recovery_wake_pending_error_attempts_created_execution_idx, plus wake_attempts checks bounded from 0 through 9007199254740991.