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) provider turn 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 coalesce into the active activity at the
next safe provider-turn boundary. queue inputs form a FIFO of future activities
that open one at a time. A process-global SessionRunCoordinator coalesces process-local wakeups
around settlement races. Explicit run resumes perform at least one provider
attempt; advisory wake notifications call the provider only for eligible inbox
work. Steers coalesce into the active activity at
safe provider boundaries; queued inputs open later activities one at a time in
FIFO order.
Next reviewed slices:
@opencode-ai/llm tool loop after replacing its
remaining one-turn native-adapter use with a narrow typed dispatcherDo not infer that ambiguous provider work is safe to retry from an advisory wake. The first inbox-driven runner intentionally omits outer provider-attempt markers until they have a concrete consumer and a complete recovery policy.
Design post-crash activity recovery as one explicit slice. It should model:
retry and abandon decisions for unknown outcomesThe new agent loop needs to trigger compaction properly
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