OpenCode 2.0 Released with Centralized Service, Code Mode, and Background Tasks
Key point
The update introduces a single background service process, a native JavaScript interpreter for tool orchestration, and asynchronous background subagents.
Details
OpenCode 2.0 is a major overhaul designed to support complex agent workflows, drawing on experience from millions of daily users. The release shifts the architecture to a centralized Service model where a single background process handles all client interactions, including the TUI, web interface, and desktop app. This allows programmatic clients using @opencode/client to autodiscover the local service, simplifying script creation and scheduled tasks.
New API and Code Mode
The API has been rebuilt from scratch to support diverse use cases, enabling OpenCode to manage its own sessions, such as moving work into git worktrees. A key addition is Code Mode, powered by the @opencode/codemode package, which includes a minimal JavaScript interpreter. This allows agents to ingest MCP servers or OpenAPI endpoints and convert them into callable functions within scripts. By running these scripts natively without Node.js VMs or QuickJS, agents can perform complex tool orchestration in a single round trip, reducing context bloat even when thousands of MCP servers are active.
Background Tasks and Plugins
To leverage modern models' orchestration capabilities, OpenCode 2.0 introduces Background Tasks. This includes background subagents that can run concurrently with the primary agent, and asynchronous shell commands that prevent long-running operations from blocking the session. Users can manually move foreground tasks to the background via a hotkey. The plugin system has also been stabilized, with over 80 internal plugins now powering the core features. TUI plugins are promoted from experimental to stable, and the entire system supports hot-reloading, allowing OpenCode to write and use its own plugins mid-session.
SDK and Upgrade Path
The @opencode/sdk package allows OpenCode to be used as a library, enabling custom deployments on servers or specialized environments like Durable Objects. Upgrading requires moving to the latest 1.x release and running opencode upgrade --major. Breaking changes include the incompatibility of 1.0 plugins, a completely different Server API, and the migration of tui.json config to JSON.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.