What it is
OpenCode 2.0 is an open-source coding agent maintained by Anomaly. It turns a terminal-bound CLI into a persistent local background service: terminal, desktop and web are just clients, and one session can move between them. A new Code Mode lets the model write a single script that chains multiple MCP and OpenAPI calls, cutting round trips, and @opencode/sdk embeds the runtime in your own app.
Highlights
- Sessions belong to the background service, so multiple clients connect without losing state
- Code Mode composes MCP and OpenAPI calls into one script, cutting latency and context overhead
- 80+ internal features rebuilt as hot-reloadable plugins that can load themselves
- Client and server SDKs allow embedding the runtime in your own product or on Durable Objects
- Background subagents and shell commands handle long tasks without babysitting a terminal
- MIT licensed with a 200k-star community and plugin ecosystem
How to use
Install the 2.x line via the official script or Homebrew (package @opencode/cli), and migrate from 1.x with opencode upgrade —major. Run opencode inside a project and the terminal client attaches to the local background service. To embed it, add @opencode/sdk and let it own sessions, plugins and tool execution.
License
Released under MIT. Read the terms before commercial use or redistribution, especially if you plan to offer it as a service.