{"version":1,"id":"opencode","title":"OpenCode","summary":"OpenCode is an open-source AI coding agent that connects language models to software projects and developer tools for coding tasks.","content":"**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\\]](#cite-id-dhdgz18ngm)​[\\[2\\]](#cite-id-wxsh1s9r6n)​[\\[3\\]](#cite-id-0aslq0971o)​\n\n## Overview\n\nOpenCode 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]](#cite-id-dhdgz18ngm)[[4]](#cite-id-gyvcfudg7w)\n\nThe 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]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o) 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]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o)\n\nAn 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]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o)\n\nThe V2 web interface can be paired through the `opencode pair` command. The resulting connection link is single-use and expires after five minutes.[[4]](#cite-id-gyvcfudg7w) OpenCode also supports configuration, plugins, [Model Context Protocol](https://iq.wiki/wiki/model-context-protocol) (MCP) servers, custom commands, themes, and keybindings.[[4]](#cite-id-gyvcfudg7w)[[5]](#cite-id-vrx9tt4wlu)\n\n## History and Development\n\nThe 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]](#cite-id-wxsh1s9r6n)\n\nOpenCode’s rapid release history included more than 800 versions during its first year, according to accounts published in 2026.[[2]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o) Its development has included terminal, desktop, browser, and editor clients, as well as model-access services and tools for managing coding sessions.[[2]](#cite-id-wxsh1s9r6n)[[4]](#cite-id-gyvcfudg7w)\n\n## Coding Workflow\n\nOpenCode’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\\]](#cite-id-wxsh1s9r6n) OpenCode also integrates with Language Server Protocol (LSP) tools, which can return compiler and linter diagnostics to the model.[\\[2\\]](#cite-id-wxsh1s9r6n)​[\\[1\\]](#cite-id-dhdgz18ngm)​\n\nThe 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\\]](#cite-id-wxsh1s9r6n)​[\\[3\\]](#cite-id-0aslq0971o)​[\\[5\\]](#cite-id-vrx9tt4wlu) Tool permissions can allow, [block](https://iq.wiki/wiki/block), or require confirmation for actions, including rules based on command patterns. These permissions are workflow controls, not a security sandbox.[\\[2\\]](#cite-id-wxsh1s9r6n)​[\\[3\\]](#cite-id-0aslq0971o)​\n\nThe `/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\\]](#cite-id-vrx9tt4wlu)​[\\[2\\]](#cite-id-wxsh1s9r6n) 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\\]](#cite-id-wxsh1s9r6n)​[\\[3\\]](#cite-id-0aslq0971o)​\n\nThe `/undo` and `/redo` commands move backward and forward through file changes, using Git-based snapshots as described in project documentation.[\\[5\\]](#cite-id-vrx9tt4wlu)​[\\[3\\]](#cite-id-0aslq0971o) OpenCode can also run multiple agents in parallel on a project and create shareable session links for reference or debugging.[\\[1\\]](#cite-id-dhdgz18ngm)​\n\n## Model Providers and Access\n\nOpenCode 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]](#cite-id-dhdgz18ngm)[[2]](#cite-id-wxsh1s9r6n) 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]](#cite-id-gyvcfudg7w)[[2]](#cite-id-wxsh1s9r6n)\n\nOpenCode’s website lists GitHub Copilot, ChatGPT Plus or Pro, and Claude Pro or Max among subscription options users can connect.[[1]](#cite-id-dhdgz18ngm) 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]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o)\n\nThe 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]](#cite-id-dhdgz18ngm)[[6]](#cite-id-rbaqzj07cf)[[7]](#cite-id-gtacfjf1ka)[[2]](#cite-id-wxsh1s9r6n)\n\n### OpenCode Zen\n\nOpenCode 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]](#cite-id-rbaqzj07cf)\n\nZen 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]](#cite-id-rbaqzj07cf) 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]](#cite-id-rbaqzj07cf)\n\n### OpenCode Go\nOpenCode 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]](#cite-id-gtacfjf1ka) A September 2026 article described a $5 first-month offer followed by $10 per month.[[2]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o)\n\nGo applies quotas over rolling five-hour, weekly, and monthly windows, with model-specific allowances and request counts varying by model and usage.[[7]](#cite-id-gtacfjf1ka) 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]](#cite-id-gtacfjf1ka)\n\nAs 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]](#cite-id-2xbh1d2u5h)\n\n## Privacy and Security\n\nOpenCode says it does not store users’ code or context data, and presents this as relevant to privacy-sensitive use.[[1]](#cite-id-dhdgz18ngm) Its FAQ also says that data and information are stored when users use OpenCode’s free models.[[1]](#cite-id-dhdgz18ngm) 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]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o) 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]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o)\n\nOpenCode’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]](#cite-id-wxsh1s9r6n)[[3]](#cite-id-0aslq0971o)\n\n## Enterprise Use\n\nOpenCode 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]](#cite-id-p6aqkf0rqx)\n\n## OpenCode Data\n\nOpenCode Data is a dashboard for model usage, changes in model mix, costs, session cost, token cost, cache ratio, geographic breakdown, and model comparisons.[[9]](#cite-id-ffvi2jkdia)\n\n## October 2026 Console Security Incident\n\nOn 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]](#cite-id-iod7os5e45) 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]](#cite-id-iod7os5e45)\n\nUsers 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]](#cite-id-iod7os5e45) 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]](#cite-id-iod7os5e45) OpenCode notified affected users by email and urged them to revoke and replace API keys directly with each provider.[[10]](#cite-id-iod7os5e45)\n\nSome 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]](#cite-id-iod7os5e45) Raad said attackers had attempted to break into OpenCode’s systems continuously for 48 hours and that the team used [AI agents](https://iq.wiki/wiki/ai-agents) to assist its defensive response.[[10]](#cite-id-iod7os5e45) 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]](#cite-id-iod7os5e45)\n\nThe 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]](#cite-id-iod7os5e45)","categories":[{"id":"projects-and-protocols","title":"projects-and-protocols"}],"tags":[{"id":"AIAgent"}],"images":[{"id":"QmccDKLPHPB7qMuivphhygyBRhKp42LBr8zCkkb2de4VQG","type":"image/jpeg, image/png"}],"media":[{"id":"QmRueRoE1pTm7dezrcLdyeiwY3ZpNvFA3iWSbRoonMDetA","name":"social-share.png","source":"IPFS_IMG","thumbnail":"QmRueRoE1pTm7dezrcLdyeiwY3ZpNvFA3iWSbRoonMDetA","caption":""},{"id":"Qmam11DxJGfdaCGAdm6LLAUxGjGdozink2RdeKXegeFEAx","name":"Cópia de Design sem nome (3).png","source":"IPFS_IMG","thumbnail":"Qmam11DxJGfdaCGAdm6LLAUxGjGdozink2RdeKXegeFEAx","caption":""}],"metadata":[{"id":"references","value":"[{\"id\":\"dhdgz18ngm\",\"url\":\"https://opencode.ai/\",\"description\":\"OpenCode\",\"timestamp\":1792549026103},{\"id\":\"wxsh1s9r6n\",\"url\":\"https://www.datacamp.com/blog/what-is-opencode\",\"description\":\"DataCamp overview\",\"timestamp\":1792549026104},{\"id\":\"0aslq0971o\",\"url\":\"https://www.analyticsvidhya.com/blog/2026/09/opencode-ai-explained/#h-what-is-opencode\",\"description\":\"Analytics Vidhya overview\",\"timestamp\":1792549026104},{\"id\":\"gyvcfudg7w\",\"url\":\"https://opencode.ai/v2/docs\",\"description\":\"OpenCode V2 documentation\",\"timestamp\":1792549026104},{\"id\":\"vrx9tt4wlu\",\"url\":\"https://opencode.ai/docs\",\"description\":\"OpenCode documentation\",\"timestamp\":1792549026104},{\"id\":\"rbaqzj07cf\",\"url\":\"https://opencode.ai/zen\",\"description\":\"OpenCode Zen\",\"timestamp\":1792549026104},{\"id\":\"gtacfjf1ka\",\"url\":\"https://opencode.ai/go\",\"description\":\"OpenCode Go\",\"timestamp\":1792549026104},{\"id\":\"p6aqkf0rqx\",\"url\":\"https://opencode.ai/enterprise\",\"description\":\"OpenCode Enterprise\",\"timestamp\":1792549026104},{\"id\":\"ffvi2jkdia\",\"url\":\"https://opencode.ai/data\",\"description\":\"OpenCode Data\",\"timestamp\":1792549026104},{\"id\":\"iod7os5e45\",\"url\":\"https://techcrunch.com/2026/10/19/hackers-hit-ai-coding-tool-opencode-running-up-charges-on-users-ai-accounts/\",\"description\":\"TechCrunch incident report\",\"timestamp\":1792549026104},{\"id\":\"vasjzxybwo\",\"url\":\"https://techfundingnews.com/opencode-the-background-story-on-the-most-popular-open-source-coding-agent-in-the-world/\",\"description\":\"TechFundingNews profile\",\"timestamp\":1792549325552},{\"id\":\"2xbh1d2u5h\",\"url\":\"https://opencode.ai/docs/go/\",\"description\":\"OpenCode Go documentation\",\"timestamp\":1792549325552}]"},{"id":"github_profile","value":"https://github.com/anomalyco/opencode"},{"id":"twitter_profile","value":"https://x.com/opencode"},{"id":"youtube_profile","value":"https://www.youtube.com/@anomalyco"},{"id":"website","value":"https://opencode.ai/"},{"id":"main-image-origin","value":"{\"imageId\":\"QmccDKLPHPB7qMuivphhygyBRhKp42LBr8zCkkb2de4VQG\",\"originalId\":\"QmccDKLPHPB7qMuivphhygyBRhKp42LBr8zCkkb2de4VQG\"}"},{"id":"commit-message","value":"Add the OpenCode wiki"}],"events":[{"title":"Public launch of OpenCode","date":"2025-06-19","type":"CREATED","description":"OpenCode was publicly launched as an open-source coding agent.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"f2cd385c-e624-4019-80fe-5e3ca11630c7"},{"title":"Release of v0.4.6","date":"2025-08-01","type":"DEFAULT","description":"OpenCode v0.4.6 was released.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"27a9ddf6-ac6a-4efb-9caf-043e8b2e328d"},{"title":"Integration of GitHub internal features (Copilot compatibility layer)","date":"2025-10-01","type":"DEFAULT","description":"OpenCode integrated internal GitHub features, including a Copilot compatibility layer.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"36abd38d-b34e-42a9-80bf-76e8962236dc"},{"title":"Release of v1.0.0","date":"2025-12-01","type":"DEFAULT","description":"The v1.0.0 release included a refactor of the terminal interface using OpenTUI.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"b136763a-5025-4804-855e-9c1668a3838b"},{"title":"Anthropic blocks OpenCode OAuth access","date":"2026-01-01","type":"DEFAULT","description":"Anthropic blocked OAuth access for OpenCode, prompting a substantial community reaction.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"0eb106a4-25c0-4b3e-b0fe-c671c7a5484d"},{"title":"Official GitHub Copilot integration","date":"2026-01-01","type":"DEFAULT","description":"OpenCode added official integration with GitHub Copilot.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"9d652def-684c-4211-870d-2e238358bd11"},{"title":"Release of v1.3.0","date":"2026-03-01","type":"DEFAULT","description":"The v1.3.0 release added multi-agent orchestration and support for more than 75 model providers.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"4e83806b-a4a5-4167-8b77-1a41249038dd"},{"title":"Release of v1.15.0","date":"2026-05-01","type":"DEFAULT","description":"The v1.15.0 release introduced the Effect core event system.","link":"https://zhumengzhu.github.io/2026/05/opencode-deep-research/","country":"","continent":"","multiDateStart":null,"multiDateEnd":null,"id":"cab23a46-4f9b-4d4a-84a4-2d92e7f5efe8"},{"type":"DEFAULT","title":"OpenCode Console security incident","date":"2026-10-01","description":"Attackers breached an older OpenCode system, affecting OpenCode Console users and exposing API keys stored in Console workspaces; the open-source app and command-line tool were not affected.","link":null,"multiDateStart":null,"multiDateEnd":null,"id":"22c13e53-18fd-4b4a-a730-3b43e0ced38b"}],"linkedWikis":{"founders":[],"blockchains":[],"speakers":[]},"user":{"id":"0x8af7a19a26d8fbc48defb35aefb15ec8c407f889"},"author":{"id":"0xd5893989b9952c6568a99F854795AcC5Ae480D56"},"language":"en","operator":{"id":"0xd5893989b9952c6568a99F854795AcC5Ae480D56"}}