ok we need to work towards a launch of v2 so we can get out of this rebuild phase
The opencode server has moved to the Effect HttpApi backend. Remaining work is mostly cleanup: delete compatibility shims, shrink Zod surfaces, and simplify test harnesses that used to compare Hono and HttpApi behavior.
This is mostly done. I'm working through modeling subagents, skill invocations and shell commands.
The first Effect-native local runner slice is implemented without bridging
through legacy SessionPrompt.loop(...):
SessionExecution.resume(sessionID) discovers Location from
the Session read modelSessionRunner resolves one supported catalog model
and issues one explicit llm.stream(request) step at a timeToolRegistry advertises definitions and the first permission-checked
read built-inPrompt admission now uses a durable session_input inbox rather than immediate
transcript projection. steer inputs promote at the next safe step
boundary while the current drain requires continuation. queue inputs remain in
a FIFO until the Session would otherwise become idle and then promote one at a time.
Next reviewed slices:
@opencode-ai/llm tool loop after replacing its
remaining single-step native-adapter use with a narrow typed dispatcherDo not infer that ambiguous provider work is safe to retry from an advisory wake, an unmatched historical session.execution.started event, or a surviving session.retry.scheduled projection.
The first inbox-driven runner intentionally omits outer physical-attempt markers
until they have a concrete consumer and a complete recovery policy.
Design post-crash continuation recovery as one explicit slice. It should model:
retry and abandon decisions for unknown outcomesDo not introduce an enclosing durable execution identity solely to group these facts; a process-local Session drain has no durable transcript boundary.
We need to figure out how we want server plugins to work and what hooks are useful.
Some ideas:
opencode.session.prompt() or
opencode.tool.register({...})We should do another pass on config to clean up any mistakes we made with it and simplify as much as possible. Old configs should get auto-converted to new
I have a basic auth system that can track any kind of auth, not just providers
I have a basic model service that allows for models to be registered dynamically
Providers should register as plugins and autoload based on whatever logic they want / config. They should register models into model database
The self-contained durable EventV2 core service is implemented. It owns
sync-versioned persistence, transactional sequencing, pub/sub, replay, and
replay-owner claims without relying on the old bus system.
Remaining slices:
Keep these visible, but do not block functionality slices on them unless a concrete failure appears during canary work:
RcMap and one
shared PubSub.sliding<void>(1) per active aggregate; keep SQLite cursor replay
and subscribe-before-history semantics unchangeditem_reference when store !== false, while store: false intentionally omits the unavailable reference path@opencode-ai/llm orchestration exportsopenat, O_NOFOLLOW, and descriptor-relative mutation where supported)Instead of needing to tear down things when something changes every service should emit granular events so services can react to them and reconfigure themselves. Allows frontend to receive these too, eg model.added. also prevents startup from blocking