OpenCode 2.0 Released: Major Overhaul for Coding Agents
OpenCode 2.0 introduces a centralized background service, a new API for improved agent coordination, and significant changes to configuration and plugin support.
OpenCode 2.0 introduces a centralized background service for enhanced agent orchestration.
- OpenCode 2.0 upgrades to a mandatory background service architecture, consolidating TUI, web, and desktop interfaces.
- The update introduces a refactored API, native sub-agent support, and background shell commands for better task orchestration.
- Configuration structures have been updated to a global format, with a migration utility provided for existing users.
A New Architecture for OpenCode
The developers of OpenCode have released version 2.0, a significant architectural update designed to improve system performance and coordination for automated coding agents. Central to this release is a shift toward a consistent client/server model. While previous versions allowed for client/server interactions, version 2.0 mandates a background service process that runs locally on the host machine. This central service acts as the communication hub for the CLI, web interface, and desktop application, ensuring state consistency across different user inputs.
Enhanced Orchestration and Sub-agents
Version 2.0 focuses on the ability of models to handle concurrent tasks. A key addition is the support for background sub-agents. Primary agents can now delegate specific tasks—such as code review or testing—to a secondary, "fable" sub-agent, which operates independently without blocking the primary workflow. This capability extends to the shell environment as well, allowing long-running shell commands to execute asynchronously. Users can monitor these background tasks and have the option to move active foreground processes to the background via a dedicated hotkey.
API Refactoring and Code Mode
The internal API has been rewritten from scratch to better accommodate the varied requirements of modern coding agents. The system now includes a specialized JavaScript interpreter via the @opencode/codemode package. This allows the system to natively execute scripts that integrate with MCP (Model Context Protocol) servers or OpenAPI endpoints. By converting these endpoints into executable functions, OpenCode enables agents to chain tool calls in a single round trip, reducing the latency associated with multiple sequential requests.
Plugin and Configuration Updates
Plugin architecture has received significant attention in this release. To ensure maintainability, the developers implemented most of the version 2.0 features as internal plugins, resulting in a stable library of over 80 plugins. TUI plugins have transitioned from experimental to stable status. Furthermore, the system now supports hot-reloading for these plugins, allowing agents to modify or create new plugin functionality during an active session.
For existing users, version 2.0 introduces breaking changes in configuration management. The previous layered configuration files have been replaced by a global cli.json structure. The transition involves three primary areas: the plugin API, server/client contracts, and configuration file formats. To simplify this, the platform includes an automated migration command, opencode upgrade --major, which handles the transition for the CLI. The documentation emphasizes that while V1 and V2 are not meant to run side-by-side by default, most existing definitions within the .opencode/ directory remain compatible.
The developers recommend that users keep a copy of their V1 setup during the transition. Once the new version is initialized, the system automatically normalizes supported configuration fields into memory. Detailed migration guides for permissions, snapshots, and MCP server definitions are available through the official documentation, providing a clear path for users to adopt the new native format at their own pace.
Enjoyed this?
Get more posts like this delivered to your inbox.
Claude Managed Agents Introduces Dynamic Workflows in Public Beta
Next →CopilotKit Releases Open Intelligent UI: An Open-Source Generative UI Framework