Dashboard › opencode › Distillation
2d7b4170-33e8-4fd3-9e28-b2aa0c71f59f["lore_tm_v1_Xg6vvZ0GT1GKj2oxyj0Bezjy6MXQ_srATh-TB2OiGeo","lore_tm_v1_2bkuwDF_6LrQLodNaw4J_EX1trV0laVMA3GqnLphufI","lore_tm_v1_NAtdnF_Slqtd6n2PrSvTLC_T7jc84y41B8W7DdvF_zw","lore_tm_v1_kqujg9jU6jtNxufpW1p_-zqpDFyI8G30ZvWwK1ut5yY","lore_tm_v1_-Eh3UAN8q0YzGP_pr0sh8qYdj2KHLws8zaVLLziRgkE","lore_tm_v1_NqMnipdpzUbK1CFrLry7N0nB2ViGYhdwV0pDv20NLN4","lore_tm_v1_yxe44XZIV9AIVKpa1_U0YpjLAnVftFRZaIYJqJZO9Uo","lore_tm_v1_3DaNiLW_mhEktZHtjUaSPMnvYfw1guiz9Tn7qH0uI9Y","lore_tm_v1_5MNSzdKS_oQcXEVvdTSMhgzPdO5aAcuV126TXPjR5lg","lore_tm_v1_s_E4kDWp01xX9zrTO3ui9vKfb5k-D1Bn9A7ZdxP0hsU","lore_tm_v1_O6NLia3yqxFVK8dA9swwOHy-RYypXZTYQZwGmukPIaI","lore_tm_v1_jgCbvzUAkd3Lq4QzvVaClyrAHeJaCYSvtSe5Rd4RYXE","lore_tm_v1_DLS_fM2Ytxz7tfPwHJQ56q-rZ0W-BNHKi7hQ83kCx3U"]
Date: Sep 14, 2026
/home/byk/Code/opencode/packages/core/test/session-runner.test.ts lines 1600-1849. Tests cover: durable provider reasoning metadata replay (anthropic.signature, openai.itemId, openai.reasoningEncryptedContent); inline replay of provider-executed web_search tool calls/results; eager parallel execution of 5 recorded local echo tools with maxActiveToolExecutions exactly 5 while blocking provider continuation until settlement; repeated provider-local tool-call ID tool_0 settling against the correct owning assistant messages before and after replaySessionProjection(sessionID); and joining concurrent resume calls into one active provider run."starts recorded local tools eagerly and awaits settlement before continuing" at /home/byk/Code/opencode/packages/core/test/session-runner.test.ts:1687, 5 calls named call-echo-0 through call-echo-4 are started concurrently; context shows all 5 as status: "running", requests remains length 1 after the provider finishes, and becomes length 2 only after toolExecutionGate settles."settles repeated provider-local tool call IDs against their owning assistant messages" at /home/byk/Code/opencode/packages/core/test/session-runner.test.ts:1748, two sequential echo executions reuse ID tool_0 with inputs/results "first" and "second"; execution order is ["first", "second"], exactly 3 provider requests occur, and both completed results remain attached to their respective assistant messages after projection replay./home/byk/Code/opencode/packages/core/src/session/run-coordinator.ts, /home/byk/Code/opencode/packages/core/src/session/execution.ts, /home/byk/Code/opencode/packages/core/src/session/execution/local.ts, /home/byk/Code/opencode/packages/core/src/session/runner/llm.ts, /home/byk/Code/opencode/packages/core/src/event.ts, /home/byk/Code/opencode/packages/core/src/session/input.ts, and /home/byk/Code/opencode/packages/core/src/filesystem/protected.ts./home/byk/Code/opencode/packages/core/src/session/execution.ts documents wake(sessionID) as registering newly recorded work and allowing repeated wakeups to coalesce; /home/byk/Code/opencode/packages/core/src/session/runner/llm.ts documents one local active drain per session, explicit resumes joining, and prompt wakeups coalescing.SessionExecutionLocal integration: /home/byk/Code/opencode/packages/opencode/src/session/session.ts:14 imports @opencode-ai/core/session/execution/local; /home/byk/Code/opencode/packages/opencode/src/server/routes/instance/httpapi/server.ts:301 wires [SessionExecution.node, SessionExecutionLocal.node]; and /home/byk/Code/opencode/packages/server/src/routes.ts:52 supplies the same service-to-local-layer pairing through AppNodeBuilder.build(...)./home/byk/Code/opencode/packages/opencode/src/session/session.ts: cancelBackgroundJobs() cancels all running jobs whose job.id, metadata.sessionId, or metadata.parentSessionId matches the session, with unbounded concurrency; listByProject() filters by project/workspace/path/directory/root/start/search, orders by SessionTable.time_updated descending, and defaults to a limit of exactly 100; the exported node depends on BackgroundJob.node, RuntimeFlags.node, Database.node, and EventV2Bridge.node./home/byk/Code/opencode/packages/core/src/event/sql.ts: EventSequenceTable stores aggregate_id as primary key, seq, and nullable owner_id; EventTable stores durable events with cascade deletion from EventSequenceTable, unique index event_aggregate_seq_idx on (aggregate_id, seq), and index event_aggregate_type_seq_idx on (aggregate_id, type, seq)./home/byk/Code/opencode/packages/core/src/event.ts: replay APIs accept ownerID and strictOwner; strict replay can fail with Replay owner mismatch for aggregate ...; ownership may be populated when currently null; claim(aggregateID, ownerID) updates EventSequenceTable.owner_id./home/byk/Code/opencode/packages/core/src/event.ts:541-604: readAfter(aggregateID, after) reads events where seq > after in ascending sequence; subscribeDurable() creates a sliding PubSub<void>(1) wake channel registered per aggregate and removes/shuts it down on scope release; durable() starts at after ?? -1, emits historical events, updates its cursor from the last durable sequence, and then rereads/streams events after each wake.