LmCast :: Stay tuned in

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"
import { Service } from "@opencode/client/service"

const endpoint = await Service.ensure()
const client = OpenCode.make({
baseUrl: endpoint.url,
headers: Service.headers(endpoint),
})

const session = await client.session.create({
location: { directory: process.cwd() },
})

await client.session.prompt({
sessionID: session.id,
text: "Review the current changes",
})Code ModeThe models love to write code and OpenCode 2.0 takes advantage of that more than any other coding agent. We've built a minimal JavaScript interpreter in the @opencode/codemode package.SessionYOUFile GitHub bugs in Linear.execute{ code }tools.github.list_issuestools.linear.save_issueexecute{ code }["OC-412", "OC-413", "OC-414"]Code Modereturn [search({ query: "list github issues" }), search({ query: "create linear issue" })]const { issues } = await tools.github.list_issues({ owner: "anomalyco", repo: "opencode", labels: ["bug"], state: "OPEN",})const filed = await Promise.all(issues.map(({ title }) => tools.linear.save_issue({ team: "OC", title })))return filed.map(issue => issue.identifier)MCP serversgithublinearsentryThis package ingests MCP servers or OpenAPI endpoints, converting them into functions that the agent can call in a script. It can run these scripts natively without the complexity of Node.js VMs or embedding complicated solutions like QuickJS.This lets your agent write scripts that can do things like call a tool, map over the results and call another tool. Single round trip instead of calling them one at a time.All MCP servers in 2.0 are opted into codemode by default. This means you can add a thousand of them with minimal context bloat and your agent will discover and compose them to get things done.Background TasksThe latest batch of models are incredibly good at orchestration and it is important for harnesses to let them express the full extent of that capability.SessionYOUSpawn a background fable subagent to review this code.subagentreview this codefablebackground2 comments$shellbun testbackground148 passededitsrc/retry.ts+12$$shellbun run buildbackgrounddonePress ctrlb to move running work to the backgroundYOUUpdate the changelog too.editCHANGELOG.md+3All done. The review left 2 comments, 148 tests passed, the build succeeded and the changelog is updated.Backgroundreview this codefable$bun test$bun run buildctrlbFirst, we've added background subagents. This allows the primary agent to kick off some work to another one while it continues.This happens automatically but you can also trigger it manually - even with a different model. It lets you do things like “spawn a background fable subagent to review this code” while you keep prompting.Second, we've added background shell commands. The shell tool can be invoked asynchronously so long-running work does not have to block the primary agent. It'll be notified when things are complete.If any foreground shell command or subagent takes longer than you expect, you can hit a hotkey to move them to the background so you can keep prompting.PluginsAlthough OpenCode 1.0 had a plugin system, it never got the attention it needed. To correct that, we forced ourselves to implement nearly every OpenCode 2.0 feature as an internal plugin and there are now 80+ of them. This guarantees that the Plugin API stays well maintained.We've also promoted TUI plugins from experimental to stable. Since it is all powered by OpenTUI, you can build nearly anything. Here is an example of something useless.We also spent quite a lot of time ensuring everything in OpenCode 2.0 can be hot-reloaded. So it can write a plugin for itself mid-session and use it right away - we covered the design of this in a previous blogpost.You can ask OpenCode to build whatever plugin you want and it knows how to. But if you do want to read the docs, they are available here.The SDKOpenCode can also now be used as a library with the @opencode/sdk package. This is the exact same code that powers our CLI.This means you can strip it down and make your own flavor of OpenCode that runs on a server or in specialized environments like Durable Objects. And then you can connect to it from any OpenCode client since it speaks the standard OpenCode server protocol.It also has an optional Effect-based API.This one is still in development as things are shifting but you can already use it.UpgradingTo upgrade the CLI, make sure you're on the latest 1.x release, then run opencode upgrade --major.To upgrade your desktop app, download the latest here.There are some breaking changes.1.0 plugins will not work in 2.0Server API is completely differenttui.json config is moved to jsonThere are a lot of other changes but they are backwards compatible. It is worth pointing OpenCode at this doc so it can migrate things for you.

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.