OpenCode 2.0 Released With Background Service, New API and Code Mode
The developers of the OpenCode AI coding agent have released version 2.0, featuring a single central background process, a rewritten API and background subagents. The release is not compatible with 1.0 plugins.

The developers of OpenCode have published version 2.0 of the tool, a major overhaul of the coding agent used by millions of people every day. The agent helps write and review code, and the new release reworks its architecture, programming interface and extension system. The changes matter to anyone who uses it daily or builds on top of it, because some existing code will stop working.
A single background service
OpenCode has used a client/server model from the start, but it was mostly the domain of power users. In 2.0 the server runs by default as one background process on the machine. The terminal interface, the web interface and the desktop app all connect to it. For scripts, the @opencode/client package discovers the local service on its own, and it can also be used for scheduled tasks. The service can be exposed to other hosts and connected using /pair or opencode pair. The developers say native apps that rely on this flow are in the works.
New API and Code Mode
The old API grew haphazardly, so it was rewritten from scratch based on real usage patterns. OpenCode is aware of its own API and can use it, for example to move a session into a git worktree.
The @opencode/codemode package contains a minimal JavaScript interpreter. It converts MCP servers (a protocol for connecting tools to agents) and OpenAPI endpoints into functions the agent can call within a script, in a single round trip rather than one at a time. All MCP servers in 2.0 use this mode by default, so a very large number can be added with minimal context bloat.
Background tasks and plugins
The primary agent can hand work to background subagents, optionally running a different model, while the user keeps prompting. Long-running shell commands can run asynchronously, with the agent notified on completion, and a hotkey moves a slow task to the background.
Nearly every 2.0 feature was implemented as an internal plugin, and there are now more than 80. Terminal interface plugins have moved from experimental to stable, and everything can be hot-reloaded mid-session. The @opencode/sdk package lets OpenCode be used as a library.
Upgrading
To upgrade, install the latest 1.x release and run opencode upgrade --major. Breaking changes include incompatibility of 1.0 plugins, an entirely different server API, and the move of the tui.json config to json.


