OpenCode
An open-source (MIT) coding agent that works with 75+ model providers and local models, built as a local server with a terminal interface as one of its clients.
- What it is
- AI coding agents (terminal agents)
- Type
- Open source
- Made by
- Anomaly Innovations
- License
- MIT
- Facts checked
- 9 October 2026
What it is
OpenCode runs in the terminal, as a desktop app or inside an editor. It isn’t tied to one model vendor: it uses the AI SDK and the Models.dev catalogue to reach more than 75 providers, plus models running locally. Two built-in agents switch with the Tab key: build, the default, with full access, and plan, which is read-only, denies file edits and asks before running shell commands. A general subagent handles searches and multi-step side tasks. It can start language servers for the files it touches and feed their diagnostics back to the model.
Under the interface is a client/server split. Starting opencode starts both a TUI and an HTTP server, and opencode serve runs the server alone, with an OpenAPI 3.1 spec at /doc that is also used to generate an SDK. IDE plugins drive the TUI through that server, and opencode acp speaks the Agent Client Protocol for editors that support it.
Instructions come from AGENTS.md (created by /init), found by walking up from the current directory, then a global ~/.config/opencode/AGENTS.md. For people moving from Claude Code it also reads CLAUDE.md and ~/.claude/skills unless told not to. Permissions resolve each action to allow, ask or deny, and start permissive: most actions are allowed, while touching paths outside the project and a tool call repeated three times with identical input (doom_loop) ask first, and .env files can’t be read.
Why teams pick it
- Provider-agnostic: swap between hosted models, existing subscriptions and local models without changing tools
- MIT-licensed, with a documented HTTP API, so you can script it or build your own client
- Reads
CLAUDE.mdand Claude Code skills, which makes switching cheap - Language-server diagnostics give the model compiler-grade feedback after each edit
Watch out for
- Permissive defaults: most actions run without asking unless you add
askordenyrules - Results depend on the model you pick; there is no single vendor tuning model and harness together
- The server is unsecured unless you set
OPENCODE_SERVER_PASSWORD, so be careful binding it beyond127.0.0.1 - Easy to confuse with the archived Go project
opencode-ai/opencode, which now continues as Crush under Charm
The OpenCode family
1 technologies built from or on OpenCode
Alternatives
What all terminal agents have in common →
Gemini CLICommercialGoogle’s open-source terminal agent for Gemini models; since 18 June 2026 it serves only paid API keys and business licences, as Google moved free and consumer users to Antigravity CLI.Run it in a terminal, one-shot, or as a server · bash
curl -fsSL https://opencode.ai/install | bash # or: npm i -g opencode-ai
opencode # TUI; Tab switches between the build and plan agents
opencode run "explain how the auth middleware works" # one message, then exit
# headless server: the same API the TUI and IDE plugins use
opencode serve --port 4096 &
curl -s http://127.0.0.1:4096/global/health
# {"healthy":true,"version":"1.18.35"}See it in a real stack
No architecture uses OpenCode yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2025–2026
OpenCode’s repository started in spring 2025 under the GitHub organisation of SST, and published its first releases in May 2025. Until June its README described a Go program with a Bubble Tea terminal interface and promised “a complete overhaul” for mid-June; the rewrite that followed is written in TypeScript. Another Go project called OpenCode, opencode-ai/opencode, has been archived and continues as Crush, developed by its original author and the Charm team; OpenCode’s own FAQ says that repository has no relation to it.
Its FAQ set out the pitch against Claude Code: similar capability, but fully open source, not coupled to any provider (Anthropic was recommended, but OpenAI, Google and local models work too), language-server support out of the box, a terminal interface built by Neovim users and the creators of terminal.shop, and a client/server design so the TUI is just one possible client. Version 1.0.0 shipped on 31 October 2025. By February 2026 the repository had over 95,000 stars, and it now lives under Anomaly’s GitHub organisation.
Why it’s built this way
- Not coupled to one provider
- Its authors expected the gaps between models to close and prices to drop, so being able to switch providers mattered more than tuning for one.
- A server first, the TUI as a client
- Separating the agent from its interface lets it run on one machine while being driven from another, such as a phone, and lets IDE plugins and scripts use the same API.
- Language servers in the loop
- Diagnostics from a language server tell the model about type errors right after an edit, without waiting for a build or test run.
- Compatible with Claude Code’s files
- Reading
CLAUDE.mdand Claude Code skills by default lowers the cost of trying it in a repository already set up for another agent.
Timeline
- 2025
First releases under SST’s GitHub organisation (May)
- 2025
The Go version is replaced by a rewrite announced for mid-June
- 2025
Version 1.0.0 (31 October)
- 2026
Passes 95,000 GitHub stars; published by Anomaly Innovations
- OpenCode v0.0.47 release (May 2025)
- OpenCode README at v0.1.1: Go-based CLI, overhaul planned for mid-June (June 2025)
- OpenCode README at v1.0.0: FAQ on Claude Code and the other repository
- OpenCode v1.0.0 release (Oct 2025)
- opencode-ai/opencode: archived, continued as Crush by the original author and Charm
- InfoQ: OpenCode, an open-source AI coding agent (Feb 2026)
Sources9 · facts checked 9 October 2026
- anomalyco/opencode README (install, build and plan agents, MIT)
- OpenCode docs: Intro (terminal, desktop app, IDE extension)
- OpenCode docs: Providers (AI SDK, Models.dev, 75+ providers, local models)
- OpenCode docs: Rules (AGENTS.md, Claude Code compatibility, precedence)
- OpenCode docs: Permissions (allow, ask, deny; defaults)
- OpenCode docs: LSP servers (diagnostics as feedback)
- OpenCode docs: Server (`opencode serve`, OpenAPI 3.1 spec, `OPENCODE_SERVER_PASSWORD`)
- OpenCode docs: MCP servers
- InfoQ: OpenCode, an open-source AI coding agent (Anomaly Innovations, ACP editors; Feb 2026)