Claude Code vs Gemini 3.8 Flash: Terminal-Bench Truth at 51.8
Settle Claude Code versus Gemini 3.8 Flash with Terminal-Bench version truth, DeepSWE near-tie math and a task-shape routing rule for production.
Deepak Bagada
Founder & Editor-in-Chief
- Terminal-Bench 4.0 truth is 51.8 Opus against 19.1 Gemini, not the viral 89.4 tie
- DeepSWE near-tie 74.0 to 73.7 makes Gemini the value pick for scoped engineering
- Task-shape routing cuts weekly spend 34 percent while holding merge rates
Claude Code vs Gemini 3.8 Flash: Terminal-Bench Truth at 51.8
Viral charts claim Gemini 3.8 Flash codes at 89.4 percent, matching Claude Opus 5 at 89.1. The fine print says Terminal-Bench 2.1, the older and far easier edition. On the current Terminal-Bench 4.0, Google's own runs put Gemini 3.8 Flash at 19.1 percent against 51.8 for Opus 5. Same models, different test, opposite headline. I run Claude Code daily at SaaSNext and tested Gemini 3.8 Flash across our own repos, and the gap is real for hard agentic work.
The honest summary:
- Well-trodden coding tasks: Gemini 3.8 Flash leads Terminal-Bench 2.1 at 89.4 percent, essentially tied with Opus 5 at 89.1.
- Hard agentic coding: Opus 5 leads Terminal-Bench 4.0 at 51.8 percent against 19.1 for Gemini 3.8 Flash in Google's runs.
- Long-horizon engineering: DeepSWE v1.1 is nearly tied, 74.0 Opus 5 against 73.7 Gemini 3.8 Flash, at roughly one-sixth the per-token price.
I put both stacks through the same 15 tasks last week: five bug fixes, five refactors, five greenfield endpoints across TypeScript and Python repos. Claude Code with Opus finished 12 cleanly. Gemini 3.8 Flash finished 9, with two needing major rework on multi-file refactors. Per finished task, Gemini still cost less. Per hour of my review time, Claude Code won.
The version gap that explains every viral chart
Terminal-Bench 2.1 rewards models that solve contained, well-specified tasks. Terminal-Bench 4.0 punishes anything that cannot plan across files, recover from failures, and use tools iteratively over long horizons. Gemini 3.8 Flash works harder by design, with extra reasoning steps and iterative tool calls, but diligence without judgment still stalls on the hardest tasks.
Full comparison from Google's September 2 runs plus Anthropic's published figures:
| Benchmark | Gemini 3.8 Flash | Claude Opus 5 | Claude Sonnet 5 |
|---|---|---|---|
| Terminal-Bench 2.1 | 89.4 percent | 89.1 percent | 80.4 percent |
| Terminal-Bench 4.0 | 19.1 percent | 51.8 percent | 12.4 percent |
| DeepSWE v1.1 | 73.7 percent | 74.0 percent | 53.8 percent |
| OSWorld 2.0 computer use | 59.0 percent | 75.4 percent | 42.6 percent |
| GDPval knowledge work | 1545 | 1824 | 1584 |
| CharXiv chart reasoning | 86.2 percent | 83.7 percent | 70.1 percent |
| HLE-Verified reasoning | 54.9 percent | 54.4 percent | 31.0 percent |
Anthropic's own runs put Opus 5 at 52.3 and Fable 5.1 at 55.8 on Terminal-Bench 4.0 with different evaluator settings, so cross-vendor decimals are not directly comparable. Direction is consistent though: Claude models lead hard agentic coding by a wide margin, Gemini leads charts, finance, and legal agent tasks at a fraction of the price.
For the fleet setup that produced my Claude Code numbers, see Claude Code Projects at 200 threads and the instruction discipline in my AGENTS.md gateway at 38ms.
Production war story 1: the refactor that split the verdict
Task was boring on purpose: split a 1,400-line billing module into four files with tests green throughout. Claude Code with Opus planned the split, moved one seam at a time, ran tests after each move, and opened a clean PR in 38 minutes. Two review comments, both style. Merged same day.
Gemini 3.8 Flash at high effort produced a confident four-file split in 22 minutes that failed 11 tests. Root cause was a shared transaction helper it duplicated instead of importing, plus a webhook signature check it dropped as dead code. The fix took me 90 minutes, longer than writing the split by hand. On contained bug fixes the same week, Gemini went 5 for 5 with an average cost of $0.31 per task against $1.90 for Opus. Horses for courses, with real money on both sides.
I now route by task shape. Single-file fixes and well-specified endpoints default to Gemini at medium effort. Multi-file refactors with shared state default to Claude Code with Opus. The router is three lines in our tracker template, and it cut our weekly model spend 34 percent while holding merge rates steady.
Effort levels and the thinking-token bill
Gemini reasons at low, medium, or high, defaulting to medium. Thinking tokens bill at output rates, $3.75 per million promo, so real cost runs well above visible output. Independent runs put task cost at $0.24 low, $0.41 medium, $0.58 high, with intelligence scores of 52, 57, and 59. Medium to high buys a small gain for a 41 percent cost jump. I run medium for routine work and high only when one extra success is worth more than the bill.
Claude Code economics run hotter per token: Opus at $5 input and $25 output, Fable 5.1 at $10 and $50, Sonnet cheaper in between. Prompt caching and the 1M context window on Sonnet 5, Opus 5, and Fable 5.1 soften the blow across long sessions. My measured per-task costs: Opus $1.60 to $2.40 on refactors, Sonnet $0.70 to $1.10 on mixed work, Gemini medium $0.35 to $0.55 on the same mixed set.
Full token economics with formulas live in my Price per Task vs Price per Token breakdown. The rule that survives every quarter: price per finished, reviewed, merged task is the only price that matters.
Production war story 2: the computer-use demo that humbled Flash
A client asked for a side-by-side on OSWorld-style desktop tasks: open the app, read a table, fill a form, verify the result. Claude Code with computer-use scaffolding scored 8 of 10 in my harness. Gemini 3.8 Flash scored 5 of 10, failing twice on popup timing and once on a file dialog it could not dismiss. Vendor numbers say 75.4 against 59.0, and my small sample agreed.
I had pitched Gemini as sufficient for the whole automation the week before, based on the 89.4 chart. The demo corrected me in front of the client. I revised the proposal that night: Gemini for data extraction and form drafting, Claude for the final mile of clicking and verification. The hybrid won the deal. The lesson cost me some pride and saved the project.
Speed favors Gemini everywhere. Independent measures put output near 299 tokens per second, rank 3 of 196 models, against Claude sessions that stream slower but waste fewer steps on hard tasks. Time to first token regressed slightly on 3.8 to 13.21 seconds from 12.01, a 10 percent slower start that matters for interactive use and not at all for async agents.
Routing rule for coding work today
def pick_coding_model(task) -> str:
if task.get("files_touched", 1) > 3 or task.get("shared_state"):
return "claude-opus-5" # hard refactors, cross-file planning
if task.get("needs_computer_use"):
return "claude-opus-5" # 75.4 vs 59.0 on OSWorld 2.0
if task.get("well_specified") and task.get("single_file"):
return "gemini-3.8-flash-medium" # 89.4 class tasks at low cost
return "claude-sonnet-5" # default balance of cost and judgment
Default matters less than review discipline. Every agent PR in my fleet needs green CI plus one human reviewer, regardless of model. The merge-conflict model from Projects means parallel agents can produce parallel mistakes. Branch protections plus required checks caught 4 bad merges last month that green-looking diffs almost slipped through.
For the finance and legal agent side where Gemini leads outright, my Qwen vs Gemini audio bench covers the analyst workloads in the same style.
When NOT to use either default
Skip Gemini high effort on trivial tasks where low effort already passes. The intelligence jump from 57 to 59 rarely justifies the cost jump. Skip Opus on bulk mechanical edits where Sonnet passes at half the price. And skip both without pinned evals: model behavior drifts monthly, and September moved fast enough that prompts tuned for 3.7 Flash underperform on 3.8 without retuning effort levels.
Also distrust single-version charts in vendor posts. Demand Terminal-Bench 4.0 numbers for agentic claims, OSWorld 2.0 for computer use, and DeepSWE for long-horizon work. A post that shows only 2.1 is selling, not informing.
Verification checklist for your own shootout
- Fix 15 tasks across fixes, refactors, and greenfield in your own repos.
- Run identical prompts, identical tool budgets, and identical review bars.
- Score merged without rework, merged with rework, and rejected separately.
- Price per merged task including thinking tokens and reviewer minutes.
- Re-run after each model or CLI upgrade. Behavior moves quarterly.
My verdict: Claude Code with Opus for hard multi-file agency, Gemini 3.8 Flash for well-specified volume at medium effort. Anyone showing only the 89.4 chart is either selling something or has never shipped a refactor.
By Deepak Bagada, Founder and Editor-in-Chief at Daily AI World. I run both fleets at SaaSNext and score every model on merged PRs, not demos. More at deepakbagada.in.
Enjoyed this breakdown? Get our morning dispatch in your inbox.
Curated breakdowns of frontier model architectures and compute markets delivered every weekday. Zero fluff.
Deepak Bagada
Founder & Editor-in-Chief
Deepak Bagada is the founder and Editor-in-Chief of Daily AI World and CEO of SaaSNext. He covers enterprise AI architecture, high-concurrency agent workflows, Model Context Protocol tooling, and frontier AI systems engineering.
Price per Task vs Price per Token: Coding Agents at 58x Spread
Next Story →Kafka, Temporal, LangGraph: Fraud Agents With Zero Lost State
Related Intelligence Analysis
DeepSeek-V4-Flash-0731 vs Claude Opus 5 vs GPT-5.6 Sol: Benchmark & Financial ROI Audit
A rigorous technical analysis of 2026's top foundation models, focusing on sub-100ms latency, token economics, and multi-agent orchestration for enterprise AI pipelines.
MCP Is Now the Baseline: Why Model Context Protocol Became the Default Standard for Production AI
From open-source proposal to the donated default transport in a year: how Model Context Protocol, now stewarded by the Linux Foundation's Agentic AI, became the baseline fabric for production AI.
Google ADK in 2026: Enterprise Multi-Agent Systems with Native A2A Protocol & Multimodal Agents
Google ADK runs on GCP, speaks A2A natively, and sees multimodal through Gemini. A deep-dive for engineers building enterprise multi-agent fleets with Gemini in 2026.