# Terminal Agents in 2026: goose, Claude Code, OpenCode, and Pi Compared

> Source: <https://outofcontext.dev/blog/goose-claude-code-opencode-pi/>
> Published: 2026-06-25 00:00:00+00:00

# Terminal Agents in 2026: goose, Claude Code, OpenCode, and Pi Compared

Pick a terminal coding agent in 2026 and you are not really picking a model — the frontier models have largely converged, so the *harness* wrapped around them decides the daily experience. Four have earned a serious look in the last eighteen months, and they split along one line: **Claude Code** is the proprietary platform product; the other three are open source but pull in different directions — **goose** is the foundation-governed generalist, **OpenCode** is the full-featured contender with IDE-grade code intelligence, and **Pi** is the minimal core you extend yourself.

This is a documentation-grounded comparison, not a scored bake-off. Each tool is measured against its primary sources — official docs, repos, and release notes — on the axes that actually decide a daily driver: model lock-in, cost and auth, safety defaults, and how much setup you inherit versus build.

**Scope note:** Figures below are verified against primary sources as of June 25, 2026. Star counts move daily; pricing, permission modes, and subscription policies change between releases.

## TL;DR comparison

Axes are ordered by how often they break a pick. Multi-item cells lead with the shared capabilities (e.g. **MCP · subagents** first) so you can scan straight down a column and see which harness adds or misses a given feature. Jump to [goose](#goose), [Claude Code](#claude-code), [OpenCode](#opencode), or [Pi](#pi) for receipts.

Model flexibility | Cost model | Claude subscription auth | License / governance | Default safety | Extensibility | Code intelligence | Interface | Maturity | Signature move | |
|---|---|---|---|---|---|---|---|---|---|---|
goose | 15+ providers, BYO key (
|

**No**— API key only ([providers docs](https://goose-docs.ai/docs/getting-started/providers))[AAIF / Linux Foundation](https://goose-docs.ai/blog/2026/04/07/goose-moves-to-aaif/)(Apr 2026)**recipes** for repeatable workflows**Claude Code**`ANTHROPIC_BASE_URL`

(Bedrock, Vertex, self-hosted gateways)[billing pause](/blog/anthropic-agent-sdk-billing-pause/))**Yes**— native OAuth (approved client) ([auth docs](https://code.claude.com/docs/en/authentication))`default`

→ `acceptEdits`

→ `plan`

→ `auto`

→ `dontAsk`

→ `bypassPermissions`

([permission modes](https://code.claude.com/docs/en/permission-modes))**OpenCode****No**— subscription auth removed Mar 2026 (legal)** Build**vs** Plan**agents; per-tool permission matrix ([agents](https://opencode.ai/docs/agents/))** LSP diagnostics**fed to agent when enabled ([LSP docs](https://opencode.ai/docs/lsp/))** Pi**[npm](https://www.npmjs.com/package/@earendil-works/pi-coding-agent))** Conditional**—`/login`

works, under Anthropic’s paused metering policy`tsc`

/lint via bash; LSP only as extension## goose

[goose](https://goose-docs.ai/) started inside Block’s open-source program as “codename goose” in early 2025. In April 2026 Block donated it to the [Agentic AI Foundation](https://goose-docs.ai/blog/2026/04/07/goose-moves-to-aaif/) under the Linux Foundation — same umbrella as Anthropic’s MCP spec and OpenAI’s AGENTS.md. The repo lives at [ github.com/aaif-goose/goose](https://github.com/aaif-goose/goose) (~50K stars as of June 25, 2026).

**What stands out:** goose is not positioning as “the open Claude Code.” It is a general-purpose, local-first agent that happens to be good at coding. Recipes — portable YAML workflow templates you can share and automate — are the feature people cite when they switch from a subscription agent. Pair a strong API model with BYO keys and community threads often report per-task cost an order of magnitude below Claude Max tiers, though that depends on model choice and loop length.

**Auth:** goose is API-key-only for Anthropic. There is no Claude Pro/Max subscription login — a [long-standing feature request](https://github.com/aaif-goose/goose/issues/3647) for Anthropic OAuth was closed without shipping. You bring an `ANTHROPIC_API_KEY`

(or any of 15+ other providers) and pay per token.

**Extensibility:** MCP is the integration surface. Block’s docs list 70+ first-party extension patterns; the community MCP catalog is much larger. Subagents and YAML recipes round out the surface. The desktop app lowers the terminal barrier for teammates who will not live in a TUI.

**Rough edges:** Hacker News threads praise recipes and cost flexibility but flag orchestration that lags the underlying model — the harness feels less refined than Claude Code or OpenCode even when you point the same frontier model at both. Setup (profiles, providers, extensions) takes more fiddling than signing into a proprietary CLI.

**Verdict:** Best when you want vendor-neutral governance, any-model flexibility, and workflow packaging beyond one-off chat sessions. Worst when you want the smoothest out-of-box coding UX.

## Claude Code

[Claude Code](https://claude.com/product/claude-code) is the polished commercial benchmark. Anthropic ships terminal, VS Code/JetBrains, desktop, web, and GitHub/GitLab PR workflows from one product surface. If you are already paying for Claude and want the least friction, this is the default incumbents measure against.

**Permission modes** matter more than feature checklists. The docs list six, verified against the current [permission-modes page](https://code.claude.com/docs/en/permission-modes): `default`

(reads without asking; prompts on edits and shell), `acceptEdits`

, `plan`

(read-only, propose don’t edit), `auto`

(a classifier reviews each action — see our [auto-review vs YOLO post](/blog/cursor-auto-review-vs-yolo/) for the Cursor parallel, not a duplicate deep-dive), `dontAsk`

(only pre-approved tools, for locked-down CI), and `bypassPermissions`

(everything; containers/VMs only). One nuance the marketing skips: only `default → acceptEdits → plan`

sit in the `Shift+Tab`

cycle. `auto`

appears once your account and version qualify (research preview, v2.1.83+), `dontAsk`

is set via `--permission-mode`

, and `bypassPermissions`

unlocks only behind a launch flag.

**Extensibility:** MCP, skills, hooks, subagents, and dynamic workflows (research preview) are first-party. The ecosystem is Anthropic-shaped — powerful, but you are inside one lab’s opinion of what an agent should do.

**Billing and subscription (June 2026):** Interactive Claude Code sessions draw from your subscription pool, and Claude Code is one of only two Anthropic-approved subscription clients (the other is claude.ai), so its OAuth `/login`

is stable in a way third-party harnesses’ is not. Programmatic usage — Agent SDK, `claude -p`

, GitHub Actions — was scheduled to move to a separate monthly API credit on June 15. Anthropic [paused that change on day one](/blog/anthropic-agent-sdk-billing-pause/); treat the split as directionally true while the timeline stays soft. If your workflow is mostly interactive terminal sessions, this matters less than if you run headless agents in CI.

**Lock-in is softer than it looks.** Claude Code defaults to Anthropic models, but it is not hard-wired to them. Point `ANTHROPIC_BASE_URL`

at any gateway that speaks the Anthropic Messages API and set `ANTHROPIC_AUTH_TOKEN`

, and you can front Bedrock, Vertex, a LiteLLM or vLLM proxy, or a self-hosted model ([LLM gateway docs](https://code.claude.com/docs/en/llm-gateway)). That routes traffic — and billing — to your endpoint instead of your subscription, so the “Anthropic-only” ceiling is a default, not a wall. The real coupling is to Anthropic’s *product* opinions (modes, skills, hooks), not strictly its weights.

**Verdict:** Best polish and tightest integration with Claude’s model improvements. Worst out-of-box model flexibility — escapable through a gateway, but only by giving up the subscription economics that make it attractive in the first place.

## OpenCode

[OpenCode](https://opencode.ai/) from the SST/Anomaly team is the open-source answer to “why can’t I have Claude Code ergonomics on whatever model I want?” The repo [ anomalyco/opencode](https://github.com/anomalyco/opencode) had ~178K GitHub stars on June 25, 2026 — star velocity matters less than whether the TUI and permission model match how you work.

**LSP is the differentiator.** OpenCode can start language servers for dozens of file types and feed diagnostics back into the agent loop ([LSP docs](https://opencode.ai/docs/lsp/)). LSP is disabled by default; OpenCode’s own docs warn that language servers can desync, eat memory, and slow sessions. It pays off most on typed codebases like TypeScript, where compiler feedback beats raw file diffs; on small scripts the overhead may not be worth it — let the agent run `pnpm check`

via bash instead.

**Agents:** Tab switches between **Build** (full tools) and **Plan** (edits and bash default to `ask`

). Subagents — General, Explore, Scout — handle parallel research without polluting the main session. Permissions are granular per tool (`edit`

, `bash`

, `lsp`

, MCP wildcards).

**Models, auth, and privacy:** OpenCode routes through Models.dev with 75+ providers (BYO key). One sharp edge for Claude users: subscription auth is gone. In March 2026, after Anthropic’s legal push against third-party subscription use, OpenCode stripped its Anthropic OAuth plugin from the official build — you authenticate Claude with an API key, not a Pro/Max login. Code residency depends on the path you run: BYO-key and self-hosted paths keep traffic on your own infra and provider; hosted tiers (OpenCode Go at $5/mo, Zen) route through their servers — check the mode you actually use.

**Tradeoffs:** Community reports suggest iteration can feel slower than Claude Code on the same model — more harness overhead, more configuration surface. The contributor count is enormous; breaking changes land frequently.

**Verdict:** Open-source Claude Code ergonomics with real code intelligence when LSP is worth the cost. The standout choice when you want MIT license, any model, and IDE-grade agent modes without Anthropic lock-in — provided you are fine paying Claude per-token rather than on a subscription.

## Pi

[Pi](https://pi.dev/) is Mario Zechner’s deliberately tiny harness — the same engineering mind behind libGDX, and the core loop inside OpenClaw. In April 2026 Zechner [announced Earendil Works](https://mariozechner.at/posts/2026-04-08-ive-sold-out/); the MIT core stays MIT. The repo [ earendil-works/pi](https://github.com/earendil-works/pi) sat at ~65K stars on June 25, 2026.

**Install note:** Pi ships as an npm package, but the scope moved with the company. The current package is [ @earendil-works/pi-coding-agent](https://www.npmjs.com/package/@earendil-works/pi-coding-agent); the old

`@mariozechner/pi-coding-agent`

scope is **deprecated** and frozen at

`0.73.1`

, with `0.74.0`

the first release under the new home ([migration post](https://pi.dev/news/2026/5/7/pi-has-a-new-home)). Old pins still resolve, but new installs should use the Earendil scope.

**Minimal by design:** Pi ships four tools by default — `read`

, `write`

, `edit`

, `bash`

([author post](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/)). No built-in subagents, plan mode, or MCP. The system prompt is intentionally short; Zechner’s argument is that frontier models are already RL-trained for coding — extra instructions mostly burn context. Optional read-only tools (`grep`

, `find`

, `ls`

) exist if you want to restrict write access further.

**Extensibility is the product:** TypeScript extensions hot-reload. Skills use progressive disclosure so prompt cache stays warm. Pi packages distribute extensions via npm or git. Fifty-plus examples ship in-repo. Want MCP? Write an extension or point Pi at the docs and let it scaffold one — there is no vendor marketplace gate.

**Auth — read this before you rely on it:** Pi keeps a `/login`

flow for Claude Pro/Max and ChatGPT subscriptions alongside BYO API keys. The subscription path is real but fragile. Anthropic restricted third-party harnesses from drawing on Claude subscriptions in early 2026, enforced it on April 4 (third-party calls were rejected with “draws from your extra usage, not your plan limits”), then [paused the metering change on June 16](/blog/anthropic-agent-sdk-billing-pause/). So subscription login works today, under a policy Anthropic has already changed three times this year. Budget for an API key as the stable fallback.

**Modes:** Interactive TUI, print/JSON for scripts, RPC for embedding, SDK for building your own agent. Armin Ronacher’s [write-up on Pi inside OpenClaw](https://lucumr.pocoo.org/2026/1/31/pi/) captures the power-user appeal: you read the extension code, you own the behavior.

**Tradeoffs:** Not mass-market polish. No background bash — Pi expects tmux if you want long-running processes with full observability. The subscription `/login`

paths reduce API friction but add auth surface — and policy risk — you must accept.

**Verdict:** Reshape the harness, do not adopt a product. Best when you treat the agent loop as infrastructure you version-control.

## Decision guide

No single winner — four different bets on how much product you want wrapped around the model.

**Pick Claude Code if** you already live in Anthropic’s subscription, want the least setup friction, and value first-party polish, hooks, and PR integrations — and note its subscription auth is the only one here Anthropic guarantees.**Pick OpenCode if** you want open source (MIT), any model, Build/Plan agent ergonomics, and LSP-fed diagnostics on typed codebases — and you are fine paying Claude with an API key, not a subscription.**Pick goose if** foundation governance matters to your org, you need recipes for repeatable cross-team workflows, or you want a generalist agent beyond pure coding with BYO keys across 15+ providers.**Pick Pi if** you are building agent infrastructure — minimal core, TS extensions you own, token-efficient prompts — and you will invest setup time once to save lock-in forever.**Pick none of them as your only tool if** you still do most editing in an IDE. These are terminal defaults, not replacements for Cursor tab-complete or a language server’s inline fixes.

**One axis to pressure-test before migrating a team default:** cost and auth predictability. Subscription agents feel cheap until you run autonomous loops; BYO API feels expensive until you model per-task spend. And the auth ground keeps moving — only Claude Code has guaranteed subscription access; goose and OpenCode are API-key-only for Claude, and Pi’s subscription path rides a policy Anthropic keeps revising. Log usage on one representative task in each harness, and price the API-key fallback, before you commit a team.

## Scope and limits

Figures here come from primary sources, not a controlled benchmark:

- No Terminal Bench or SWE-bench scores — none are invented.
- Vendor adoption metrics (Block’s ~60% internal goose use, OpenCode’s “6.5M monthly developers”) are vendor claims, not independent measurements; GitHub stars stand in for size.
- Subscription-auth status reflects Anthropic’s June 16, 2026 pause and can shift again — re-check before you bet a workflow on it.
- Desktop UX, Windows/WSL edge cases, and enterprise SSO get only shallow coverage.

For permission-tier nuance on Claude Code and Cursor, see [auto-review vs YOLO](/blog/cursor-auto-review-vs-yolo/) and [safe mode](/blog/claude-code-safe-mode/). For harness orchestration tradeoffs on Claude Code specifically, see [when to let Claude write the harness](/blog/when-to-let-claude-write-the-harness/).

**Which axis mattered most in your last agent pick — cost, lock-in, LSP feedback, subscription auth, or how much harness you wanted to own?**
