Tutorial

Using Claude Opus 5 in Claude Code: Agentic Coding Workflows That Work

How to get the most from Claude Opus 5 inside Claude Code: effort settings, 1M-context repository work, verification-driven workflows, and practical patterns.

July 25, 2026

TL;DR

Claude Opus 5 is available in Claude Code from day one and changes how agentic coding sessions feel: 96.0% SWE-bench Verified capability, a 1M-token window that fits entire repositories, and iterative self-verification that catches its own mistakes before you do. The practical wins come from matching effort to task type, leaning on whole-repo context instead of file-by-file feeding, and letting the model run verification loops.

Why Opus 5 Changes Claude Code Sessions

Three launch capabilities matter most in an agentic coding loop:

Whole-repository context. With 1M tokens, mid-sized codebases fit entirely in context. Cross-cutting tasks — renaming a concept across 40 files, tracing a data flow through every layer — stop requiring careful context curation. Iterative verification. Opus 5 re-checks its own work during a task: running tests, reading error output, fixing, re-running. Anthropic's launch examples include root-cause debugging of open-source packages and building a custom computer-vision pipeline when direct visualization wasn't available. In practice this means fewer sessions that end with "it says it's done but it isn't." Effort control. Mechanical refactors run fine at low effort; architectural work deserves high. Since Claude Code sessions mix both, setting effort per task keeps long sessions affordable.

Workflow Patterns

Repo-scale review. Load the repository and ask for an architecture map before making changes. With full context, Opus 5's dependency analysis is reliable enough to plan multi-file edits in one pass. Test-first agent loops. Ask for failing tests first, then implementation until green. Opus 5's verification bias makes it unusually good at honoring "do not stop until the suite passes" — it treats test output as ground truth rather than optimistically declaring success. Debugging with full logs. Paste entire failing CI logs rather than excerpts. Long-context quality means the model correlates stack traces against source without you pre-filtering the relevant parts. Escalating effort. Start a tricky bug at medium effort; if the first hypothesis doesn't survive testing, retry at high. This mirrors how senior engineers allocate their own attention and keeps cost proportional to difficulty.

Cost Discipline in Long Sessions

  • Keep the stable parts of context (repo, style guide) cacheable; put volatile content last
  • Run batch-able work (mass lint fixes, codemod sweeps) at low effort
  • Watch cost per merged change, not per session — Opus 5's fewer retries typically lower the real number versus Opus 4.8 at identical prices

When to Reach for a Different Model

Sonnet 5 remains the better economics for high-volume, well-scoped tasks (boilerplate, scripted transformations at scale). Fable 5 is still recommended for agents that run autonomously for days. For interactive engineering — the daily Claude Code loop — Opus 5 is now the sweet spot.

Conclusion

The upgrade advice is simple: make Opus 5 your Claude Code default, feed it whole repositories instead of curated excerpts, wire tasks to end on verified outcomes (tests green, builds passing), and modulate effort instead of model. The combination delivers most of what made Fable 5 desirable in a coding session, at half the price.

In-depth guides, comparisons, and insights to help you master Claude 5

Try on OtterMind