The Claude 5 Family: Opus 4.8, Sonnet 5, and Haiku 4.5 for Agentic Coding
A practical look at the Claude 5 lineup — Opus 4.8 for hard reasoning, Sonnet 5 for balanced agentic work, and Haiku 4.5 for fast, cheap routing — and how to pick between them for coding agents.
Anthropic's Claude 5 family gives developers three tiers that map cleanly onto the three things a coding agent actually does: plan, execute, and triage. Understanding where each model wins is the difference between an agent that burns budget on the wrong step and one that ships.
The three tiers
- Opus 4.8 — the strongest reasoning model. Use it for architecture decisions, multi-file refactors, and the kind of bug that requires holding a whole codebase in context. Highest cost per token, but it needs the fewest iterations.
- Sonnet 5 — the balanced workhorse. Fast enough for interactive loops, strong enough for most implementation. This is the default for the middle 80% of agent steps.
- Haiku 4.5 — fast and cheap. Ideal for routing, classification, summarization, and the "is this even worth escalating?" checks that gate the expensive models.
A routing pattern that pays for itself
The highest-leverage pattern is Haiku-as-router: a cheap Haiku call decides whether a task is trivial (handle inline), moderate (delegate to Sonnet), or genuinely hard (escalate to Opus). On a typical coding session this cuts token spend dramatically without quality loss, because most "hard-looking" requests are actually mechanical.
Where Opus 4.8 earns its cost
Hold Opus for moments where a wrong guess is expensive: designing a schema you'll live with for years, debugging a flaky test that touches concurrency, or reviewing a PR that introduces a subtle security issue. For everything else, Sonnet 5 is the right default — and the agent loop should say so explicitly in its plan rather than defaulting to the strongest model out of caution.
