OpenCode
Also known as: opencode, OpenCode AI
OpenCode is an open-source (MIT) AI coding agent with a terminal UI, a desktop app for macOS, Windows, and Linux, a web interface, and IDE integration for VS Code and its forks. It works with any LLM provider through your own API keys and offers two built-in agents: Build, with full access, and Plan, a read-only mode that suggests how to implement a change. It supports AGENTS.md rules, MCP servers, and LSP servers, and is one of the most-starred coding agents on GitHub, with more than 200,000 stars.
Agent Information
- Provider
- anomalyco (open source)
- Supported IDEs
- Terminal (TUI), Desktop app, Web, VSCode, Cursor, Devin Desktop (formerly Windsurf), VSCodium
Feature Support Matrix
| Feature | Support Level | Details |
|---|---|---|
| Execution | ||
| Automatic Context Awareness | ⚠️ Partial | OpenCode can use LSP diagnostics as automatic feedback for the agent. Project-level understanding comes from running /in... |
| Filesystem Access | ✅ Full Support | The Build agent has full access to make changes; Plan mode disables file changes. |
| MCP Server Support | ✅ Full Support | OpenCode supports both local and remote MCP servers. |
| Editor Integration | ||
| Broad IDE Integration | ⚠️ Partial | Integrates with VS Code and popular forks such as Cursor, Devin Desktop (formerly Windsurf), and VSCodium, and can run i... |
| Model Support | ||
| Latest Claude Model Support | ✅ Full Support | Anthropic is a supported provider, and the configuration docs use anthropic/claude-sonnet-4-5 and anthropic/claude-haiku... |
| Context Window Management | ✅ Full Support | The window depends on the selected model. A hidden compaction agent automatically summarizes long context when needed, a... |
| Debugging | ||
| Console Error Integration | ❓ Unknown | Not documented: the full official documentation (https://opencode.ai/docs/) was searched on 2026-09-30 without finding t... |
| Interactive Element Selection | ❓ Unknown | Not documented: the full official documentation (https://opencode.ai/docs/) was searched on 2026-09-30 without finding t... |
| Live Web Preview | ❓ Unknown | Not documented: the full official documentation (https://opencode.ai/docs/) was searched on 2026-09-30 without finding t... |
| Configuration | ||
| Dedicated Instruction File | ✅ Full Support | Uses an AGENTS.md file in the project root, which /init can generate by analyzing the project. |
| Fine-Grained Instruction Control | ⚠️ Partial | Project AGENTS.md rules apply to the directory and its subdirectories, and the instructions option in opencode.json acce... |
| Supports Scoped Instructions | ✅ Full Support | Supports global rules in ~/.config/opencode/AGENTS.md and project rules in the project AGENTS.md. |
| Planning | ||
| Planner Strategy | ✅ Full Support | Plan mode suggests how the agent will implement a feature without making changes, before switching to Build. |
Frequently Asked Questions
OpenCode itself is open source under the MIT license. You connect it to any LLM provider by configuring their API keys, and OpenCode Zen offers a curated list of recommended models.
Build is the default agent with full access. Plan mode disables its ability to make changes and instead suggests how it will implement the feature; switch between them with the Tab key.
Run /init to create an AGENTS.md in the project root. Global rules go in ~/.config/opencode/AGENTS.md, and the instructions option in opencode.json can include additional rule files using glob patterns.