# OpenCode

> Open-source AI coding agent for the terminal.

- Page: https://vibetoolrank.com/tools/opencode/
- Markdown: https://vibetoolrank.com/tools/opencode.md
- Official: https://opencode.ai
- Notice (2026-10-17): Security incident (OpenCode Console). On 2026-10-17, OpenCode announced a security breach the previous night that it linked to a large-scale distillation attack. It said the breach affected 1.4% of OpenCode Console users, a subset of users who had external providers linked, and that it emailed every affected user; users who got no email were not affected. As of 2026-10-18, OpenCode describes the incident as ongoing and says it is working with Anthropic, OpenAI and Google to remediate. The notice does not say whether the open-source CLI is affected. We tested the CLI without a Console account; our score is unchanged.
- Category: Coding Agents (CLI & Cloud) (https://vibetoolrank.com/best/terminal-agents/ · https://vibetoolrank.com/best/terminal-agents.md)
- Pricing: Go $10/mo; Go Plus $40/mo; Zen pay-as-you-go ($20 prepaid)
- Free tier: Yes: open-source agent free with own keys; some free Zen models
- Last checked: 2026-11-18

## Agent test

- Overall: **9.2/10** (outcome 9.9, speed 9.5, cost 10, DX 7, reliability 8.3)
- Cost per run: $0.076 / run
- Tested: 2026-11-18 · Runs: 3 runs · Edition: OpenCode CLI 1.19.6 headless (opencode run --format json), BYOK free-tier Google AI Studio key, google/gemini-3.5-flash-lite. Headline is T3+T4+T5 (rubric v0.3). OpenCode Zen, Go and the desktop app were not tested in this sitting.
- Score label: rubric v0.3
- Summary: Headline 9.2 is the mean of T3 9.6, T4 9.5, and T5 8.5 (rubric v0.3). T3 and T4 were 4/4 and 12/12 on all three runs; T5 was 20/20, 20/20 and 19/20. Cost per run is $0.0764, the mean of all nine runs on gemini-3.5-flash-lite. The previous T3-only score of 9.2 on the free Zen model stays in labelled history.
- Evidence: docs/tests/opencode/RESULTS.md

## Pros / cons

- Pro: Passed every T3 and T4 held-out test on all three runs and 59 of 60 T5 held-out tests
- Pro: Fast: T3 in 12–14s and T4 in 55–75s on gemini-3.5-flash-lite
- Pro: Headless JSON output reports split input, cached and output tokens plus cost for every step
- Con: opencode run still waits silently on an open stdin in scripts; redirect stdin from /dev/null
- Con: Bring-your-own-key setup needs a provider config file
- Con: Free Zen models hit a free-usage limit from our box on 16 Nov 2026 (it had reset by 18 Nov)

## Adoption signals (not part of the score)

- GitHub stars: **224k** (223,616) on [sst/opencode](https://github.com/sst/opencode)
- Fetched: 2026-11-01 · Last push: 2026-10-31
- These figures are public GitHub metrics for context only. They do **not** affect VibeToolRank scores or rankings.

## Sources

- https://opencode.ai
- https://opencode.ai/docs/go/

Methodology: https://vibetoolrank.com/methodology/
