Last updated:
OpenCode is an open-source artificial-intelligence coding agent that connects a user-selected model to a software project, development tools, and a terminal. It can inspect code, plan and make changes, run commands and tests, and use their results to continue a task; OpenCode supplies the agent software and interfaces, rather than being an AI model itself.[1][2][3]
OpenCode is available through a terminal interface, desktop applications, a browser client, and IDE extensions. Its V2 documentation describes desktop builds for macOS, Windows, and Linux, alongside standalone command-line binaries.[1][4]
The software uses a client-server architecture. The terminal interface, desktop application, IDE extensions, software development kit (SDK), and web client communicate with a local server over HTTP; the server communicates with model providers, runs tools, and manages session state.[2][3] The server can run independently of the terminal interface with opencode serve; opencode web adds a browser client, while opencode attach connects another client to a running session.[2][3]
An OpenAPI 3.1 specification underpins the official @opencode-ai/sdk. The server API covers sessions, messages, files, providers, tools, agents, and configuration, allowing scripts and custom clients to interact with OpenCode without simulating keyboard input in its terminal interface.[2][3]
The V2 web interface can be paired through the opencode pair command. The resulting connection link is single-use and expires after five minutes.[4] OpenCode also supports configuration, plugins, Model Context Protocol (MCP) servers, custom commands, themes, and keybindings.[4][5]
The active OpenCode project is maintained by Anomaly, the team behind the Serverless Stack framework. A separate Go-based repository named opencode-ai/opencode is not the same project; it was archived after maintenance ended in September 2025.[2]
OpenCode’s rapid release history included more than 800 versions during its first year, according to accounts published in 2026.[2][3] Its development has included terminal, desktop, browser, and editor clients, as well as model-access services and tools for managing coding sessions.[2][4]
OpenCode’s tools let a model locate and inspect project files, edit code, and run shell commands. The model can receive command output in a subsequent request and use it to respond to test failures or other errors.[2] OpenCode also integrates with Language Server Protocol (LSP) tools, which can return compiler and linter diagnostics to the model.[2][1]
The default Build mode can read and write files and run commands. Plan mode proposes an implementation and asks before editing files or running shell commands; users can revise the plan and switch to Build to carry it out.[2][3][5] Tool permissions can allow, block, or require confirmation for actions, including rules based on command patterns. These permissions are workflow controls, not a security sandbox.[2][3]
The /init command analyzes a project and creates an AGENTS.md file in its root with information about project structure and coding conventions. Teams can commit the file so the agent has shared project instructions; a global AGENTS.md can also apply across repositories.[5][2] Users can reference files in prompts with @, and can use subagents for tasks such as codebase searches, scanning, and documentation lookup. Custom agents can have their own model, prompt, and tool permissions, and run in child sessions separate from the main session.[2][3]
The /undo and /redo commands move backward and forward through file changes, using Git-based snapshots as described in project documentation.[5][3] OpenCode can also run multiple agents in parallel on a project and create shareable session links for reference or debugging.[1]
OpenCode is designed to work with different model providers, allowing users to change models without replacing the coding agent. It uses the Models.dev registry and supports more than 75 providers, including Anthropic, OpenAI, Google, and xAI, as well as local models.[1][2] Users can connect provider accounts or API keys through the terminal interface’s /connect command, and can also configure custom providers and compatible endpoints.[4][2]
OpenCode’s website lists GitHub Copilot, ChatGPT Plus or Pro, and Claude Pro or Max among subscription options users can connect.[1] Separately, reports about Anthropic’s January 2026 restrictions said that the company blocked third-party tools from accessing consumer Claude subscriptions through unofficial channels; those accounts described using Claude models in OpenCode through a standard Anthropic API key instead, billed at API rates.[2][3]
The software is free to use, but access to hosted models can involve provider charges. OpenCode also offers two model-access services, Zen and Go, while users may supply their own provider credentials or run local models.[1][6][7][2]
OpenCode Zen is a pay-as-you-go service created by the OpenCode team. It offers a curated set of models that the team says it has tested and benchmarked for coding-agent performance; the service is intended to work with other coding agents as well as OpenCode.[6]
Zen charges per request at the model provider’s cost, without a markup, and uses a prepaid balance. It allows users to set monthly spending limits, disable billing, and continue using remaining credit; refunds may be available for unused credits when requested within 14 days of a charge.[6] OpenCode says Zen models are hosted in the United States and that providers follow zero-retention policies and do not use user data to train models, subject to exceptions described by the service.[6]
OpenCode Go is a subscription for access to a curated lineup of coding models. OpenCode lists Go at $10 per month and Go Plus at $40 per month, with the latter offering higher usage limits; both can be used with OpenCode or other coding agents.[7] A September 2026 article described a $5 first-month offer followed by $10 per month.[2][3]
Go applies quotas over rolling five-hour, weekly, and monthly windows, with model-specific allowances and request counts varying by model and usage.[7] Its model lineup includes offerings from multiple providers, and the service distinguishes its monthly subscription and usage limits from Zen’s pay-as-you-go model.[7]
As of October 21, 2026, official Go documentation listed a changing model lineup and explained that model-specific limits and data-use and retention terms vary. It stated that DeepSeek’s zero-data-retention agreement renews monthly and was valid through October 31, 2026.[12]
OpenCode says it does not store users’ code or context data, and presents this as relevant to privacy-sensitive use.[1] Its FAQ also says that data and information are stored when users use OpenCode’s free models.[1] Data handling depends on the selected model and service: hosted-model requests send code context to the provider, while local models can keep processing on local infrastructure.[2][3] OpenCode’s /share command uploads a session to a public link that remains accessible until it is unshared, and Zen sends requests to its model providers.[2][3]
OpenCode’s permission system does not isolate the software from the operating system. Documentation about networked server use recommends setting OPENCODE_SERVER_PASSWORD and binding the server to localhost; reporting on the project also described an earlier unauthenticated exposure issue that had been patched.[2][3]
OpenCode offers enterprise deployments intended to operate within an organization. The company says organizations can begin with a team trial and deploy OpenCode across an organization by integrating single sign-on (SSO) and an internal AI gateway; it also states that it makes no licensing restrictions or ownership claims and stores no data or context.[8]
OpenCode Data is a dashboard for model usage, changes in model mix, costs, session cost, token cost, cache ratio, geographic breakdown, and model comparisons.[9]
On the night of October 17–18, 2026, attackers broke into an older OpenCode system. OpenCode described the incident as connected to a large-scale “distillation attack” and said it affected 1.4% of OpenCode Console users.[10] Co-founder Dax Raad said the breach affected Console, where some users store API keys, rather than the open-source application or command-line tool; according to Raad, the exposed keys were confined to Console workspaces and were not available to the app itself.[10]
Users reported unauthorized spending alerts and charges on OpenAI, Anthropic, and Google AI accounts. Some said charges reached hundreds of dollars, and a few reported totals above $1,000; Anthropic and Google blocked keys they believed were exposed.[10] OpenAI said it worked with OpenCode to restore access and refund customers for credits used in the attack, while OpenCode said refunds for unauthorized charges were underway.[10] OpenCode notified affected users by email and urged them to revoke and replace API keys directly with each provider.[10]
Some commentators challenged the company’s “distillation attack” framing, arguing that the breach was a conventional theft and that use of the keys for model distillation had not been established.[10] Raad said attackers had attempted to break into OpenCode’s systems continuously for 48 hours and that the team used AI agents to assist its defensive response.[10] He also said some AI models initially helped analyze the incident but later refused to examine malicious code after triggering safety filters; OpenCode subsequently received access to OpenAI’s Daybreak Blue program, which provides vetted users with models less likely to refuse defensive-security requests.[10]
The breach occurred on the same night OpenCode made GLM-5.3-Flash free for users. Researchers studying open-weight models had reported that the broader GLM-5.3 family’s cybersecurity capabilities approached levels previously associated with restricted-access models such as Anthropic’s Claude Mythos Preview.[10]