Picking models and harnesses for agentic AI

The model stopped being the whole product. In 2026 the thing that decides whether your agent finishes the job is the harness wrapped around it: the tools, the context discipline, the verification, the permissions.

August 5, 2026 Synthesized from 3 research passes Claude · Codex · Gemini

The one idea

agentic performance = model × harness × tools × context discipline × verification × permissions

Every term is a multiplier, so a zero anywhere zeroes the product. A frontier model with no verification loop produces confident, plausible, unfinished work. A perfect harness driving a model that cannot re‑plan after a surprise stalls on the first failed tool call.

This is why a mid‑tier model inside a strong harness routinely beats a flagship model pasted into a thin chat box, and why the interesting engineering moved from prompt writing to harness building.

What to point at the work

Prices are approximate API dollars per million tokens, input and output. Treat a 1M‑token window as a capacity specification, not a promise that the model still respects your constraint at token 700,000.

Closed frontier models, August 2026
ModelContext / outputCost in / outAgentic readReach for it when
Anthropic
Claude Fable 51M / 128K$10 / $50 Maximum horizon. Strongest at planning, recovery, and holding one coherent thread across days. Ruinous as a routine worker. Multi‑day autonomous work, gnarly migrations, reviewing another agent’s output.
Claude Opus 51M / 128K$5 / $25 Near‑Fable judgement at half the price. Good in messy repos and underspecified requirements. Hard engineering, architecture calls, incident analysis, final review.
Claude Sonnet 51M / 128K$2 / $10$3 / $15 from Sept 1 The best everyday Claude. Strong code editing, tool selection, and instruction adherence, especially inside Claude Code. Default interactive coding and most knowledge‑work agents. Escalate the few loops it cannot close.
Claude Haiku 4.5200K / 64K$1 / $5 Fast and cheap. Weak at re‑planning once something surprises it. Extraction, classification, test generation, narrow subagents whose output is checked by code.
OpenAI
GPT‑5.6 Sol1.05M / 128K$5 / $302× in, 1.5× out above 272K Strongest general agent model. Excellent across coding, computer use, research, and heterogeneous tool work. Hard general‑purpose agents and consequential coding, especially in Codex.
GPT‑5.6 Terra1.05M / 128K$2.50 / $152× in, 1.5× out above 272K The cost and performance sweet spot. Slightly less margin than Sol on ambiguous long‑horizon work. Most production agent calls and ordinary Codex sessions.
GPT‑5.6 Luna1.05M / 128K$1 / $6 Cheap and capable inside tight constraints. Needs schemas, short horizons, deterministic checks. Extraction, classification, routing, search workers.
Google
Gemini 3.6 Flash1M / 64K$1.50 / $7.50 Startling value. Native multimodality, search, file and URL handling, code execution. Less trustworthy than top deliberative models when the task is underspecified. Document and web‑heavy agents, large corpora, high‑throughput tool work.
Gemini 3.1 Pro1M / 65K$2 / $12 under 200K Better deliberate reasoning and custom‑tool handling than Flash. Still a preview surface. Google‑centric agents that need more planning than Flash gives.
Gemini 3.5 Flash‑Lite1M / 65K$0.30 / $2.50 Very cheap, very fast, no business owning a complex job on its own. Bulk parsing, routing, tagging, disposable verified workers.
Open weight, where the gap actually closed
FamilyContextLicenceAssessmentReach for it when
Qwen3.6262K typicalApache‑2.0 Best practical open default. The 27B dense and 35B‑A3B checkpoints are genuinely deployable and good at coding with interleaved tool use. Local coding, private enterprise agents, high‑throughput subagents.
DeepSeek V41M / 384KHosted API Extraordinary economics. Flash near $0.14 / $0.28, Pro near $0.435 / $0.87. Weigh provider trust and data residency separately from quality. Cost‑dominated pipelines and verified background workers.
Kimi K2.7‑Code256KModified MIT 1T total parameters, 32B active. Strong inside code‑agent loops, expensive to self‑host at full scale. Trims thinking tokens versus K2.6, which directly lowers long‑run cost. You want a powerful self‑hosted coding specialist and own the hardware.
GLM‑5.21MMIT One of the strongest open picks for long‑horizon agents. The 753B scale is operationally demanding and serving quality dominates. Large organisations with serious inference infrastructure.
Mistral Small 4 / Devstral 2VariesApache‑2.0Devstral 2 123B is modified MIT Attractive for European and on‑prem deployment. Devstral Small 2 at 24B is practical. Still behind the closed frontier at recovering from complex tool failures. Sovereign deployments, local IDE agents, moderate hardware.
Llama 4 Scout / MaverickNominal 10M (Scout)Custom Meta Broad ecosystem, no longer the performance default for autonomous coding. Do not assume reliable recall across that advertised 10M span. Existing Llama estates, sovereignty requirements, fine‑tuning ecosystems.

The harnesses

What actually runs the agent

This is where the last twelve months of progress went. Skills, hooks, MCP, subagents, sandboxes, resumable sessions and native verification now create bigger practical differences than the benchmark gaps between the models they wrap.

Terminal agents, the 2026 centre of gravity

Claude CodeCLI, IDE, desktop, web
WinsBest Claude pairing. Repository navigation, compaction, CLAUDE.md, skills, hooks, MCP, permissions, background agents, subagents.
Costs youClaude lock‑in and high consumption. Not a durable business‑workflow engine. Pick it for daily engineering.
OpenAI Codex CLICLI plus headless exec and CI
WinsStrong sandbox and approval model, AGENTS instructions, skills, plugins, MCP, subagents, local and cloud continuity.
Costs youFast‑moving product surface and an OpenAI‑centric worldview. Pick it for high‑autonomy coding and CI automation.
Antigravity CLICLI, replaced Gemini CLI
WinsGo‑based and quick, asynchronous background workflows, shares architecture with the Antigravity desktop app. Keeps skills, hooks, subagents, plugins.
Costs youNo day‑one feature parity with what it replaced. Pick it if you live in Google’s estate.
AmpCommercial multi‑model CLI
WinsCurated frontier models, modes, parallel subagents, persistent threads, cross‑model review. Remote execution keeps runs alive after you close the laptop.
Costs youProprietary routing and little direct control over model economics.
AiderOpen source, Git native
WinsTransparent diffs, repo maps, architect and editor separation, broad provider and local‑model support. Very low abstraction tax.
Costs youSparse sandbox, browser and managed background capability. Pick it for control and bring‑your‑own models.

Editor agents

CursorAI native IDE
WinsBest mainstream IDE experience, fast inline work, model choice, rules, isolated background agents.
Costs youLess transparent than Git‑native CLIs, and background agents can run internet‑enabled commands.
WindsurfIDE with Cascade
WinsIntegrated code, chat, checkpoints, terminal, linting, search, memories, rules, MCP.
Costs youMore product coupling, less explicit runtime control than a library or CLI stack.
Cline / Roo CodeVS Code agents, open
WinsBring your own model, visible approvals, browser, terminal, MCP, checkpoints. Roo’s custom modes are genuinely good.
Costs youNoisy and token hungry. Safety and quality track how carefully you configured them.

Libraries and runtimes, for when you are building the product

Claude Agent SDKPython and TypeScript library
WinsThe Claude Code loop embedded in your app. Read, Edit, Bash, search, permissions, hooks, subagents, sessions, skills, MCP.
Costs youClaude specific. Process hosting, durable state and sandbox infrastructure stay your problem.
OpenAI Agents SDKPython and TypeScript library
WinsSmall primitives: tools, handoffs, agents‑as‑tools, sessions, guardrails, tracing, MCP, sandboxing, human‑in‑the‑loop.
Costs youOpenAI first. It now has persistent sessions backed by SQLite, Redis, SQLAlchemy, MongoDB or Conversations, but that is conversation persistence, not Temporal‑style guarantees over external side effects.
LangGraphStateful agent runtime
WinsExplicit state graphs, persistence, checkpoints, replay, human interrupts, controlled branching. The most battle‑tested at scale.
Costs youState‑machine plumbing and graph spaghetti. Choose it when recovery and inspectability beat prototyping speed.
TemporalDurable execution platform
WinsRetries, timers, signals, resumability, compensation, auditability, workflows that live for months.
Costs youIt supplies durability, not intelligence. Deterministic workflow boundaries are real engineering cost.
OpenHandsOpen platform: SDK, CLI, GUI, cloud
WinsIsolated workspaces, Docker and Kubernetes deployment, model portability, repeatable coding tasks.
Costs youOperationally heavy, and quality swings hard with model and environment setup.
CrewAIRole‑based multi‑agent framework
WinsApproachable business automations, sequential and parallel crews, knowledge, memory, guardrails.
Costs youEncourages anthropomorphic agent proliferation. Fine for prototypes, weak for maximum control.
AutoGenMulti‑agent research framework
WinsFlexible conversational protocols, event‑driven core, distributed actors, Studio.
Costs youMany abstractions, migration churn, expensive agent chatter. For research, not for CRUD.
DevinHosted autonomous service
WinsTurnkey isolated VMs, delegated tickets, parallel sessions, playbooks, schedules, org analytics.
Costs youProprietary, pricey, hard to inspect. Good for scoped async backlog, bad for pair programming.

Cheap model in a strong harness, or expensive model in a thin one

The harness carries it

A good harness lifts a cheaper model by supplying precise repository maps and just‑in‑time context, constraining tools and validating arguments, keeping a compact decision ledger, running tests automatically and reading the failures, checkpointing before anything risky, and escalating only after repeated failure.

This is the whole reason Sonnet in Claude Code beats a flagship model in a chat window. The mechanics are handled, so the model only has to think.

The model carries it

The expensive model wins when the bottleneck is judgement rather than mechanics: ambiguous requirements, architecture, novel debugging, recovery after several consecutive failures, cross‑domain synthesis, adversarial review, or staying coherent for hours.

No amount of scaffolding substitutes for a model that can notice it was wrong and change plan.

The layering that actually works

  • A strong mid‑tier model does the work.
  • Cheap workers retrieve, classify, test and summarise.
  • A flagship model plans only the genuinely hard tasks and reviews the high‑risk output.
  • Deterministic software verifies everything it possibly can.

One caveat that costs people real money: do not put a weak model in the orchestrator seat just because the harness is good. Routing and recovery are precisely where cheap models make small mistakes that compound.

Patterns that survive production

Start with one agent and good tools

One agent, one explicit objective, a small tool set. A single coherent context beats multi‑agent communication overhead for most work. Add subagents only when the work is genuinely parallelizable: repository exploration, retrieval, test execution, security review, competing proposals. Three to eight workers is usually plenty. The orchestrator holds the acceptance criteria and merges. Workers return artifacts, evidence and conclusions, never whole transcripts.

Use a pipeline when you already know the process

If the stages are stable, ingest, extract, validate, enrich, approve, publish, then build a pipeline and put models inside individual stages. Do not ask an autonomous agent to rediscover your business process on every run. LangGraph when branching state and replay are central. Temporal when side effects, waiting, retries, compensation or month‑long execution matter. Running both is reasonable.

Engineer the context, do not just enlarge it

Keep a compact working record: goal and acceptance tests, non‑negotiable constraints, current plan and completed steps, decisions with their evidence, failed approaches, open risks. Retrieve big source material just in time. Compaction should preserve decisions and provenance, not conversational tone.

Store durable facts with source, timestamp, confidence, owner and expiry. A large vector store full of old agent utterances is not memory, it is uncurated contamination.

Verify with software before you verify with models

Tests, linters, type checkers, schema validation, policy checks and simulators wherever they exist. For high‑risk work add an independent reviewer that sees the original requirements and the final artifact, not the first agent’s reasoning trace. Use deterministic metrics for exact checks like tool correctness, and reserve model judges for things that genuinely need judgement. Calibrate any judge against traces you have labelled yourself.

Sandbox by default, gate the irreversible

Constrain filesystem and process access. Deny network and secrets unless asked. Short‑lived credentials, explicit allowlists. Require a human for production deploys, payments, customer communication, permission changes, data deletion and irreversible migrations. Human‑in‑the‑loop has shifted from approving every line to approving the plan.

Evaluate the pinned stack, not the model

Measure task success, pass@1, recovery rate, invalid tool calls, human interventions, latency, tokens, dollars and side effects, against a pinned combination of model, prompt, harness, tools and sandbox. A benchmark score for a raw model tells you very little about your system. Feed failing production traces back in as new eval cases so the suite grows from reality.

Economics

Where the money goes, and how to keep it

Agentic loops will happily bankrupt you. Caching, tiering and hard caps do most of the work. Be sceptical of any blog that quotes you a percentage saving: almost none of them define a baseline, a workload or a quality target, and caching and routing overlap so their savings cannot simply be added together.

~90%

Discount on cached prompt prefixes, and the one number here worth designing around. Order messages so the stable part (system prompt, tool schemas, repo summary) never moves.

272K

The GPT‑5.6 cliff. Cross it and the entire request re‑prices at 2× input and 1.5× output, not just the overflow.

$100‑200

What OpenAI reports Codex actually costs per developer per month. For interactive coding this, not the per‑token rate, is the number that decides things.

$15‑25

Reported cost of one automated code review. Reviewing agent output can cost more than generating it, and deserves its own budget line.

For humans, subscriptions beat token math

API price tables are the wrong lens for interactive coding. Claude Pro is $20 a month, Max is $100 or $200, and included use is bounded by five‑hour and weekly limits rather than per‑token rates. Compare monthly allowance, throttling behaviour and ergonomics first. Token pricing only becomes the primary lens once you are running agents against the API at volume.

Tier the work

  • Cheap: retrieval, classification, document parsing, code search, test generation.
  • Mid: routine execution and tool use. This is where most tokens should live.
  • Flagship: planning ambiguous work, recovering from repeated failure, final high‑risk review.

Cap everything per run

Tokens, dollars, wall time, tool calls, retries, fan‑out. Stop after repeated identical failures and escalate, rather than letting a stochastic loop keep paying for the same mistake.

Know when a subagent pays

Subagents earn their keep when they parallelize independent expensive searches, or keep noisy context out of the main thread. They lose money when tasks are sequential, when workers need the same full context anyway, or when several agents edit the same files. Every subagent duplicates setup tokens and creates a merge obligation.

Task to model to harness

Start here, then adjust from measurement
TaskModelHarness
Everyday coding in an existing repoClaude Sonnet 5Claude Code
Hard cross‑repository migrationGPT‑5.6 Sol or Opus 5Codex or Claude Code
Multi‑day investigation or autonomous repairClaude Fable 5Claude Code or Agent SDK, with checkpoints and gates
IDE‑first pair programmingSonnet 5 or GPT‑5.6 TerraCursor, or Windsurf
Transparent Git‑native workflowSonnet 5, Qwen3.6, DevstralAider
Open or self‑hosted coding platformQwen3.6‑35B‑A3B or Kimi K2.7‑CodeOpenHands
High‑volume document and multimodal workGemini 3.6 FlashGoogle API runtime
Cheap verified background workersDeepSeek V4 Flash, Flash‑Lite, Haiku 4.5, LunaPipeline, LangGraph, or Agents SDK
OpenAI‑native customer or service agentGPT‑5.6 TerraOpenAI Agents SDK
Claude‑native workspace or research agentClaude Sonnet 5Claude Agent SDK
Stateful branching processTerra, Sonnet, or Gemini FlashLangGraph
Long‑running consequential workflowTerra or SonnetAgents SDK or LangGraph above Temporal
Turnkey asynchronous ticketsService selectedDevin
Customizable bring‑your‑own‑model IDE agentQwen3.6, Sonnet, or TerraCline or Roo
Fast role‑based automation prototypeTerra or SonnetCrewAI

Anti-patterns worth naming

What changed in the last twelve months

Harness features became the decisive variable

Skills, hooks, MCP, subagents, background execution, sandboxes, resumable sessions and repository instructions now separate stacks more than a few benchmark points separate the models inside them.

Million-token context went mainstream and mid-tier

Retrieval friction dropped. Context pollution and cost risk went up by the same amount. Reliable use of long context did not arrive with the capacity to hold it.

The surfaces are converging, and churning

CLIs, IDE agents, cloud agents and SDKs are becoming one system with several front doors. The churn is real: Google announced on May 19, 2026 that the standalone Gemini CLI was moving to Antigravity CLI, and consumer, Pro and Ultra authentication stopped serving on June 18. Standard and Enterprise licences and paid API‑key use kept working. Roughly a month of notice, and narrower than a full retirement.

Open weights closed the capability gap, not the deployment gap

The best open models are frequently enormous, and a badly chosen quantization, tool parser, inference server or concurrency policy will destroy the agentic quality the checkpoint advertises.

Provenance

How confident to be

Three research passes disagreed on specifics. Rather than average them into false confidence, here is what held up and what did not.

Google retired the standalone Gemini CLI on June 18, 2026 in favour of Antigravity CLI
Verified
Claude pricing: Fable 5 $10/$50, Opus 5 $5/$25, Haiku 4.5 $1/$5. Sonnet 5 is $2/$10 today, rising to $3/$15 on September 1, 2026
Verified
GPT‑5.6 prompts above 272K input tokens re‑price the entire request at 2× input and 1.5× output
Verified
Terminal‑Bench 2.1: GPT‑5.6 Sol at xhigh effort leads near 89.5%, Claude Opus 5 close behind near 89.1%. Version 2.1 repaired 28 of 89 tasks from 2.0
Verified
SWE‑bench Verified scores, which an earlier version of this page quoted in the 95 to 96% band. Do not use this benchmark. OpenAI stopped evaluating it on February 23, 2026 after an audit found at least 59.4% of failed test cases were flawed and every frontier model showed training contamination. Models scoring ~80% on Verified drop to roughly 23% on SWE‑bench Pro
Retracted
MCP Atlas tool‑use pass rates cluster in the low 80s, but published figures shift by several points depending on which lab published them
Contested
An audit found roughly 30% of SWE‑bench Pro tasks broken or underspecified
Single source
About 63% of tool‑call failures are cognitive rather than syntactic
Single source
Percentage savings claims for routing and caching, previously quoted here as 30 to 70% and 60 to 85%. Removed. No defined baseline or workload, and the two levers overlap so the figures cannot be stacked. The widely repeated “two cent Claude Code turn” traces to 17 sessions on one developer machine running a previous Sonnet generation
Retracted
Subscription figures: Claude Pro $20, Max $100 or $200; OpenAI reports Codex averaging $100 to $200 per developer per month; automated code review around $15 to $25 per PR
Vendor sourced

Method, and one thing worth knowing

Three independent passes: direct web research, a codex exec run with web search enabled, and a Gemini pass. Where they agreed, the claim is stated plainly. Where they conflicted, the conflict is shown above rather than resolved by fiat.

The Gemini pass could not run through the Gemini CLI at all. It failed with IneligibleTierError, which is the deprecation described above, so it ran through the Gemini REST API instead. That pass then also produced the weakest numbers of the three, including a SWE‑bench figure and a generation of open‑weight model names that the other two passes contradicted. Its Antigravity claim, though, was exactly right, and the live auth failure confirmed it.

A fourth pass then reviewed the finished page adversarially, and found real errors that all three original passes had shared. The worst is the retracted row above: three sources agreed on a SWE‑bench number because they were all reading the same downstream leaderboard aggregators, none of which had caught up with the benchmark being abandoned. Agreement between models is not verification when they share a source.

The lesson generalises past this page: a single model’s research output is not evidence, and neither is consensus among models drinking from the same well. Independent adversarial review is the verification layer, which is exactly the argument the architecture section makes about never letting the producing model judge its own work.