The AI Stack Cost Report · August 2026 · Part 3: The Coding Stack. The meter moved again this month. This is StackSpend's monthly read on what the modern AI engineering stack actually costs. Also in this issue: the frontier briefing, the pricing map, and the image stack.
Use this when you're moving real engineering work into model-assisted development and want a current, practical answer to "which model, for which job, in which tool, on which billing model" — not just a single leaderboard number.
The fast answer: July rewrote the top and the bottom of the coding stack. Claude Opus 5 (July 24) now leads most coding evaluations at $5/$25 — landing within 0.5 points of Claude Fable 5's peak CursorBench score at roughly half the cost per task, which makes the $10/$50 tier hard to justify for ordinary work. GPT-5.6 Sol holds the terminal/agentic benchmarks and is the strongest counterweight. Underneath them, execution got much cheaper: GPT-5.6 Luna fell 80% to $0.20/$1.20, Claude Sonnet 5 is on introductory $2/$10 until August 31, and Grok 4.5 — trained jointly with Cursor — arrived at $2/$6. The system hasn't changed: plan with a big model, execute with a cheap one, review with an independent one. What changed is that every tier in that system got cheaper in the same month, and nobody's bill updates itself.
If you just want the raw scorecard and prices, start with AI coding models in 2026: strengths, weaknesses, and pricing and the agentic IDE comparison. This article is the layer above those: how to compose them into a working practice.
Quick answer
- Best overall coding quality: Claude Opus 5. Independent comparisons put it ahead on SWE-bench Verified (~97.0% vs GPT-5.6 Sol's ~96.2%) and well ahead on SWE-bench Pro, leading roughly 9 of 12 tracked coding and reasoning benchmarks — at $5/$25.
- Strongest counterweight: GPT-5.6 Sol ($5/$30), which leads Terminal-Bench 2.1 (~91.9% in ultra mode) and remains excellent on long agentic terminal work.
- Best value execution: Claude Sonnet 5 ($2/$10 through Aug 31), GPT-5.6 Luna ($0.20/$1.20 after its 80% cut), and open-weight coders (GLM-5.1, Qwen3 Coder, Kimi K3).
- Best new mid-tier: Grok 4.5 ($2/$6, Fast at $4/$18) — a MoE model trained jointly with Cursor on Cursor tokens, scoring 83.3% on Terminal-Bench 2.1.
- Best independent reviewer: still a different vendor than the one that wrote the code. GPT-5.6 Sol or Gemini 3.1 Pro reviewing Claude's output, or vice versa.
- Subscription vs API: interactive daily coding → a subscription (Claude Max, Cursor); programmatic agents, CI, and bursty automation → the API. Most serious setups run both. See Claude Code cost options and overage.
The coding-model leaderboard (August 2026)
Benchmarks move weekly and vary by harness — treat the ordering as directional, not decisive, and always validate on your own repo. The August 2026 shape:
| Model | Tier / role | Input–Output ($/1M) | Where it shines for code |
|---|---|---|---|
| Claude Opus 5 | Premium daily — new leader | $5 / $25 | Leads SWE-bench Verified and Pro; agentic long-horizon work; 5-level effort dial |
| Claude Fable 5 | Frontier | $10 / $50 | Still top-tier, but Opus 5 matches it on CursorBench at ~half the cost per task |
| GPT-5.6 Sol | Frontier reasoning | $5 / $30 | Leads Terminal-Bench 2.1; "ultra mode" spawns subagents for hard problems |
| GPT-5.6 Terra | Balanced | $2 / $12 | Cut 20% July 30; solid plan-execution at mid-tier price |
| Grok 4.5 | Mid-tier agentic | $2 / $6 | New July 8. Trained jointly with Cursor; 83.3% Terminal-Bench 2.1; Fast variant $4/$18 |
| Claude Sonnet 5 | Workhorse | $2 / $10* | Near-Opus-4.8 quality; fast, reliable implementation of a clear plan |
| GPT-5.6 Luna | Cheap execution | $0.20 / $1.20 | Cut 80% July 30. High-volume codegen where the plan is fixed |
| Claude Haiku 4.5 | Fast / sub-agent | $1 / $5 | File navigation, high-volume subtasks, cheap agent fan-out |
| Gemini 3.1 Pro | Reasoning / review | $2 / $12 | Abstract reasoning, large-context repo comprehension, cross-vendor review |
| GLM-5.1 / Qwen3 Coder / Kimi K3 | Open-weight coders | ~$0.09–$3 input | Cheap agentic execution; self-hostable; licence varies by model |
*Claude Sonnet 5's $2/$10 is introductory pricing through August 31, 2026; it becomes $3/$15 on September 1.
The takeaway has sharpened since July. It isn't just that the price spread between "best" and "good enough" is now more than 25x — it's that the best got cheaper. A team that standardised on Fable 5 at $10/$50 for agentic coding in June is, as of July 24, paying double for a result Opus 5 reaches at half the cost per task. That is a routing decision worth making on purpose.
The new cost lever: effort settings
Claude Opus 5 ships a five-level effort dial (low / medium / high / xhigh / max). This is genuinely new for cost control, and it cuts both ways:
- The published "within 0.5% of Fable 5" CursorBench result is at max effort — the most expensive setting.
- The same model at low effort is a different cost profile entirely, on the same rate card.
Which means your per-request cost is now partly a configuration choice, not just a model choice. If an agent harness defaults to a high effort level across every subtask, you are paying frontier prices for file navigation. Audit what your tooling actually sets.
Use different models for different jobs
The single biggest change in how good engineers work with AI in 2026 is role-based model routing: assign each phase of the work to the model that fits it. A large model reasoning over an entire repo is wasteful for renaming a variable; a cheap model is dangerous for designing a migration.
| Phase | What you need | Good picks (August 2026) | Why |
|---|---|---|---|
| Plan / architect | Deepest reasoning, whole-system context | Opus 5, GPT-5.6 Sol, Fable 5, Gemini 3.1 Pro | Planning errors are the most expensive; spend the tokens here |
| Execute / implement | Fast, cheap, follows a clear spec | Sonnet 5, GPT-5.6 Terra, Grok 4.5, GLM-5.1 | Once the plan is fixed, throughput and cost matter more than raw IQ |
| High-volume subtasks | Cheap, fast, parallelizable | GPT-5.6 Luna, Haiku 4.5, Gemini 3.5 Flash-Lite | File navigation, boilerplate, mechanical edits, sub-agent fan-out |
| Review / verify | Independent judgement, ideally a different vendor | GPT-5.6 Sol or Gemini 3.1 Pro (to review Claude), or vice versa | A reviewer that shares the author's training shares its blind spots |
The planning → execution → review split remains the core pattern. Give the expensive model the hard "what and why," hand a precise plan to a cheap model for the "how," then verify with a third.
Two things make this pay off more in August than it did in July. First, Luna at $0.20/$1.20 makes the execution tier nearly free relative to planning — the economic argument for routing has never been stronger. Second, make the reviewer independent: the strongest results come from a builder → blind validator chain where the validator doesn't see the builder's reasoning and, ideally, is a different model family. Cross-vendor review removes shared failure modes that same-model review can't catch.
Prompting and skills: adversarial review
Model choice sets the ceiling; prompting and skills determine whether you reach it.
Spec first, then code. Spec-driven development (SDD) is the antidote to "vibe coding." Instead of a one-line prompt, write a short, versioned spec — outcomes, scope boundaries, constraints, prior decisions, task breakdown, and verification criteria — and let the agent produce code, tests, and docs from it. SDD answers "is this the implementation we agreed to build?" while TDD answers "is this implementation correct?" You want both.
Adversarial review as a skill. The highest-leverage prompting pattern of 2026 is adversarial review: one model writes, one or several tear it apart, and the author fixes and resubmits until approved. Packaged as a reusable skill, it spawns independent reviewers — an Advocate, a Skeptic, an Architect, or a panel of lenses (correctness, security, performance) — that surface bugs and structural smells a single pass misses. Run it on the plan before any code is written, and again on the diff.
Plan mode before execution. Force the model to lay out its approach before it touches files. You review the plan, correct it, then let it execute. This single habit prevents most large, wrong diffs.
Setting up your environment
The environment around the model matters as much as the model:
- Project instructions (
AGENTS.md/CLAUDE.md). A checked-in file telling every agent your conventions, architecture, guardrails, and sequencing. Highest-ROI file in the repo — keep it current. - Skills. Reusable capability packages that teach the agent a repeatable procedure. Install once, invoke everywhere.
- Hooks = deterministic guardrails. A SessionStart hook that loads context before you type; a pre-commit hook that blocks a bad commit. Guardrails you enforce beat guardrails you hope the model follows.
- MCP for tools and data. The Model Context Protocol connects agents to your databases, issue trackers, and internal tools through a typed registry.
- Context engineering. The dominant failure mode is context explosion — quality degrades as the window fills. Treat context as a budget: curate, compact, and lean on retrieval and sub-agents rather than dumping the repo in. Note that 1M-token context windows are now standard across Opus 5, Fable 5, GPT-5.6, and Kimi K3 — the constraint is quality and cost, not capacity.
- Effort and model defaults. New for August: check what effort level and model your harness defaults to per subtask. A default of "max effort, flagship model" for every tool call is the most expensive misconfiguration available in 2026.
- Tests and impact analysis are non-negotiable. Agents frequently break previously-passing tests. More automation demands more rigor, not less.
Codex vs Claude Code vs Cursor: choosing where the AI lives
These three define the mainstream, and they're genuinely different products:
| Tool | Shape | Best for | Watch-outs |
|---|---|---|---|
| Claude Code | Terminal-native agentic workhorse | Deep, multi-file work and the full PR lifecycle from the CLI; skills, hooks, sub-agents | Maximum autonomy needs tight test loops; overage settings deserve a look |
| OpenAI Codex | Cloud-first async agent | Assigning batches of tasks and reviewing outputs without running anything locally | Less "in your editor"; you review artifacts rather than drive live |
| Cursor | AI-native IDE (VS Code lineage) | Daily driver: multi-file Composer, strong autocomplete, visual diffs, easy model-switching | Usage-based costs climb; now also fronting its own co-trained model in Grok 4.5 |
What changed in July: Cursor stopped being purely a routing layer over other vendors' models. Grok 4.5 was trained jointly by Cursor and xAI on Cursor's own tokens and shipped on July 8 across desktop, web, iOS, CLI, and SDK, with included usage temporarily doubled on individual and Teams plans. A tool vendor co-training a frontier-adjacent coding model changes the calculus of "which tool" — the model and the harness are no longer independent choices.
High-performing teams still rarely standardise on one tool. Multi-tool use is the norm among senior engineers: Cursor for live editing, Claude Code for heavy autonomous work, Codex for background batches. For a deeper breakdown see the agentic IDE comparison.
Subscriptions vs API: the economics
This is the question that decides your bill.
| Subscriptions | API (pay-per-token) | |
|---|---|---|
| Examples | Claude Pro $20, Max 5x $100, Max 20x $200/mo; ChatGPT Pro $200/mo; Cursor Pro $20 → Ultra $200/mo | Per-1M-token rates on OpenAI, Anthropic, Google, xAI, open-model hosts |
| Best for | Interactive, daily, human-in-the-loop coding in a tool | Programmatic agents, CI/CD, batch jobs, your own harness |
| Cost behavior | Flat and predictable; bundles the tool + heavy usage | Scales with tokens; cheap when intermittent, dangerous when unattended |
| Risk | Paying for a seat you underuse | A looping agent or a big backfill running up a surprise invoice |
The rule of thumb holds: if a human is driving an interactive tool many times a day, a subscription usually wins on cost and predictability. If code is calling the model — agents in CI, batch refactors, an app feature — the API is usually cheaper and often the only option, but it needs a spend guardrail because there's no monthly ceiling.
The July price cuts shifted the crossover point. With Luna at $0.20/$1.20 and Terra at $2/$12, more automation is now affordable on the API than was true a month ago — which means more teams will quietly cross from "occasional API use" into "material API line item" without re-running the maths. See Claude Code cost options and overage in August 2026 and Cursor vs Claude Code vs GitHub Copilot cost.
Migrating more of your work into model-assisted development
- Rigor goes up, not down. Autonomy without tests, specs, and review produces plausible code that drifts from intent.
- Start with bounded workflows. Pick one well-scoped task type and run Plan → Execute → Review end-to-end before generalizing.
- Route by role, verify independently. Big model to plan, cheap model to execute, different-vendor model to review.
- Re-check your routing monthly. This is new advice, and July is why: the leader changed, the premium tier got cheaper, and the volume tier fell 80%. A routing table set in June is now demonstrably wrong on price.
- Invest in the harness, not just the model. Your
AGENTS.md, skills, hooks, and MCP tools compound. - Watch the spend, because it hides.
The part everyone underestimates: cost visibility
Model-assisted development scatters spend in a way traditional tooling never did. A single engineer might burn a Claude Max subscription, a Cursor seat, and API tokens from an agent running in CI — three billing models, three invoices, three units, no combined picture. Add role-based routing across five models, an effort dial that multiplies per-request cost, and open-model hosts, and "what did AI development cost us this week, by team and by tool?" becomes genuinely hard to answer.
The failure modes are silent: a looping agent, a harness defaulting to max effort, a routing change to a $50-output model, a batch refactor left running overnight. None of them show up until the invoice does.
StackSpend gives you one view across it all — subscriptions and API, by provider, model, user, and team — with daily anomaly detection and pace-to-forecast alerts, plus model recommendations that flag when a cheaper model would do the same job. Start with LLM cost monitoring, Claude Code cost analysis, Cursor cost monitoring, or the guide on monitoring AI developer spend by user, team, and provider.
FAQ
What is the best coding model in August 2026?
Claude Opus 5, released July 24, 2026, is the strongest single pick for most engineering work — independent comparisons put it ahead on SWE-bench Verified (~97.0%) and SWE-bench Pro, leading around 9 of 12 tracked coding and reasoning benchmarks, at $5/$25 per 1M tokens. GPT-5.6 Sol ($5/$30) leads Terminal-Bench 2.1 and is the strongest alternative for long agentic terminal work. Benchmark ordering varies by harness, so validate on your own repository before standardising.
Is Claude Fable 5 still worth $10/$50 for coding?
For most work, no. Anthropic reports Claude Opus 5 landing within 0.5 points of Fable 5's peak CursorBench 3.2 score at roughly half the cost per task, and surpassing it on OSWorld 2.0 at just over a third of the cost. Fable 5 remains the recommendation for the most advanced long-horizon autonomous work, and Mythos 5 is still ahead on cybersecurity and exploit-development tasks. Everything else is a downgrade-without-regret candidate.
What is Grok 4.5 and is it good for coding?
Grok 4.5 is a mixture-of-experts model released July 8, 2026 by xAI and Cursor, trained jointly on Cursor tokens and aimed squarely at software engineering. It scores 83.3% on Terminal-Bench 2.1 and is priced at $2 input / $6 output per 1M tokens, with a Fast variant at $4/$18 and a 500K context window. It sits in the mid-tier: cheaper than the frontier, stronger than most models at its price.
Should I use one model or several for coding?
Several. Role-based routing — a big reasoning model for planning, a fast cheap model for execution, and an independent model for review — produces better code at lower cost than forcing one model to do everything. In August 2026 the price spread between tiers is more than 25x (GPT-5.6 Luna at $0.20 input vs Claude Fable 5 at $10), so matching model to task directly controls both quality and spend.
What does an "effort setting" do to my costs?
Claude Opus 5 exposes five effort levels (low, medium, high, xhigh, max) that trade reasoning depth against token consumption. The same prompt at max effort can cost several times more than at low effort on an identical rate card. Anthropic's headline benchmark results are at max effort. If your agent harness sets a high effort level for every subtask — including file navigation and boilerplate — you are paying frontier prices for trivial work. Check the default your tooling uses.
Is a subscription or the API cheaper for AI coding?
For interactive, human-driven coding in a tool, a subscription (Claude Max, Cursor) is usually cheaper and more predictable. For programmatic use — agents in CI, batch jobs, app features — the API is usually cheaper but has no monthly ceiling, so it needs a spend guardrail. The July 30 price cuts moved the crossover point in the API's favour for automation. Most teams run both and track them together — see Claude Code cost options and overage.
How do I keep AI coding costs under control?
Route by role (don't run a flagship for trivial edits), audit the effort levels and model defaults in your harness, prefer subscriptions for interactive use and the API for automation, set anomaly alerts on API keys, and get one view across subscriptions, seats, and tokens by user and team. See how to monitor AI developer spend.
About The AI Stack Cost Report
The AI Stack Cost Report is StackSpend's monthly briefing on what the modern AI engineering stack costs — frontier and open-weight LLMs, AI coding tools, image generation, and the hosting and infrastructure they run on. Each issue is compiled from primary pricing pages and release reporting, with source-check dates listed at the top of every article. The August 2026 issue has four parts: the frontier briefing, the pricing map, the coding stack, and the image stack.
Between issues, the LLM API Pricing Index re-syncs published per-1M-token rates daily and the model changelog logs every release and deprecation by month.
A monthly snapshot tells you what the market charges; it can't tell you what your stack spent yesterday. StackSpend does — per-provider AI spend, anomaly alerts the day a spike happens, and a daily report in Slack. Setup is read-only, takes about five minutes, and starts with a free 14-day trial. Why we publish it: the meter came back.
Related reading
- The Latest in LLMs, August 2026
- LLM Model Pricing in August 2026: Every Major API and Open Model
- The Best Coding Models in July 2026 — the previous issue
- AI Coding Models in 2026: Strengths, Weaknesses, and Pricing
- Cursor vs Windsurf vs Claude Code vs Antigravity: Which Agentic IDE Wins in 2026?
- Claude Code Cost Options and Overage (August 2026)
- LLM API Pricing Index — live per-1M-token rates and coding-benchmark scores
References
- Anthropic — Introducing Claude Opus 5
- Anthropic — Pricing (Claude Platform docs)
- Anthropic — Claude Code
- OpenAI — Codex
- CNBC — OpenAI cuts prices for two of its GPT-5.6 AI models
- Cursor — Grok
- OpenRouter — Grok 4.5 pricing and benchmarks
- Vals AI — SWE-bench Verified leaderboard
- Model Context Protocol
- Martin Fowler — Context Engineering for Coding Agents
- Martin Fowler — Harness Engineering for Coding Agent Users
- Claude Pricing (Pro / Max)
- ThursdAI — July 2026 AI releases