OpenCode 2.0: an agent that drives its own interface
Translated by a model; the original is in Russian.
The OpenCode team has shipped version 2.0 — not a cosmetic update, they say, but a deep rework drawing on the experience of millions of daily users. Here are the most notable changes.
A single service
OpenCode was built on a client/server model from the start, but few took advantage of it by default. Now the server runs automatically as a single background process. The terminal UI, the web interface and the desktop app all talk to the same central process. The programmatic client @opencode/client autodiscovers the local service, which is handy for scheduled tasks; you can also expose it to other hosts via the pair command.
A rewritten API
The old API, the authors admit, grew haphazardly and was bad. They rewrote it from scratch, examining the odd use cases across their users. The key novelty: OpenCode is aware of its own API and calls it — moving the current session into a git worktree when starting new work, stopping a stuck task, renaming a session or closing finished tabs in response to plain-language commands.
Code Mode
Models love to write code, and OpenCode 2.0 leans on that harder than its rivals. The @opencode/codemode package adds a minimal JavaScript interpreter. It ingests MCP servers and OpenAPI endpoints, turning them into functions the agent calls inside a script — and runs the script natively, without heavy solutions like Node.js VMs or QuickJS. In a single round trip the agent can list issues from one service and create them in another. All MCP servers default to Code Mode, so you can add a thousand of them with minimal context bloat.
Background tasks
Background subagents have arrived: the primary agent can hand work off to another and keep going. This happens automatically but can be triggered manually, even with a different model. Shell commands can run asynchronously too, so long builds and tests no longer block the primary agent. Any task that drags on can be pushed to the background with a hotkey.
Plugins and SDK
The plugin system from 1.0 had languished. To fix that, the authors forced themselves to implement nearly every 2.0 feature as an internal plugin — there are now 80+ of them. TUI plugins are now stable, and everything supports hot-reloading, so the agent can write itself a plugin mid-session and use it at once. Finally, the @opencode/sdk package lets you use OpenCode as a library and roll your own flavor of the system.
Upgrading to 2.0 is done with opencode upgrade --major from the latest 1.x release. There are breaking changes: 1.0 plugins won't work, the server API is completely different, and the config format has moved.
Source: Hacker News
Comments
Sign in, to comment.