Pricing+7% bonus
Contact sales

Agent comparison · one key, two clients

OpenCode vs Claude Code: one key runs both agents

Claude Code is Anthropic's own terminal agent, tuned for Claude models and sold as a seat. OpenCode is an MIT-licensed client you point at any provider. GPTProto is the provider end of that second path: one OpenAI-compatible key, 200+ models, 10–30% below official list, billed per call.

Get a key for 200+ models Account required · paid per call · no subscription
What one request looks likesame key, same endpoint
# shell — the only two values OpenCode needs
export GPTPROTO_KEY="…"        # from the dashboard, never the repo
export GPTPROTO_BASE_URL="…"   # OpenAI-compatible endpoint

opencode                        # client reads the provider block, then the key
→ model: claude-sonnet-5-5 · 10% off list · billed per call
200+ modelsone key, one base URL
10–30%below official list, site-wide
Per callno seat, no monthly minimum

OpenCode vs Claude Code at a glance

One is Anthropic's own terminal agent; the other is an MIT-licensed client you point at any provider. The split, in one screen, before the detail.

Pick Claude Code when

The work is Claude-shaped and nobody wants to own a provider config. Plan mode, hooks and agent teams ship in the box, and the seat covers every task in the repo.

Zero provider setup · one monthly seat

Pick OpenCode when

You already buy tokens somewhere and want the client to stop deciding which model answers. Provider blocks, local models and permission rules are files in the repo.

Any provider · config lives in the repo

Keep both when

Ship Claude Code where its harness wins, and route the long tail — renames, test fixes, log reading — through OpenCode on a cheaper model. Nothing forces one choice.

One repo, two clients, one key

Where the two agents actually split

The harness decides how a task is planned, edited and approved. The model decides what the answer costs. Most comparisons fold those two decisions into one.

Four lines that decide the rest
LineClaude CodeOpenCode
Who writes the model listAnthropic ships it; you choose a tier and the client picks from that family.You do. A provider block names each model, and the client lists what you declared.
Where config livesCLAUDE.md, settings and hooks inside the project directory.AGENTS.md, opencode.json and plugins inside the same directory.
What you pay forA seat that refreshes on a billing period, whether or not the repo saw a commit.Tokens per call, at whatever provider the block points at.
What breaks firstA usage window, or a task the chosen model misreads.A provider outage, or a typo in the provider block.

Where opencode vs claude code actually splits is here: one line decides who writes the model list, and the other three follow from it.

Models: what each agent can be pointed at

Claude Code is built around Anthropic's line. OpenCode takes a provider block, so its model list is whatever you configure and pay for.

Model coverage by client
ModelVendorClaude CodeOpenCode
Claude Sonnet 5.5 AnthropicDefault workhorseProvider block, 10% off list
Claude Opus 4.5 AnthropicHigher tiers onlySame block, when a task needs depth
GPT-5.2 OpenAINot supportedNative OpenAI-compatible provider
Gemini 3 Pro GoogleNot supportedVia its compatible endpoint
DeepSeek V3.2 DeepSeekNot supportedCheap pass for bulk edits
Qwen3-Max AlibabaNot supportedHosted endpoint or self-hosted

One model discount is not the site number. Sonnet 5.5 carries a 10% model discount on GPTProto; the band across the 200+ model catalogue is 10–30% below official list.

What a month of each setup costs

A seat bills whether or not you ship. Token billing only moves when you call. GPTProto sits 10–30% below list, paid per call, with no subscription attached.

Smallest top-up

Top up $10

$10.15credited
1.5% bonus · Sonnet 5.5 input ≈ $1.77 / 1M · 11% below list

Enough to run a week of small diffs on a mid-size repo. The bonus lands on the balance, on top of the model discount already applied.

Same key · same 200+ models
Most common

Top up $20

$20.50credited
2.5% bonus · Sonnet 5.5 input ≈ $1.76 / 1M · 12% below list

The tier most solo developers land on: one balance that covers agent sessions, test runs and the scripts around them, with nothing auto-renewing.

Get a key for 200+ models
No subscription · balance does not expire
Lowest unit price

Top up $500

$550credited
10% bonus · Sonnet 5.5 input ≈ $1.64 / 1M · 18% below list

For a team that already knows its volume. The bonus is the only thing that moves the per-million number, not the size of the top-up.

Same key · same 200+ models

Every per-million figure above starts from Sonnet 5.5 at $2.00 list, takes the 10% model discount, then applies the top-up bonus. A larger top-up does not unlock a cheaper model — it only raises the bonus rate.

How to move a Claude Code workflow to OpenCode in 4 steps

Nothing here is exotic: one instruction file, one permission file, one provider block, and a week of running both. The first three fit in an afternoon.

01

Rename the instruction file, keep the words

Copy CLAUDE.md to AGENTS.md at the repo root. OpenCode reads that file on every turn, so the build commands, style rules and "never touch migrations" notes carry over unchanged. Leave the original in place while both clients run.

02

Port the permission rules before the first write

Claude Code's allow and deny lists become per-tool rules in opencode.json. Copy them by tool name, not by guess: a rule that silently allows a shell command is the one thing worth checking twice in a diff.

03

Paste the provider block and the key

One block names the endpoint and the models you want listed; the key goes in an environment variable. That single key covers Sonnet 5.5 and every other model in the catalogue, so a mid-task switch is a config line, not a new account.

04

Run both for one week, then delete one

Pick three tasks you already know the answer to — a rename, a failing test, a log read — and run each in both clients. The transcript tells you which harness to keep faster than any benchmark table.

The step people skip is the last one. A migration that never gets compared never gets finished, and two half-configured clients cost more attention than one.

Feature matrix: permissions, memory and MCP

Both clients read a project instruction file, speak MCP and gate shell writes behind an approval. The differences sit in defaults and scope, not in the ceiling.

Capability by client
CapabilityClaude CodeOpenCode
Project memoryCLAUDE.md at the root, plus nested files per directory.AGENTS.md at the root, read before the first tool call.
Approval gatePer-tool allow and deny lists, with a prompt for anything unlisted.Per-tool rules, plus a plan-only mode that blocks writes entirely.
MCP serversDeclared in project settings, scoped to that project.Declared in the client config, shared across sessions.
SubagentsAgent teams that split a task and report back.Custom agents declared in config, each with its own model.
HooksShell hooks before and after tool calls.Plugin hooks on the same events, written in JS.
Local modelsNot available; the client is bound to Anthropic.Any Ollama or compatible endpoint you can reach.
Model per taskFixed by tier for the whole session.Set per agent, so a cheap model can review a costly one.

The row that changes budgets is the last one. Setting a different model per agent is the only lever that cuts cost without cutting the number of runs.

What you give up either way

Neither path runs itself. The honest version of the comparison is a list of chores, not a list of features.

Maintenance by choice
VantageWhat it costs youWho ends up paying it
Claude Code's defaultsYou inherit the model choice and the usage window. When the window closes, the queue waits.Whoever is on call that afternoon.
OpenCode's flexibilityYou own the provider block, the fallback list and the model per agent. A wrong model name is your bug.The person who wrote the config, usually for weeks.
Two clients in one repoTwo instruction files to keep in sync, and one rule that will drift first.The reviewer who notices the diff.
An aggregator keyOne credential now covers more spend, so rotation matters more than it did before.The team's security owner, at rotation time.

Pick the chore you are willing to own. A seat buys someone else's maintenance; a provider block buys you the choice of model.

What happens when a model is rate-limited

A 429 is not an outage, but it stops a run. What each setup does next decides whether an afternoon survives a busy provider.

Claude Code retries, then waits for the window to reset. The session survives, the queue does not move, and the fix is either a different tier or a smaller task. OpenCode can fall through a list you wrote: model A, then B, then a local one, in the order you declared. GPTProto keeps the same key valid across the pool and moves the call with auto-failover when a provider drops, so a fallback does not need a second credential.

Behaviour on a 429
SetupWhat happens next
Claude CodeRetries the call, then holds until the window resets. The session stays open and the transcript stays intact.
OpenCode, one providerWalks the fallback list in your config, or stops cleanly if the list is empty and says which model failed.
OpenCode on GPTProtoThe same key reaches the rest of the pool, and auto-failover routes the call when a provider drops mid-run.

Uptime is high, but plan for the queue anyway: keep two models in the fallback list and one task small enough to finish inside a single window.

Keys, permissions and where your code goes

An API key is a billable credential. Treat it like a password, keep it out of the repo, and know which client sends what where before the first push.

Credentials and scope
ItemWhere it livesWhat it can do
API keyEnvironment variable on your machine, never committed.Billable on every call. Rotate on a schedule; revoke one without touching the account.
Rule fileAGENTS.md or CLAUDE.md at the repo root.Read by the agent only. It never leaves the working tree on its own.
MCP serverClient config, scoped per project.Runs locally with your user's permissions, so scope it to the project it serves.
Permission rulesClient config, reviewed in the diff.Decide which commands need a prompt, and which never run at all.

Two habits cover most of the risk: no key in a tracked file, and no allow rule for a command you would not run yourself.

What early users changed after switching

Three people moved a working setup rather than a demo. Each note names the role, the months in, and the arrangement the team ran before.

We kept Claude Code for the tasks that need the harness and moved bulk renames to a cheaper model behind the same key. The diff quality held, and the token bill was the part that moved.

Early user · backend lead · 7 months on GPTProto
Before: one Claude Code seat for a team of four

The migration was one afternoon. Copying the instruction file was trivial; copying the permission rules by tool name took longer, and that was the part worth doing slowly.

Early user · platform engineer · 5 months on GPTProto
Before: Claude Code with a hand-written settings file

What sold it was the fallback list. When a provider got busy the run continued on another model instead of stopping, and nobody had to go find a second key at 11pm.

Early user · staff engineer · 9 months on GPTProto
Before: two API accounts, reconciled by hand

One key across OpenCode, scripts and CI

The key that runs an agent session also runs a batch script and a nightly job. One credential, one invoice, one place to rotate when someone leaves.

Three consumers, one credentialopenai-compatible
# agent session
opencode                     # reads the provider block + GPTPROTO_KEY

# one-off batch job
curl -s "$GPTPROTO_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $GPTPROTO_KEY" -d @payload.json

# nightly CI step — same key, same base URL
python scripts/summarize.py  # client reads both from CI secrets
One invoiceagent, scripts and CI on the same balance
One rotationrevoke in one place, everything follows
One catalogue200+ models behind the same URL

This is the practical argument for an aggregator over a direct account per vendor: the credential count stays at one while the model count keeps growing.

Frequently Asked Questions

Five questions that decide whether the switch pays for itself, answered in the order they usually come up.

Is OpenCode cheaper than Claude Code?

Not by itself. OpenCode is an MIT-licensed client, so the software adds nothing to the bill; what you pay is the model behind it. Point it at GPTProto and the same Claude models bill 10–30% below official list, per call, with no seat attached.

Can one API key work in both OpenCode and Claude Code?

One key works in OpenCode and in any OpenAI-compatible client. Claude Code reads Anthropic's own API, so it keeps its own credential and its own billing. The key is what lets OpenCode reach 200+ models without a second account.

Do I need to register before I can call a model?

Yes. An account is required before any key is issued, and every call is billed to that account. There is no anonymous tier and no shared demo key, so the first step is always creating the account.

What happens if a model fails in the middle of a run?

Uptime is high, but a provider can still drop a call. GPTProto moves the request with auto-failover when that happens, and OpenCode walks the fallback list you declared, so a run continues on another model instead of stopping.

How does the top-up bonus change the per-million price?

The bonus rate, not the top-up size, sets the per-million price. $10 adds 1.5% and credits $10.15; $20 adds 2.5% and credits $20.50; $500 adds 10% and credits $550. On Sonnet 5.5 that puts input at about $1.77, $1.76 and $1.64 per million.

Run both agents on one key

Keep Claude Code where it earns its seat, and move the rest of the token spend to a key that bills 10–30% below list. One endpoint, 200+ models, paid per call.

Get a key for 200+ models Account required · paid per call · no subscription