AI NewsDev toolsAnnouncement

OpenCode 2.0 ships a new API and one shared background service

Anomaly posted the OpenCode 2.0 release with a rewritten API, a shared background service for the terminal, desktop and web apps, Code Mode for chaining MCP tool calls in one round trip, and background subagents and shell commands.

AI News

Editorial3 min read

LinkedInX
Social share card for the OpenCode 2.0 release post on anoma.ly

Image: Anomaly

Why it mattersTeams running the 213,000-star open-source coding agent in several interfaces can now share one session across them, chain many MCP tools in one agent round trip, and leave a subagent or a long shell command running in the background.

An open-source coding agent that most developers reach through its terminal interface has rebuilt itself as a background service that every interface talks to, with a new API, a new SDK and a way for the agent to write one program instead of thirty tool calls. Anomaly, the company behind OpenCode, posted the 2.0 release on 12 October and called it a major overhaul. The repository stands at 213,275 stars.

The release follows a long public beta. In the post, Anomaly says the old API grew piece by piece while nobody knew what agents should look like, and calls it bad. The new version drops that API, introduces a dedicated SDK and client package, and ships several agent-facing features at the same time.

The shared service

A background server now starts automatically on the developer's machine, and OpenCode's terminal, desktop and web apps all talk to it. A session started in the terminal continues in the desktop app and the web app without a copy or an export. Scripts written against the new @opencode/client package can discover the local service and reach the same session, which Anomaly says makes it usable for scheduled jobs.

Code Mode

The second big change is how agents call tools over the Model Context Protocol. OpenCode 2.0 ships a small JavaScript interpreter in a package called @opencode/codemode that turns MCP servers and OpenAPI endpoints into functions the agent calls from code. A single program can read bug reports from GitHub, pull out the relevant fields and create Linear issues, in one agent round trip rather than one round trip per tool. Code Mode is the default for every MCP server in 2.0, and Anomaly writes that this makes a thousand servers practical without context bloat.

Background subagents and shell commands

Subagents and long shell commands can now run in the background. A developer can hand a code review to a subagent running a different model while the main agent keeps working. Builds and test runs execute asynchronously and send a notification when they finish. A keyboard shortcut moves a foreground task to the background if it starts to take longer than planned.

Plugins, SDK and the upgrade path

Anomaly says it has rewritten more than 80 of its own plugins against the new API as a reliability test, and marks terminal-interface plugins as stable. Hot reloading lets a new plugin start inside an active session without a restart. An embeddable SDK, distributed as @opencode/sdk, uses the same code as the CLI and runs in environments like Cloudflare Durable Objects. Plugins written for 1.0 do not work on 2.0, and the server API change breaks any integration built against the old one.

Existing users upgrade by running opencode upgrade --major or /update inside the terminal. Updates no longer install automatically, so the move to 2.0 is an action a person takes rather than a surprise.

The reason to care, for a team running an agent against many MCP servers, is Code Mode: it is the first time a popular open-source coding agent has made one program for many tool calls the default rather than an experiment, and the token cost of a long chain of tool calls is where agents still waste the most money.

Source

OpenCode 2.0 by Anomaly, and reporting by The New Stack.

SourceAnomaly

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project