AI / tools
OpenCode: an open alternative to commercial coding agents
OpenCode is interesting not because it promises “better AI,” but because it separates the client from the model: the interface, permissions, and workflow remain yours while providers can change.
A client, not a model
OpenCode is an open-source coding agent with a terminal UI, desktop app, and IDE extension. It connects to external providers through APIs and can also use local models. Response quality comes from the selected model; agent behavior comes from configuration.
On first launch, /init analyzes the project and creates AGENTS.md. Commit that file: it records checks, project structure, style, and constraints for future sessions.
# AGENTS.md
- Run npm test before finishing
- Keep components accessible
- Never edit generated files
- Use existing design tokensBuild, Plan, and subagents
The Build agent can edit files and run commands. Plan is intended for read-only investigation. Specialized subagents can locate a bug, review security, or study an API. This division reduces context and makes authority explicit.
A reviewer can be allowed to read a diff while being denied writes and shell access. Tool-level permissions are more reliable than a vague instruction not to break anything.
Providers, cost, and privacy
OpenCode supports a broad provider catalog through AI SDK and Models.dev. A team can choose a cloud API, a compatible endpoint, or a local model, then optimize cost, latency, and data policy independently.
An open client does not make the whole chain private. Code and prompts may still be sent to the chosen provider. Review its terms, key storage, and base URL.
Who it is for
OpenCode fits developers who want control over models, permissions, and cost without binding project instructions to one IDE. It is particularly comfortable in terminal workflows and multi-provider experiments.
The price of freedom is configuration. Results depend directly on the selected model, project rules, and engineering discipline.