The source explains that OpenCode 2.0 is a major overhaul built on feedback from millions of daily users. It notes that the client/server model, which previously required manual activation, now runs automatically as a single background process on the user’s machine. When a TUI, web interface, or desktop app is opened, they all communicate with this central process, and the programmatic client @opencode/client can auto‑discover the local service and work without additional configuration. The source adds that the service can be exposed to other hosts using the /pair or opencode pair command, enabling connections to other applications and upcoming native apps.

Regarding the API, the source says the previous interface had grown haphazardly and was rebuilt from scratch after examining the diverse use cases of the millions of users. The new API now supports nearly any operation an agent might need and is even aware of itself, able to call its own endpoints to perform actions such as moving the current session into a git worktree when starting new work. A new client package, @opencode/client, provides bindings for vanilla JavaScript and Effect.
The source highlights a feature called Code Mode, which includes a minimal JavaScript interpreter in the @opencode/codemode package. This interpreter can ingest MCP servers or OpenAPI endpoints and turn them into callable functions for the agent, allowing scripts to run natively without Node.js VMs or heavyweight embeddings like QuickJS. It enables agents to write scripts that call a tool, map over results, and call another tool in a single round‑trip. All MCP servers in version 2.0 are opted into Code Mode by default, letting users add many of them with little context bloat.
On background processing, the source describes two additions: background subagents, which let the primary agent delegate work to another agent while continuing to prompt, and background shell commands, which allow the shell tool to run asynchronously so long‑running tasks do not block the primary agent. A hotkey can move foreground shell commands or subagents to the background to keep the interaction flowing.
The plugin system has been overhauled; the source notes that nearly every OpenCode 2.0 feature is implemented as an internal plugin, resulting in over 80 plugins that keep the Plugin API well maintained. TUI plugins have been promoted from experimental to stable, and everything can be hot‑reloaded, allowing users to write a plugin for OpenCode mid‑session and use it immediately.
Finally, the source introduces the @opencode/sdk package, which exposes the same code that powers the CLI as a library. This enables developers to create their own flavours of OpenCode for servers or specialized environments like Durable Objects, while still connecting via the standard OpenCode server protocol. An optional Effect‑based API is also available, though still under development. Upgrading instructions are provided, with notes that 1.0 plugins are incompatible, the server API is completely different, and the tui.json config has been moved to JSON, though many other changes remain backwards compatible.
