OpenCode 2.0 rewrites its API and runs a single server for all your agent sessions

OpenCode 2.0 is a major overhaul that automatically runs a single background server for all clients—TUI, web, desktop, and programmatic. The API is rebuilt from scratch, and a new JavaScript interpreter lets agents script MCP servers and OpenAPI endpoints in one round trip. Background sub-agents and shell commands keep long tasks from blocking. The plugin API is now proven by 80+ internal plugins, and the SDK lets you embed OpenCode anywhere.
The old API grew haphazardly as we and the world collectively learned what agents are and should be. It was bad.