Article
OpenCode 2.0 Rewriting the underlying architecture:MCP Tools can be chained through code, and multiple Agent can work in the background in parallel
Beating AI news reports that AI coding tool OpenCode 2.0 has officially launched, after previously entering public beta on July. One major change in this upgrade is Code Mode which can turn MCP services and OpenAPI interfaces into JavaScript functions, allowing Agent to chain multiple tools in a single script. For example, it can first read Bugs from GitHub in bulk and then create Linear tasks one by one, without having the model initiate a new call after processing each item. All MCP services enable Code Mode by default, which can also reduce the context consumed by tool definitions.OpenCode has also rewritten its underlying architecture. The terminal, web, and desktop clients now share the same local backend service and can access the same set of sessions. Sub-Agent and Shell commands can also run in the background, for example, having one Agent review code while the main Agent continues modifying files and runs tests and builds at the same time. The team has also turned many internal functions into plugins; there are currently more than 80 of them, with hot loading at runtime, so Agent can write plugins for themselves and use them immediately.
In addition,OpenCode has introduced an embeddable SDK for use in other applications. Cloudflare has announced experimental API support for OpenCode 2.0 allowing developers to run the same Agent engine in Durable Objects and save sessions and resume interrupted tasks.
However, this refactoring has also introduced compatibility issues. 1.x plugins need to be rewritten, and older Server API also require adaptation. An issue on GitHub points out that when Code Mode calls plugins that take a long time to complete, there is no timeout limit, which may leave sessions waiting for a long time and require manual interruption.
Original link https://m.theblockbeats.info/flash/371618