Skip to content
AIAI Tools Hub
Tutorial

Claude Opus 5 for Coding: How to Get the Most Out of It

Claude Opus 5 is built for multi-file, long-running coding work. Settings, workflow, and the prompt habits that change on this model.

AI Tools Hub Editorial TeamUpdated July 27, 20264 min read

Coding is the job Claude Opus 5 was tuned hardest for — and specifically the difficult end of it. On a one-line fix, the gap between Opus 5 and a mid-tier model is small. On a multi-file feature, an unfamiliar codebase, or a refactor that touches thirty files, the gap is where the model earns its price.

This page is written for developers and engineering teams. If you want the model overview first, start with the complete Claude Opus 5 guide.

Best effort levelxhigh
Context available1M tokens — enough for real working material, not just snippets
Cost$5 per million input tokens, $25 per million output

Why Claude Opus 5 suits agentic coding

  • It finishes work instead of leaving stubs, TODOs, and placeholder functions behind.
  • A 1M-token context window fits a large repository, its tests, and its docs in a single session — no retrieval plumbing required.
  • It self-verifies. It re-reads what it wrote and runs checks without being told to, which is why the old "double-check your work" instruction is now counterproductive.
  • 128K max output means it can emit a fully refactored module in one response rather than dribbling it out across turns.

A workflow that works

  1. Write the whole spec up front. Opus 5 rewards one well-specified opening turn far more than a drip-feed of clarifications across ten messages. State the goal, the constraints, and what "done" looks like.
  2. Point it at the real code. Give it repository access rather than pasted snippets — its long-context comprehension is the advantage you paid for.
  3. Let it run. Interrupting a long agentic turn to ask for status costs more than it saves; the model narrates its own progress by default.
  4. Review the diff, not the transcript. Its narration is verbose; the diff is the deliverable.
  5. Cap delegation explicitly if your harness supports subagents — see the pitfalls below.

Settings to start from

Set the effort level to xhigh. Coding and agentic work is exactly where the top of the effort ladder pays for itself: higher effort up front usually means fewer turns, and fewer turns often means lower total cost. Sweep down to high or medium on routine tasks — Opus 5 is unusually strong at the lower levels.

Leave adaptive thinking on — it is the default on Claude Opus 5, and turning it off introduces failure modes that are not worth the saving. See effort levels explained if you want to tune this properly.

What to watch out for

  • It delegates to subagents readily — more so than Opus 4.8, which had to be pushed to delegate. Each subagent re-establishes context and reports back, so an uncapped agent can multiply your bill. Set an explicit ceiling.
  • It can widen the scope of the task. Ask for a bug fix and you may also get surrounding cleanup. Say so if you want the minimum diff.
  • Delete your "verify your work" scaffolding. Instructions to double-check, and separate verification passes carried over from older models, now cause redundant work rather than better results.

The verdict

Use Opus 5 as the daily driver for anything non-trivial, and drop to a cheaper sibling for boilerplate. The routing decision matters more than the model choice.

If cost is the constraint, read how to cut Claude Opus 5 costs before downgrading — routing and caching usually beat switching models.

More on Claude Opus 5

Start with the complete Claude Opus 5 guide for the overview, or go deeper:

Frequently Asked Questions

Is Claude Opus 5 better than Claude Opus 4.8 for coding?

Yes, and it is the same price — $5 per million input tokens and $25 per million output. Opus 5 is the successor to Opus 4.8 in the Opus line and is strongest on long-horizon, multi-file work. The gap is smallest on simple single-turn edits.

Should I still tell Claude Opus 5 to double-check its code?

No. Opus 5 verifies its own work without being asked, and explicit verification instructions cause it to over-verify — more tokens, more time, no better result. Removing that instruction is one of the highest-value changes when upgrading from an older model.

What effort level should I use for coding with Claude Opus 5?

Start at `xhigh` for coding and agentic tasks, then test `high` and `medium` on your own work. Opus 5 performs unusually well at lower effort levels, so the setting that ships in your prompt library from a previous model is probably not the right one.

Tools Mentioned

Related Articles