Skip to content
Developer ToolsOpen sourceArchitecture reviewSelf-hostable
OpenCode logo

OpenCode

MIT-licensed terminal coding agent with build and plan modes, any-model support, MCP servers, and honest no-sandbox docs.

Dhanji Bhagat

Dhanji Bhagat

Founder, Emiote

Managed Cloud

Fully hosted platform. Automated backups and SLA.

Reference Cost

Not publicly disclosed (Enterprise tier linked on site; self-run spend is model tokens)

Self-Host Path

Private compute. Zero seat taxes; team runs ops.

Reference Cost

Rough operating estimate: $0 on existing hardware; model tokens are pay-as-you-go (free models per site offer)

OpenCode is an open-source terminal coding agent from the anomalyco organization, formerly under the SST name. It runs in the terminal and desktop with build and plan agents, model choice across providers, and MCP servers, reaching about 210,000 GitHub stars under MIT license. Its security docs state plainly that the permission system is awareness UX, not sandbox isolation.

Scope and Currency

This review is based on the public repository (anomalyco/opencode, branch dev which is the default branch, reviewed 2026-09-29): README.md, package.json, packages/, sdks/, .opencode/, SECURITY.md, LICENSE (MIT, verified via API metadata), and the site at opencode.ai. Repository metadata verified the same day: TypeScript, about 210,800 stars, about 27,900 forks, 6,251 open issues. Requests to sst/opencode redirect here, confirming the organization rename. I did not execute the agent.

1. What It Replaces and Why It Matters

Terminal developers alternate between shell commands and model windows, carrying context by hand. Single-model CLIs fix the provider but keep the manual loop. Nearby alternatives: IDE-bound agents such as Cline and Roo Code, pair programmers such as Aider, and autonomous runners such as SWE-agent. OpenCode takes the terminal-native agent position at the largest scale in this batch: a full TUI with two built-in agents (build with full access, plan read-only), any-model support, MCP servers, SDKs for programmatic use, and a beta desktop app. Good fit: terminal developers wanting agent help with explicit mode control and no IDE lock-in. Bad fit: anyone needing sandbox isolation out of the box or a managed service contract.

2. Architecture and Tech Stack Review

| Component | Source Evidence | Evidence Type | | TUI plus agents | packages/, build and plan agents, Tab switching | README (fact) | | Subagents | general subagent, @general invocation | README (fact) | | Runtime | TypeScript, Bun lockfile, Turbo monorepo | Manifests (fact) | | SDKs | sdks/ directory, opencode-ai npm package | Repo tree plus registry (fact) | | MCP | MCP servers as user-configured tools | README plus SECURITY.md (fact) | | Desktop | Beta apps for macOS, Windows, Linux | README (fact) | | Config surface | .opencode/ directory, OPENCODE_INSTALL_DIR precedence | Repo tree plus README (fact) | | Security posture | SECURITY.md (no sandbox, opt-in server auth) | Primary source (fact) | | License | MIT | API metadata (fact) |

The dual-agent design is the core idea: build does the work, plan explores read-only and asks before bash. The permission system prompts before commands and writes, framed explicitly as awareness rather than protection. Server mode is opt-in with OPENCODE_SERVER_PASSWORD for HTTP Basic Auth.

Dual-Agent Loop

sequenceDiagram
    autonumber
    participant Dev as Developer
    participant TUI as opencode terminal UI
    participant Agent as build or plan agent
    participant LM as Model provider
    participant WS as Workspace plus MCP servers
    Dev->>TUI: Task (Tab switches build and plan)
    TUI->>Agent: Context plus mode policy
    Agent->>LM: State and tools
    LM->>Agent: Proposed edit or command
    Agent->>Dev: Permission prompt (awareness, not isolation)
    Dev->>Agent: Confirm
    Agent->>WS: Execute with user privileges
    WS->>Agent: Output and exit status

3. Visual Tour and Interface Proof

OpenCode homepage with install options across curl, npm, bun, brew, paru, and yay

The screenshot shows the official homepage: positioning as the open source agent, free-models framing, and six install tabs. The mark is the official light-variant logo from the README header, copied byte-identical.

4. Total Cost of Ownership

| Dimension | OpenCode | Notes | | License | $0 (MIT, verified) | Commercial use permitted with notice | | Compute | $0 on existing hardware | Terminal and desktop run where you work | | Model usage | Site offers free models included; otherwise pay-as-you-go | Provider choice is yours; confirm free-tier terms | | Maintenance | Your responsibility (dev-branch pace, MCP servers, updates) | Default branch is dev, not a stable line | | Data ownership | Your machine plus your provider contract | Server mode adds a network surface you secure | | Operational burden | Low single-user, medium fleet | Fleet rollout means managing installs and keys per machine |

Infrastructure figures are labeled estimates. Token spend dominates, and the dev-branch default means update churn is part of the cost. Never assume popularity equals free operation.

The Bad: What to Know Before Adopting

  • No sandbox by maintainer statement. The permission prompt keeps you informed; it does not contain the agent. Isolation requires Docker or a VM you provide.
  • The default branch is dev. You track the bleeding edge unless you pin releases, which trades freshness for surprise breakage.
  • About 6,250 open issues is the largest queue in this batch. At 210,000 stars, the user-to-maintainer ratio guarantees most reports wait.
  • Permission habituation is the predictable failure. Prompts you approve fifty times a day stop being decisions; the security docs acknowledge the system is awareness UX, and awareness fatigues.
  • Server mode without OPENCODE_SERVER_PASSWORD runs unauthenticated with only a warning. Opt-in does not mean safe-by-default.
  • The Enterprise tier and desktop beta split attention. Commercial direction can move features and docs faster than the self-run path absorbs them.

Security Note

Start from the project’s own threat model in SECURITY.md: shell execution, file operations, and web access run with your privileges; the permission system is not isolation; MCP servers sit outside the trust boundary; and config files you control are your responsibility. Operate accordingly: run untrusted repositories in Docker or a VM, set OPENCODE_SERVER_PASSWORD before enabling server mode (never expose it unauthenticated), vet MCP servers like dependencies, and keep model keys out of shell history and shared configs. Report vulnerabilities through the GitHub advisory tab, and note the maintainers auto-ban AI-generated reports, so human-written, reproducible disclosures only. Plan mode is the safer default for unfamiliar codebases: read-only exploration with bash gated behind explicit approval.

Licensing

The repository is MIT-licensed. Commercial use, modification, and redistribution are permitted with notice preservation. The organization rename (SST to anomalyco) leaves granted rights unchanged; update old links and package scopes to avoid confusion. Confirm the LICENSE file at the official repository before commercial integration.

Quickstart and Deployment

Verified against the official README (installer, package managers, agents):

curl -fsSL https://opencode.ai/install | bash
npm i -g opencode-ai@latest
brew install anomalyco/tap/opencode

Agents switch with the Tab key: build for full-access development, plan for read-only analysis that asks before bash. The general subagent handles complex searches via @general in messages. For Windows, Arch, mise, Nix, desktop installs, and the install-directory precedence (OPENCODE_INSTALL_DIR, XDG_BIN_DIR), follow the README and docs instead of improvising.

Who Should Use This

Good fit: terminal developers wanting the most widely used open agent with explicit build and plan modes; polyglot teams standardizing on one tool across providers; SDK consumers building on opencode-ai (as the bench harness in this batch does); Docker-disciplined users who supply their own isolation. Bad fit: anyone needing built-in sandboxing; teams wanting stable-branch releases by default; shops requiring support SLAs; environments where permission-prompt fatigue would be the only control.

Deeper Insight

Honest security docs are a feature. By stating that permissions are UX and isolation is the user’s job, OpenCode transfers the right mental model instead of a false guarantee, which produces safer operators than a sandbox claim nobody verifies. Compare tools that market approval prompts as protection: the incident reports look the same, but the OpenCode user was warned. When evaluating any agent, read its SECURITY.md before its feature list; the gap between what prompts promise and what they enforce predicts your worst day.

What I Would Change

If I operated this system, I would run the TUI exclusively inside a container with the workspace mounted, keep server mode off unless a concrete integration needs it (with a generated password from day one), default new checkouts to plan mode until trust is established, and pin releases instead of tracking dev. None of this changes the tool; all of it compensates for what the tool honestly declines to do. These are engineering opinion, not project fact.