You want an open-source coding agent that does not lock you into one model vendor. OpenCode and Goose both qualify. Both are free, both take any API key, both have a terminal CLI and a desktop app. OpenCode has 209,405 GitHub stars (MIT, TypeScript) and 75+ model providers. Goose has 54,568 stars (Apache-2.0, Rust), lives under the Linux Foundation, and handles more than code.
Summary: Goose vs OpenCode at a Glance
| Dimension | OpenCode | Goose |
|---|---|---|
| GitHub stars | 209,405 | 54,568 |
| Forks | 27,620 | 6,294 |
| Latest release | V1 v1.18.32 (Sep 21, 2026); V2 2.0.14 on npm (Sep 22, 2026) | v1.51.0 (Sep 17, 2026) |
| License | MIT | Apache-2.0 |
| Repo | anomalyco/opencode | aaif-goose/goose |
| Governance | anomalyco org | Linux Foundation AAIF |
| Surfaces | Terminal TUI + desktop app (beta) | Desktop app + CLI + API |
| Model providers | 75+ via AI SDK | 15+ providers + 4 ACP agents |
| Built in | TypeScript | Rust |
| Scope | Coding agent | Code + research + writing + automation |
| Price | Free, BYO key (optional Go $10/mo) | Free, BYO key |
Latest Releases (September 2026)
Both projects ship weekly. OpenCode released v1.18.26 through v1.18.32 between September 1 and September 21. Goose released v1.49.0 through v1.51.0 between September 3 and September 17.
opencode-ai and the GitHub Releases page, currently v1.18.32. V2 is npm @opencode/cli. It published 2.0.0 on September 11 and reached 2.0.14 on September 22. V2 is tagged in git but not listed on GitHub Releases, so the Releases page still reads 1.18.x. V2 has breaking changes. V1 plugins do not run on the new plugin API. The server API and client contracts changed. TUI config moves from layered tui.json to one global cli.json, migrated automatically. V2 reads your V1 opencode.json as-is. Both lines install as opencode, and the V2 installer replaces the V1 binary. See the V1 to V2 migration guide.| Release | Notable changes |
|---|---|
| OpenCode v1.18.32 (Sep 21) | Fixed Together AI streaming usage reporting. Added DeepSeek V4.1 Flash to Zen and Grok 4.7 to Zen and Go. |
| OpenCode v1.18.31 (Sep 14) | Restored ACP session model, effort, and mode when resuming or forking. Remote config auth errors now fail startup visibly. |
| OpenCode v1.18.30 (Sep 9) | Astra system prompt for GPT-6 models. Bedrock DeepSeek ARN model IDs now resolve. |
| Goose v1.51.0 (Sep 17) | Opt-in terminal bell on turn finish or approval. EUrouter provider. Headless runs now return failure when interrupted. Session ID header for OpenCode Go. Removed planning mode and the create recipe command from the CLI. |
| Goose v1.50.1 (Sep 14) | Patch: rolled back model updates and the MCP default version selection change. |
| Goose v1.50.0 (Sep 8) | GPT-6 Astra support. ACP client and acp binary published as separate npm packages. Fast model routing removed. |
Goose v1.51.0 sends a session ID header for OpenCode Go. That means Goose can use OpenCode's $10/month Go plan as its model provider. Goose v1.48.0 (August 27) also added OpenCode Zen as a provider. The two tools are not strictly rivals.
| Date | Change |
|---|---|
| Sep 22, 2026 | OpenCode V2 2.0.14 on npm @opencode/cli. |
| Sep 11, 2026 | OpenCode V2 2.0.0 published, with a new plugin API and a new cli.json TUI config. |
| Aug 24, 2026 | OpenCode v1.18.22 removed the OpenCode Go first-month discount. |
| Jul 23, 2026 | Goose v1.44.0 security fix GHSA-r5pp-p5r8-466r. goose review could run arbitrary commands through a repo's git core.fsmonitor setting. Update to v1.44.0 or later before running goose review on untrusted repos. |
Stars, License, and Governance
OpenCode is the most-starred open-source coding agent on GitHub at 209,405 stars, ahead of openai/codex (125,962) and gemini-cli (107,130). The repo is anomalyco/opencode. The old sst/opencode URL redirects there. It ships under MIT.
Goose has 54,568 stars under Apache-2.0. The Linux Foundation announced the Agentic AI Foundation on December 9, 2025, with three founding projects: Anthropic's MCP, OpenAI's AGENTS.md, and Block's Goose. In April 2026 the repo moved from block/goose to aaif-goose/goose and the docs moved to goose-docs.ai. If you have an old clone, run git remote set-url origin git@github.com:aaif-goose/goose.git. The repo has a public GOVERNANCE.md and a guide for building custom distributions with preset providers and extensions.
Install Commands
| Method | OpenCode | Goose |
|---|---|---|
| Shell script | curl -fsSL https://opencode.ai/install | bash | curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash |
| Homebrew (CLI) | brew install anomalyco/tap/opencode | brew install block-goose-cli |
| Homebrew (desktop) | brew install --cask opencode-desktop | brew install --cask block-goose |
| npm | npm i -g opencode-ai@latest | ACP client packages only |
| OpenCode V2 | curl -fsSL https://opencode.ai/v2/install | bash, npm i -g @opencode/cli, or brew install anomalyco/tap/opencode-v2 | n/a |
| Windows | scoop install opencode / choco install opencode | PowerShell download_cli.ps1, or desktop zip |
| Other | Bun, pnpm, Yarn, pacman, paru, mise, nix | Linux DEB, RPM, Flatpak desktop builds |
Two gotchas. The Goose Homebrew formula is block-goose-cli, not goose. For CI, pipe the Goose script through CONFIGURE=false bash to skip the interactive setup. OpenCode's README recommends the anomalyco/tap formula over the official brew install opencode, which it says updates less often. The V2 installer replaces the V1 opencode binary, and V2 has no Windows package manager builds.
Model Providers
OpenCode supports 75+ LLM providers through the AI SDK and the Models.dev catalog, plus local models via Ollama, LM Studio, and llama.cpp. Custom OpenAI-compatible providers are configured in JSON:
{"provider":{"myprovider":{
"npm":"@ai-sdk/openai-compatible",
"options":{"baseURL":"https://api.myprovider.com/v1"},
"models":{ ... }
}}}Goose works with 15+ providers (Anthropic, OpenAI, Google, Ollama, OpenRouter, Azure, Bedrock, and more) and connects to 70+ extensions over MCP. It also has four ACP providers that wrap another agent instead of a raw model: Claude ACP, Codex ACP, Amp ACP, and Pi ACP. OpenCode has the wider model menu. Goose has the broader extension ecosystem and a general-purpose scope.
Pricing: Free Tools, Optional OpenCode Go and Zen
Both agents are free. The cost is the model. OpenCode sells two optional model plans. Goose sells nothing.
| Plan | OpenCode | Goose |
|---|---|---|
| Agent | Free (MIT) | Free (Apache-2.0) |
| Subscription | OpenCode Go: $10/month, 30 open coding models | None |
| Pay as you go | OpenCode Zen: prepaid credits, per-request billing | None |
| Free models | Big Pickle and several free beta models on Zen | Local models via Ollama |
OpenCode Go caps usage per model in dollars. Most models get $60 a month. Heavier ones such as GLM-5.3, Kimi K3, and DeepSeek V4 Pro get $15. v1.18.22 removed the first-month discount on August 24, 2026, so Go is a flat $10 from month one. Limits apply in three windows: 20% of the monthly budget per 5 hours, 50% per week, 100% per month. Once you hit a limit you can fall back to your Zen balance. Zen passes card fees through at cost (4.4% + $0.30 per transaction) and auto-reloads $20 when the balance drops below $5 unless you turn it off. See the Go docs and Zen docs.
Subscription Reuse
A common question is whether you can point either tool at a Claude Pro or Max plan instead of paying per token. With OpenCode, no. Its provider docs say plugins exist for Claude Pro/Max and that "Anthropic explicitly prohibits this." Goose takes a different route. Its Claude ACP provider does not call the Claude API with your subscription token. It runs Claude Code itself through the @agentclientprotocol/claude-agent-acp adapter and passes Goose's extensions to it as MCP servers.
| Subscription | OpenCode | Goose |
|---|---|---|
| Claude Pro / Max | Prohibited by Anthropic | Via Claude ACP (runs Claude Code) |
| ChatGPT Plus / Pro | Usable as backend | Via Codex ACP |
| GitHub Copilot | Usable as backend | Not documented |
| GitLab Duo | Usable as backend | Not documented |
| Amp / Pi | Not documented | Via Amp ACP / Pi ACP |
| OpenCode Go | Native | Supported provider |
Set it with GOOSE_PROVIDER=claude-acp (or codex-acp, amp-acp, pi-acp). One limit: ACP sessions cannot be resumed or forked yet, so goose session resume and goose session fork do not work with them. The Goose README also mentions Gemini subscriptions via ACP, but the ACP provider docs list only the four above.
Runaway Loops and Turn Limits
The failure people report most with BYO-key agents is a loop that burns budget. A Hacker News user tried Goose on a small feature and said it ran what looked like an infinite loop that used three-quarters of a monthly Poe subscription on one prompt. The defaults explain why that can happen.
| Setting | OpenCode | Goose |
|---|---|---|
| Max turns without user input | steps (unset = no cap) | GOOSE_MAX_TURNS = 1000 |
| Subagent turn cap | Per-agent steps | GOOSE_SUBAGENT_MAX_TURNS = 25 |
| Repeated identical calls | doom_loop = ask after 3 repeats | No equivalent documented |
| Default approval mode | Most tools allow | GOOSE_MODE = auto |
OpenCode pauses and asks when the same tool call repeats 3 times with identical input. That is the doom_loop permission, and it defaults to ask. Goose runs up to 1,000 turns without user input in auto mode. If you run Goose on a metered plan, set GOOSE_MAX_TURNS to something like 50 and GOOSE_MODE=smart_approve. In OpenCode, set steps on an agent to cap its iterations. The legacy maxSteps key is deprecated.
Where OpenCode Wins
Largest community
209,405 stars and 27,620 forks. Seven releases in September 2026 alone.
75+ providers
AI SDK plus Models.dev, OpenAI-compatible JSON config, local via Ollama / LM Studio / llama.cpp.
Claude Code-style agents
Build and plan primary agents on Tab, plus general, explore, and scout subagents. doom_loop guard on by default.
A Hacker News user who tried Goose and Aider before settling on OpenCode gave the reason plainly: it worked like Claude Code, their main agent, while serving a local model through Ollama.
Where Goose Wins
Mature desktop app
Native GUI on macOS, Linux, and Windows alongside the CLI and API. OpenCode's desktop app is still beta.
Foundation governance
Linux Foundation AAIF, next to MCP and AGENTS.md. Public GOVERNANCE.md and custom-distribution support.
Beyond code, in Rust
Built for research, writing, automation, and data analysis, with 70+ MCP extensions and a Rust core.
Which Model to Run Inside Each
Both agents are BYO-model, so the model sets your quality and cost. A long agent session sends the same growing context on every turn, so input price dominates the bill. Loops multiply it.
Morph serves open coding models on custom inference kernels through an OpenAI-compatible API. Add it to OpenCode as a custom @ai-sdk/openai-compatible provider, or to Goose as a custom OpenAI-compatible provider.
| Model | Price (input / output per 1M) | Context |
|---|---|---|
| morph-dsv41flash (DeepSeek V4.1 Flash) | $0.12 / $0.8 | 1M |
| morph-glm53flash (GLM-5.3-Flash) | $0.2 / $0.7 | 1M |
See Morph Open Source Models and pricing.
Decision Framework
| Your priority | Best choice | Why |
|---|---|---|
| Largest community / most stars | OpenCode | 209,405 stars, weekly releases. |
| Widest model menu | OpenCode | 75+ providers via AI SDK and Models.dev. |
| Loop protection out of the box | OpenCode | doom_loop asks after 3 identical calls. |
| Cheap flat-rate open models | OpenCode | Go plan at $10/month (Goose can use it too). |
| Desktop GUI | Goose | Stable native app on macOS, Linux, Windows. |
| Rust codebase | Goose | Rust core; OpenCode is TypeScript. |
| Foundation governance | Goose | Linux Foundation AAIF with public GOVERNANCE.md. |
| Non-code tasks (research, writing) | Goose | General-purpose by design. |
| Use a Claude or ChatGPT subscription | Goose | Claude ACP and Codex ACP wrap the vendor's own agent. |
| Reuse Copilot or GitLab Duo | OpenCode | Documented as usable backends. |
Frequently Asked Questions
Is OpenCode or Goose better?
OpenCode for a terminal coding agent: 209,405 stars, 75+ providers, and a doom_loop guard on by default. Goose for a desktop app, non-code tasks, Linux Foundation governance, and reusing a Claude Code or ChatGPT subscription through ACP.
What is Goose?
An open-source AI agent built by Block and donated to the Linux Foundation's Agentic AI Foundation, now at aaif-goose/goose. Written in Rust. Ships as a desktop app, CLI, and API, works with 15+ providers, and connects to 70+ MCP extensions. Latest release v1.51.0 (September 17, 2026).
How many GitHub stars does OpenCode have?
209,405 stars (MIT) as of September 22, 2026, ahead of Codex (125,962) and Gemini CLI (107,130).
Are they free?
Yes. OpenCode is MIT, Goose is Apache-2.0. You pay only for the model. OpenCode optionally sells Go ($10/month) and Zen (pay-as-you-go credits).
Can I use my Claude subscription?
Not with OpenCode. Its docs say Anthropic explicitly prohibits Claude Pro/Max plugins. Goose's Claude ACP provider runs Claude Code itself under your subscription, with Goose extensions passed through as MCP servers.
How do I install OpenCode and Goose?
OpenCode: curl -fsSL https://opencode.ai/install | bash or brew install anomalyco/tap/opencode. Goose CLI: the download_cli.sh script from aaif-goose/goose releases, or brew install block-goose-cli. OpenCode V2: npm i -g @opencode/cli.
What is OpenCode V2?
A new release line on npm as @opencode/cli. 2.0.0 shipped September 11, 2026 and the latest is 2.0.14 (September 22, 2026). It has a new plugin API, so V1 plugins do not run, and it moves TUI config to one global cli.json. It reads V1 opencode.json as-is. V1 continues in parallel at v1.18.32.
Is Goose written in Rust? Is there a Rust alternative to OpenCode?
Goose is written in Rust. OpenCode is TypeScript. For a Rust-built open-source alternative to OpenCode with a terminal CLI, Goose is the closest match.
Does Goose run in the terminal?
Yes. The Goose CLI runs in any terminal. The default GOOSE_MODE is auto. Set approve or smart_approve to confirm tool calls. v1.51.0 added an opt-in terminal bell when a turn finishes or needs approval.
Related comparisons
OpenCode vs Cursor
Open-source, model-agnostic terminal agent vs the closed IDE. Bring-your-own-key vs bundled.
OpenCode vs Cline
Two open-source agents: terminal-native OpenCode vs the VS Code extension Cline.
OpenCode vs Aider
Modern multi-provider TUI agent vs the original git-native pair programmer.
OpenCode vs Gemini CLI
Provider-agnostic open-source agent vs Google's free-tier Gemini terminal agent.
OpenCode vs Kilo Code
Terminal-first OpenCode vs the VS Code agent that merged Roo and Cline ideas.
OpenCode vs Claude Code
Open-source terminal agent vs Anthropic's Claude Code.
WarpGrep Boosts Any MCP Agent
WarpGrep is #1 on SWE-Bench Pro for repo search. It runs as an MCP server inside OpenCode, Goose, and any tool that supports MCP. Better search means better context means better code.
