OpenCode 2.0 is a major overhaul built on the experience of millions of daily users. It delivers a system that can flex to everything an agent needs to be. Alongside many new features, performance improvements, and bug fixes, several user-facing changes stand out.
The biggest change is the service. Since the beginning, OpenCode used a client/server model, but few people took advantage of it. In 2.0, the server automatically runs as a single background process on your machine. The TUI, the web interface, and the desktop app all talk to the same central process. Programmatic clients using @opencode/client autodiscover the local service and just work, which is especially useful for scheduled tasks. The service can also be exposed to other hosts and paired with other applications, and native apps built on this flow are in the works.
The API has also been rebuilt from scratch. The old API grew haphazardly as the community learned what agents are and should be. The new version supports nearly anything users need, and OpenCode is aware of its own API, calling it to do useful things such as moving the current session into a git worktree when starting new work. A new client package, @opencode/client, provides clients for vanilla JavaScript as well as Effect.
Code Mode lets agents write scripts instead of making one tool call at a time. A minimal JavaScript interpreter in the @opencode/codemode package ingests MCP servers or OpenAPI endpoints and converts them into functions the agent can call in a script. All MCP servers in 2.0 are opted into Code Mode by default.
Source: Hacker News · Summarized by HeadlinesBriefing