OpenCode 2.0
First reported by Anoma.ly ·
The core OpenCode agent now operates more autonomously, allowing it to perform complex multi-step actions in a single execution cycle.
OpenCode has released version 2.0, a significant overhaul featuring millions of user-driven improvements. Key user-facing changes include a unified client/server architecture where the server automatically runs as a background process, accessible via TUI, web, or desktop interfaces. The programmatic client and CLI now auto-discover this local service. OpenCode 2.0 introduces a completely redesigned API, built from scratch to support a wider range of agentic tasks, including self-API calls for actions like moving sessions to new worktrees. New session management features allow for interactive control, such as interrupting flaky tests, quarantining them, and closing tabs. A new client package, @opencode/client, supports vanilla JavaScript and Effect. The 'Code Mode' has been enhanced with a JavaScript interpreter in the @opencode/codemode package, enabling agents to execute complex, chained tool calls natively. Additionally, background sub-agents and background shell commands have been added to improve orchestration and prevent blocking. The plugin system has been expanded to over 80 internal plugins, with TUI plugins now stable, and features are hot-reloadable. Finally, OpenCode can be used as a library via the @opencode/sdk package.
The revamped client/server model and auto-discovery mechanism in OpenCode 2.0 significantly lowers the barrier to entry for programmatic use, making it easier for developers to integrate custom scripts and scheduled tasks. This enhanced API, designed from the ground up, promises greater flexibility and power for agentic workflows, allowing for more sophisticated interactions like chaining tool calls and managing session states more dynamically.
The introduction of 'Code Mode' with a native JavaScript interpreter and the seamless integration of background tasks (sub-agents and shell commands) signal a push towards more autonomous and efficient agent execution. This architecture allows agents to orchestrate complex operations, such as parallel tool execution and background analysis, without user intervention, paving the way for more powerful and less resource-intensive AI agent deployments.
AI-written summary. May contain errors.