OpenCode 2.0
Recorded: Oct. 14, 2026, 10:08 p.m.
| Original | Summarized |
OpenCode 2.0 Anomaly←All postsOpenCode 2.0OpenCode 2.0Carry the diskNothing waiting on the deskOpenCode 2.0 is a major overhaul. It draws on millions of daily users' experience to deliver a system that can flex to everything an agent needs to be. There are quite a lot of new features, performance improvements, and bug fixes but here are some of the more impactful user-facing changes.The ServiceFrom the beginning OpenCode adopted a client/server model. However, this was not something it took advantage of by default and was mostly used by power users.In 2.0 this server now automatically runs as a single background process on your machine. When you open up a TUI, the web interface or the desktop app they're all talking to the same central process.TerminalFix flaky testWebFix flaky testDesktopAdd dark modereview.tsReview changesopencodepid 48213StoppedStartingRunningSessionsFix flaky testAdd dark modeReview changesIf you're using the programmatic client @opencode/client to make your own scripts, they will autodiscover the local service and just work. This is particularly useful for scheduled tasks. You can also call it via CLI by using opencode api commands.You can expose it to other hosts and run /pair or opencode pair to connect it to other applications. We have native apps in the works that take advantage of this flow.The APIThe old API grew haphazardly as we and the world collectively learned what agents are and should be. It was bad.We started from scratch and examined all the weird use cases across the millions of users who use OpenCode every day. It now supports nearly anything you need to be able to do.OpenCode is also aware of its own API and will call it to do useful things like moving the current session into a git worktree when starting new work.SessionNew sessionYOUStart rate limiting uploads in a new worktree.execute{ code }›opencode.worktree_create[name=rate-limit]›opencode.session_rename[title=Rate limit uploads]›opencode.session_move[directory=~/worktrees/rate-limit]YOUThe flaky test session is stuck. Stop it, have it quarantine the test, and close my finished tabs.execute{ code }›opencode.session_list›opencode.session_context[sessionID=ses_7c41e09a]└ "Retrying uploads.test.ts again…"execute{ code }›opencode.session_interrupt[sessionID=ses_7c41e09a]›opencode.session_prompt[sessionID=ses_7c41e09a, text=Quarantine uploads.test.ts]›opencode.tab_close[sessionID=ses_2f9d61b4]Stopped it, told it to quarantine the test, closed the config tab.OpenCode~/appFix flaky upload testinterruptedMigrate config loadertab closedNew sessionthis session~/worktrees/rate-limitWe've also shipped a new client package @opencode/client that contains clients for vanilla JavaScript as well as Effect.review.tsimport { OpenCode } from "@opencode/client" const endpoint = await Service.ensure() const session = await client.session.create({ await client.session.prompt({ |
OpenCode 2.0 represents a major overhaul, driven by incorporating the experience of millions of daily users to create a system highly adaptable to the diverse needs of an agent. This update includes significant performance improvements, bug fixes, and impactful user-facing changes across its architecture and feature set. The service model underwent a fundamental change; OpenCode 2.0 now runs automatically as a single background process on the machine. This consolidation centralizes interactions, meaning that when a user opens any interface, such as a TUI, web interface, or desktop application, they are all communicating with the same central process. This structural shift was accompanied by specific fixes, including resolving flaky tests, adding a dark mode option, and updating review changes. The programmatic client, @opencode/client, has been enhanced to offer improved functionality. It now automatically discovers the local service, simplifying script execution, particularly for scheduled tasks. Furthermore, the system allows exposure to other hosts via commands like /pair or opencode pair to connect to external applications, with native applications currently in development leveraging this flow. The Application Programming Interface (API) was completely refactored from scratch, moving away from a haphazard growth pattern. The new API is designed to support nearly any required operation by examining the extensive use cases across the user base. The system is now self-aware, capable of calling its own API to perform useful tasks, such as relocating a session into a git worktree when starting new work. Examples of this enhanced session management include commands allowing users to rate-limit uploads in a new worktree, rename sessions, move session directories, interrupt sessions, and prompt the user for context changes, demonstrating fine-grained control over the agent's operational state. The system incorporates a new Code Mode, built around a minimal JavaScript interpreter within the @opencode/codemode package, designed to capitalize on the models' ability to write code. This mode provides integrated tools for interacting with external systems, such as listing GitHub issues or saving them to a linear task, allowing agents to execute complex workflows by mapping results from one tool call to another within a single operation. A key architectural feature is the integration of MCP servers, which ingest data from MCP servers or OpenAPI endpoints, converting them into functions the agent can execute natively without relying on complex virtual machines or embedding solutions like QuickJS. All MCP servers are opted into codemode by default, allowing the agent to discover and compose a vast number of these servers with minimal context overhead. Background Tasks were introduced to improve agent orchestration capabilities. This allows the primary agent to spawn background subagents to perform secondary tasks while maintaining its own prompting flow. Additionally, background shell commands are supported, enabling asynchronous, long-running operations that do not block the primary agent, with notifications provided upon completion. This mechanism allows agents to manage complex workflows, such as reviewing code, running tests, and updating changelogs concurrently. Plugin support has been significantly improved, moving to an internal plugin architecture that encompasses nearly every OpenCode 2.0 feature, contributing to better maintenance. This system promotes the stability of the Plugin API and allows for the promotion of TUI plugins to a stable state, leveraging the OpenTUI foundation. The system also supports hot-reloading, enabling agents to write or update their own plugins mid-session. Furthermore, OpenCode can now build custom plugins based on user requests. The SDK package provides access to the OpenCode functionality as a library, mirroring the code powering the command-line interface. This allows developers to strip down the system to create custom flavors running on servers or in specialized environments, adhering to the standard OpenCode server protocol for communication with all OpenCode clients. This SDK also offers an optional Effect-based API, which is currently under development. Upgrading involves ensuring the client is on the latest 1.x release before running the upgrade command. Breaking changes include the incompatibility of 1.0 plugins with 2.0, a complete redesign of the Server API, and the migration of the tui.json configuration to JSON format. Documentation is provided to guide users through these migrations. |