Guide

Claude Opus 5's 1M Context Window: What It Unlocks and How to Use It

Claude Opus 5 ships with a 1M-token context window by default. What fits inside, how to structure long-context prompts, caching economics, and real workflows.

July 25, 2026

TL;DR

Claude Opus 5's context window is 1M tokens — as both default and maximum — with 128K output standard and 300K via the Message Batches API beta. That's roughly 3,000 pages or a mid-sized codebase in a single request. The capability is real, but using it well requires structure: stable-prefix prompt design for caching, deliberate ordering, and knowing when retrieval still beats brute-force context.

What Actually Fits in 1M Tokens

  • A full mid-sized application codebase — source, tests, and configuration together
  • Several years of company documents, contracts, or reports analyzed as one corpus
  • Complete API documentation plus your integration code plus the failing logs
  • Fifty-plus research papers cross-referenced in a single session

The qualitative shift: tasks that used to be retrieval-pipeline engineering projects become single prompts.

Long-Context Quality

A big window only matters if quality holds at depth. Anthropic's launch results are encouraging on this front — Opus 5 leads GDPval-AA v2 knowledge work (1,861 Elo) and posts frontier agentic-coding scores, both of which stress synthesis across large contexts. The practical experience in coding sessions: cross-file reference tracing that required careful context curation on 200K-class models now works against the whole repository.

Structuring Long-Context Prompts

Stable prefix first. Put unchanging content — codebase, corpus, style guides — at the start, volatile content (the current question, latest diff) at the end. This maximizes prompt-cache hits, and with input at $5/M tokens, caching is the difference between 1M-context being routine or a splurge. Label the sections. Wrap major inputs in clearly named tags or headers. At this scale, telling the model where things are ("the test suite is in the section marked TESTS") measurably improves precision. Ask for citations. Have the model reference file paths or section names in its answer. It grounds claims and makes verification tractable for a human reviewer. Match effort to the question. Needle-in-haystack lookups run fine at low effort; corpus-wide synthesis deserves high.

The Economics

A full 1M-token request costs $5 in input at standard pricing — fine occasionally, unwise on every call in a loop. The playbook: pay full price once, cache the prefix, then iterate cheaply against the cached context. Batch API for anything that can wait. For agentic sessions, keep the repository cached and let only the conversation tail grow.

When RAG Still Wins

Brute-force context is not always the answer. Retrieval keeps winning when the corpus exceeds 1M tokens, when documents change faster than cache lifetimes, when you need auditable provenance for compliance, or when most calls need a tiny slice of a huge corpus and paying to re-read everything is waste. The emerging pattern is hybrid: coarse retrieval to select the relevant megabyte, then long-context reasoning over it.

Conclusion

The 1M window turns context management from a core engineering problem into a cost-optimization detail for a large class of tasks. Design prompts cache-first, keep an eye on cost per call, keep retrieval for genuinely huge or fast-moving corpora — and enjoy asking questions of entire systems instead of fragments.

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

Try on OtterMind