OpenCode vs Claude Code on the Same Tasks: Same Passes, Different Paths
August 11, 2026
OpenCode vs Claude is usually sold as a feature matrix or a loyalty test. Run the same four auto-graded tasks under each product config and the loyalty test falls apart. Both hit 4/4. The diffs mostly look the same. The story moves to tool counts, wall time, and how each harness reports tokens. Pass rate matched. Paths did not.
Method is boring on purpose#

This part is boring on purpose. Without the cut, the table is fan fiction.
Four tasks. Identical prompts. Hidden graders the agent never saw.
- Fix an inclusive
sumRangeoff-by-one - Add a
--shoutflag to a tiny CLI - Repair a broken import and call across two files
- Make
parsePairspass a fixed test file without editing the tests
Each workspace was its own git root under /tmp so a parent monorepo instruction file was not the silent prompt. Graders ran only after the agent exited. Pass meant the grader script exited zero, not that a human loved the style.
Claude Code 2.1.220 ran with Sonnet on first-party Anthropic auth, unattended print mode, and permission bypass so the loop could finish without a human clicking yes. OpenCode 1.18.3 ran with openai/gpt-5.4 over OpenAI OAuth, --pure, and auto-approve. That is a product lane, not a same-weight lab A/B.
Same-Claude-weights through OpenCode was the planned fair fight. It did not boot here. Claude Pro and Max OAuth is not a free drop-in for third-party harnesses, and the Antigravity Claude path wanted a Google Generative AI key that was not set. OpenCode's provider docs make that product landscape plain. Claude Code's own overview stays first-party.
Note. OpenCode ran --pure. Claude Code still had the user's normal setting surface available. This is how people actually run agents, not a sandboxed twin study.n equals 1. No re-seed. No second machine. Public agent leaderboards exist if you want a maintained suite. This post is a small private set with a transparent cut.
Charts below pull numbers only from that graded-task receipt (method and results on this page after publish). They are not third-party telemetry from OpenCode marketing pages.
If that method sounds strict, good. Loose method is how "best agent 2026" posts get written without a single shared task.
Task prompts lived in the runner, not in a chat you can rewrite mid-flight. The agent saw source files and a short instruction. It did not see the grade script. After exit, the runner copied the grader in and executed it with Bun. That separation is the whole point of "auto-graded." If the agent can edit the tests, you are not measuring the task. You are measuring whether it can cheat politely.
Pass rate matched on a soft ceiling#

Both agents passed every grader. Claude Code four of four. OpenCode four of four.
That is not a quality crown. The set is soft on purpose. Small files. Obvious bugs. No multi-package refactor. No flaky integration environment. A soft ceiling makes pass rate a weak separator. If you came for which agent is smarter, leave with a refund on that question.
Where the code landed, the work looked familiar. The sum fix was the same inclusive loop. The multifile repair was the same corrected import and clamp call. The shout flag was the same shape. The parse fix took two different valid routes and still went green. Same passes here means the graders agreed, not that a human review would rank style the same.
Scoring only green checkmarks trains you to switch tools forever and never learn which path is expensive. The ceiling was designed so that failure would mean something if it happened. Success means almost nothing about hard work.
Repo-scale refactors, flaky browsers, and multi-hour agent loops are outside this set. A perfect score on homework is still homework.
Tool counts diverged the other way from the internet story#

Total tool calls across the four tasks landed at Claude Code 15 and OpenCode 22. Wall clock landed at 77.6s versus 97.5s. OpenCode used 1.47× the tools and 1.26× the time on this product lane.
Per-task tool calls and wall time
| Task | Claude tools | OpenCode tools | Claude wall | OpenCode wall |
|---|---|---|---|---|
| Fix sumRange | 4 | 6 | 18.2s | 22.3s |
| Add shout flag | 3 | 5 | 17.2s | 23.3s |
| Multifile import | 4 | 6 | 22.2s | 28.1s |
| Pass parse tests | 4 | 5 | 20.0s | 23.8s |
| Total | 15 | 22 | 77.6s | 97.5s |
A documented same-model story is that Claude Code explores hard, burning more tool calls for the same diff when the weights are fixed. See the nqawhc harness-efficiency writeup (DeepSeek V4 Flash across harnesses).
That is a different experiment. Community writeups that pin one model and swap harnesses are measuring scaffolding. This run swapped both product and model, so the higher OpenCode tool count is not a refutation of those same-model benches. It is a warning label. Do not paste a tool-call meme onto a product-lane table.
Tool events are also not a universal unit. Each harness logs its own tool stream. Treat the numbers as path telemetry under that product, not as SI units of intelligence. A read, a patch, and a shell call can be one "tool" or three depending on the logger.
Still, path length is not free. Extra tools mean extra round trips, extra context growth, and extra chances to wander. On this set the wander still ended in green. On a messier set the same habit may not.
Token shape is the loud number with an accounting asterisk#

Reported input tokens summed across tasks landed near 931 thousand for Claude Code and near 62 thousand for OpenCode. Output tokens were close, roughly 2.7 thousand versus 2.2 thousand. The loud gap is input accounting, not an essay-length answer.
Read that 15× carefully. Claude Code's stream total folds input with cache creation and cache read fields. OpenCode's step totals use its own token fields. This post does not claim equalized billable tokens or prove the whole gap is tool schema weight. It claims what the harnesses reported while solving the same four tiny jobs.
Claude Code's stream still priced the run at about $1.00 total, roughly $0.25 per task, for work a junior would finish in a coffee sip. That is the practical sting. Small tasks do not get a small fixed tax if the harness keeps a fat context envelope. OpenCode OAuth events logged cost as zero here, so there is no dollar winner from this table. Anthropic's Claude Code cost notes are the product-side meter when the harness report is only a hint.
If the plan is cancel Max, BYOK Opus through OpenCode, keep the same life, the OAuth wall is the first product fact. The second is that path cost is not pass rate. The third is that you still need a meter you trust for your provider. This run will not bill your card for you.
Token compression skills and prompt diets live in a sibling problem space on this site. See token-compression skills do not survive measurement. The lesson that survives both is simple. Measure the harness you actually run, not the brochure for the model family.
What you cannot buy with this table#
Buy only the path metrics and the method limits. The rest is not for sale on this table.
- Same-model tools - not measured here
- Code-quality winner - not measured here
- Dollar winner - not measured here
- Your monorepo stack - not measured here
A task that would break the soft ceiling looks like a multi-package refactor with a failing integration test, not a ten-line off-by-one. If a post needs stronger claims, it needs a different method, different auth, and a harder grader.
When the comparison is worth running yourself#
Use this table to kill vibes, not to crown a vendor.
If you only care that agents can fix a ten-line bug, both configs in this lane cleared the bar. If you care about path tax on small chores, watch tools and reported tokens. Claude Code can look expensive even when the patch is one character. If you care about provider freedom, OpenCode is a different product class than Claude Code, and the OAuth wall is not a rounding error.
Worth re-running yourself when three conditions hold. The tasks look like your week. The auth paths match what you can actually pay for. The grader is harder than a soft ceiling. Below that, you are buying a blog post about someone else's homework.
Related measurement on this site cuts a different joint. Claude Code vs Codex limits, measured in the same unit is about rate-limit units, not OpenCode paths. Keep the siblings separate.
Public eval programs keep expanding, and some already score Claude Code, Codex, and OpenCode on real product tasks. Use a maintained suite when you want a board that survives one author's weekend. Use a private set when your week is not someone else's homework.
For CLI flags and print-mode behavior on the Claude side, the Claude Code CLI reference is the source of truth, not a comparison blog. For OpenCode install and provider wiring, start at the OpenCode docs.
FAQ
Is OpenCode just Claude Code with cheaper models?
No. OpenCode is model-agnostic; Claude Code is Anthropic-first. Claude Pro/Max OAuth is not a free drop-in for third-party harnesses, so a subscription seat is not the same product as BYOK through OpenCode.
asked on opencode.ai ↗Do more tool calls mean a worse agent?
Not by themselves. Tool counts are path metrics. On this set both agents still passed every grader. Path cost matters when tokens and wall time stack; pass rate alone does not decide the race.
asked on nqawhc.github.io ↗Should I cancel Max after reading this?
Not on pass rate. This set was easy and confounded by different models. Cancel or keep only after you run your real tasks with your real auth and a cost meter you trust.
asked on docs.anthropic.com ↗TL;DR. Same four graded tasks, both four of four. OpenCode used more tools and more wall time. Claude Code reported far more input tokens under its own accounting and about one dollar total. Product lane with different models. Not a same-weight lab A/B. Not a quality crown. Not a dollar crown.
