OpenCode, a coding agent used by millions of developers every day, has released version 2.0, a major rework of how the tool is built rather than just a feature update. The changes focus on making the agent’s underlying architecture smarter about orchestration, scripting, and running multiple tasks in parallel, which matters because it signals where AI coding assistants are headed next: less about single chat responses, and more about managing background work like a small team of engineers.
A single background server now powers everything
OpenCode has always used a client/server model, but in practice this was an option mostly exploited by power users. In 2.0, the server automatically runs as one background process on your machine. The terminal interface (TUI), web interface, and desktop app all now talk to this same central process instead of running as separate, disconnected instances.
This has practical benefits. The programmatic client package @opencode/client can autodiscover the local service, which is useful for building scheduled tasks or custom scripts without manual setup. There are also new opencode api CLI commands, and a /pair or opencode pair command to expose the server to other hosts and connect it to other applications. The company says native apps that take advantage of this shared-server flow are in development.
A rebuilt API designed around real usage patterns
According to the OpenCode team, the original API “grew haphazardly” as both the company and the broader industry were still figuring out what AI agents needed to do. In 2.0, the API was rebuilt from scratch based on patterns observed across its large user base. The new API is broad enough that OpenCode can call itself — for example, automatically moving a session into a git worktree when starting new work, without the user asking for it explicitly.
Alongside the new API, OpenCode shipped a new client package, @opencode/client, with support for both vanilla JavaScript and the Effect framework, giving developers more structured ways to script against the agent.
Codemode lets the agent write scripts instead of making one tool call at a time
One of the more technically interesting additions is @opencode/codemode, a minimal JavaScript interpreter built specifically for this use case. Instead of embedding a full Node.js VM or a sandboxing solution like QuickJS, OpenCode built something lighter that runs scripts natively.
The idea is that large language models are already good at writing code, so OpenCode leans into that instead of fighting it. Codemode ingests MCP (Model Context Protocol) servers or OpenAPI endpoints and converts them into callable functions. The agent can then write a short script that calls a tool, processes the results, and calls another tool — all in a single round trip, rather than making separate requests back and forth for each step.
All MCP servers in OpenCode 2.0 are opted into codemode by default. This is a meaningful design choice: it means a user could connect a very large number of MCP servers without bloating the context window, since the agent discovers and composes the relevant functions on demand rather than having every tool description loaded upfront.
Background subagents and shell commands keep work moving
OpenCode 2.0 also adds the ability to run work in the background rather than blocking the main conversation. Background subagents let the primary agent hand off a task — such as a code review — to another agent instance while continuing to respond to the user. This can happen automatically, or be triggered manually, including with a different model than the main agent is using.
Similarly, shell commands can now run asynchronously as background shell commands. Long-running tasks like test suites or builds no longer have to block the agent from responding; the user is notified when the command finishes. There’s also a hotkey to move a foreground command or subagent to the background mid-task if it’s taking longer than expected, which is a small but practical workflow improvement for anyone used to waiting on a terminal to free up.
A plugin system built by using it internally
OpenCode 1.0 technically had a plugin system, but by the team’s own account it “never got the attention it needed.” For 2.0, the team forced itself to implement nearly every new feature as an internal plugin, resulting in more than 80 plugins. The logic is straightforward: if the core product depends on the plugin API working well, it’s far less likely to be neglected.
TUI plugins, which are built on OpenCode’s OpenTUI framework, have also been promoted from experimental to stable status, opening the door to more community-built interface extensions. The system also supports hot-reloading throughout, meaning OpenCode can write a new plugin for itself mid-session and start using it immediately, a capability the team says it detailed in an earlier blog post.
What this means for developers trying OpenCode
For existing OpenCode users, the shift to a unified background server and rebuilt API is mostly invisible in day-to-day use but should make scripting, automation, and multi-interface workflows noticeably more consistent. For developers building on top of OpenCode, the new @opencode/client package and expanded API surface are the more concrete entry points to explore.
The bigger-picture takeaway is architectural: OpenCode 2.0 is betting that coding agents need to behave less like a single chatbot and more like a coordinator managing parallel scripts, subagents, and tool calls. Whether that approach holds up against other coding agents on the market will depend on how reliably the background orchestration and codemode scripting perform in real projects, something only broader usage will reveal.
Frequently asked questions
Do I need to configure the new background server manually? No. According to OpenCode, the server now runs automatically as a single background process, and the TUI, web interface, and desktop app connect to it without extra setup.
What is codemode and why does it matter? Codemode is a lightweight JavaScript interpreter that turns MCP servers and OpenAPI endpoints into callable functions, letting the agent write scripts that chain multiple tool calls in one step instead of making them one at a time.
Can I still use OpenCode 1.0 plugins? The excerpt does not specify migration details for existing plugins; it only notes that the plugin system has been significantly expanded and that TUI plugins are now stable.
Source: OpenCode 2.0

답글 남기기