Dashboard › opencode › Distillation
13af6cdd-a977-4f1d-b288-a8d43a807347["lore_tm_v1_Cs9ncedZ9n2r-4BUqxo1LrsQZC8iAA0fIolEE0Fl24c","lore_tm_v1_o0tAJKcmaW8TLp5a0KvW6Imc1EBTL5HXFcp6XovyJOI","lore_tm_v1_ta2lsRhT9r8qrENGietqj98OLbNq9e_qkUcGa91jx_M","lore_tm_v1_uebb04k9Q9YlpZhfEix5vVedDJA_9oS7xIHXBfVvTuE","lore_tm_v1_1qULXU-rso6-Zp7Fs45FY6JMk7tLhjXUT7CTV62t_4U","lore_tm_v1_CeCdj3VIt7iZ45KkIFMTm6FEDqoyGtTH1HJjoxgR4II","lore_tm_v1_f3OZShxieARnKAnAugfJvOdRRzqO-LsfqT3A8RSiVdE","lore_tm_v1_5avyb6ometKFxPCnuPpD4JRjJcBDrbqjM-rBKzX1YbQ","lore_tm_v1_IP2Wmq-yG5MgwywNdq0sIBvzmS8hayw5zFaZVcc8PAw","lore_tm_v1_wAm8KyVVpcbddfHdw-CZd6oDPJHiVARWoOtkGnzC4lQ","lore_tm_v1_sj77Rrv_0CkNp3EUFZTpaNNEzN-Nso7MeL0QnejKuc4","lore_tm_v1_XjEWPd286LWZAaNsyBN_eDCsVFmwl5m7xLSatDijtkM","lore_tm_v1_KIBrc57ALvDTxil4QfIXEPVsmhUS3Dy2F_SQshlYwkk"]
Date: Sep 14, 2026
/home/byk/Code/opencode; no files may be edited or implementation performed.continue; then wake through the normal path.SessionPrompt./home/byk/Code/opencode/AGENTS.md, /home/byk/Code/opencode/CONTRIBUTING.md, and package-specific AGENTS.md files under packages/codemode, packages/session-ui, packages/schema, packages/effect-drizzle-sqlite, packages/llm, packages/opencode, packages/stats, packages/core/src/tool, packages/ui, packages/app, packages/desktop, and relevant test/server/session subdirectories.packages/core/src/session/projector.ts, compaction.ts, todo.ts, store.ts, sql.ts, schema.ts, run-coordinator.ts, revert.ts, prompt.ts, message.ts, message-updater.ts, input.ts, info.ts, history.ts, execution.ts, event.ts, error.ts, context-epoch.ts, execution/local.ts, and runner files runner/index.ts, runner/llm.ts, runner/model.ts, runner/max-steps.ts, runner/to-llm-message.ts, runner/publish-llm-event.ts.packages/core/test/session-runner.test.ts, session-projector.test.ts, session-compaction.test.ts, session-runner-tool-registry.test.ts, session-runner-recorded.test.ts, session-prompt.test.ts, session-history.test.ts, session-create.test.ts, move-session.test.ts, session-tool-progress.test.ts, session-todo.test.ts, session-runner-tool-events.test.ts, session-runner-model.test.ts, session-runner-message.test.ts, and session-run-coordinator.test.ts.packages/server/src/routes.ts, auth.ts, pty-environment.ts, location.ts, handlers.ts, api.ts, cors.ts, middleware/session-location.ts, middleware/schema-error.ts, middleware/authorization.ts, and handlers under packages/server/src/handlers/, including session.ts, message.ts, and event.ts.effect-smol APIs to be verified against .opencode/references/effect-smol and nearby repository code rather than answered from memory; reusable workflows should use Effect.gen(function* () { ... }) and Effect.fn("Name") or Effect.fnUntraced(...) where appropriate.testEffect(...) from packages/opencode/test/lib/effect.ts, with it.live(...) for live platform behavior and explicit test layers/scoped fixtures.packages/opencode. This is enforced by the root package.json script "test": "echo 'do not run tests from root' && exit 1" and /home/byk/Code/opencode/AGENTS.md:141-145.bun typecheck from package directories such as packages/opencode, never tsc directly (/home/byk/Code/opencode/AGENTS.md:147-149).sdk-next composes Client, Core, and Server (/home/byk/Code/opencode/AGENTS.md:3).import { foo as bar } from "..." or resolve as pathResolve (/home/byk/Code/opencode/AGENTS.md:59-64).import * as Foo from "..." and import type * as Foo from "..."; namespace-style usage must import the moduleβs own named namespace, e.g. import { Project } from "@opencode-ai/core/project" and then Project.ID.await import("./module").then((mod) => mod.value()) or (await import("./module")).value() should be avoided.SessionV2.prompt(...) admits one durable session_input row before scheduling advisory SessionExecution.wake(sessionID), unless resume: false requests admit-only behavior; the serialized runner promotes admitted inputs at safe boundaries (/home/byk/Code/opencode/AGENTS.md:151-154).SessionExecution process-global and Session-ID based. Its local implementation owns the process-local Session coordinator and discovers placement via SessionStore plus LocationServiceMap.get(session.location) only when a drain starts; no layer should take a Session ID. Interruption targets the active process-local ownership chain, and idle or missing interruption is a no-op (/home/byk/Code/opencode/AGENTS.md:155).SessionRunner, model resolution, tool registry, permissions, and filesystem must remain Location-scoped; omitted Location.workspaceID means implicit-local placement, while explicit workspace identity is reserved for future placement semantics (/home/byk/Code/opencode/AGENTS.md:156).llm.stream(request) call per provider turn and reload projected history before durable continuation; orchestration must not bridge through SessionPrompt.loop(...) or delegate to an in-memory tool loop (/home/byk/Code/opencode/AGENTS.md:157).SessionRunCoordinator joins explicit same-Session resumes, coalesces prompt wakeups, and permits different Sessions to run concurrently. Advisory wakes drain only eligible durable inbox rows. Existing policy explicitly states that post-crash continuation recovery requires a separate explicit design before provider work may be retried, and that a drain has no durable identity or transcript boundary (/home/byk/Code/opencode/AGENTS.md:158).queue inputs remain pending until the Session would otherwise idle; one queued input is promoted at that boundary before continuation is reevaluated; promoting new user input resets the selected agentβs provider-turn allowance, with a batch of steers resetting it once (/home/byk/Code/opencode/AGENTS.md:159)./home/byk/Code/opencode/AGENTS.md:160).any, unnecessary try/catch, non-null assertions, unchecked casts, unnecessary destructuring, reassignment, and else where early returns suffice.packages/schema/src/session.ts, session-id.ts, session-event.ts, session-message.ts, session-input.ts, session-delivery.ts, session-status-event.ts, event.ts, event-manifest.ts, durable-event-manifest.ts, and packages/protocol/src/groups/session.ts plus packages/protocol/src/groups/message.ts.packages/core/package.json defines "test": "bun test --only-failures" and "typecheck": "tsgo --noEmit"; packages/server/package.json defines "typecheck": "tsgo --noEmit". The repository uses Bun 1.3.14, Effect 4.0.0-beta.83, Drizzle ORM 1.0.0-rc.2, and TypeScript 5.8.2.