
OpenCode 2.0 Released with Shared Background Service and Redesigned API
Anomaly launches OpenCode 2.0, introducing a shared background service that connects terminal, web, and desktop interfaces, a rebuilt API, embeddable SDK, and background execution for subagents and shell commands.
Shared Background Service Unifies Interfaces
OpenCode 2.0 introduces a single background service that runs automatically on the developer's machine. This service connects the terminal, web, and desktop interfaces so they all communicate with the same underlying process. Developers can start a session in the terminal interface, continue working through the desktop or web app, and have their own scripts connect to the same service. The service can also be exposed to other machines and paired with external applications.
The shared service replaces the earlier client/server setup that few power users adopted. Now the server starts automatically, allowing programmatic clients to discover and connect to the local service for scheduled tasks.
Redesigned API and Embeddable SDK
The new API gives the agent greater control over its environment. It can create a Git worktree for a new task, transfer an existing session into that worktree, or identify and interrupt a stuck session. Developers can access the API through the @opencode/client package, which supports standard JavaScript and Effect.
Anomaly also released an embeddable SDK distributed as @opencode/sdk. It uses the same underlying code as the OpenCode CLI, enabling developers to incorporate OpenCode directly into their own applications. These implementations can communicate with existing OpenCode clients through the standard server protocol, though the SDK remains under development.
Code Mode and Background Execution
Code Mode allows agents to write JavaScript that calls multiple tools and processes their results within a single execution. Built around a lightweight JavaScript interpreter in the @opencode/codemode package, it converts MCP servers and OpenAPI endpoints into functions that agents can invoke programmatically. For example, an agent could retrieve bug reports from GitHub, extract relevant information, and create corresponding issues in Linear without separate model round trips. Anomaly made Code Mode the default for all MCP servers in version 2.0, arguing it makes extensive integrations more practical with minimal context bloat.
Background execution now supports both subagents and shell commands. Developers can delegate a code review to a subagent running a different AI model while continuing work on the main task. Lengthy shell operations such as running tests or building an application execute asynchronously, with the primary agent receiving a notification when they finish. A keyboard shortcut can move an existing foreground task into the background if it takes longer than expected.
Plugin Architecture and Upgrade Path
Anomaly implemented more than 80 internal plugins covering most version 2.0 functionality to improve reliability and maintainability of the plugin API. Terminal interface plugins have been promoted from experimental to stable, and hot reloading support allows OpenCode to create and start using a new plugin during an active session without a restart.
Plugins developed for OpenCode 1.0 will not work with version 2.0, and integrations built around the previous server API need updating. Existing 1.x users can upgrade by running opencode upgrade --major from the command line or entering /update in the terminal interface. According to the October 11 release notes, updates are no longer installed automatically, so users must initiate the upgrade themselves.
Sources: The New Stack
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.