Bottom line: GPT-5.5 ships a 1M-token context window via the API (400K inside Codex CLI) — the same ballpark as Claude Opus 5’s 1M-token window and Gemini 3.1 Pro’s 1,048,576 tokens, and half of Gemini 3.5 Pro’s 2M-token ceiling. The raw number matters less than what happens on the way there: every one of these models loses retrieval accuracy well before the context window fills up, and that decay is what actually breaks RAG pipelines and long-running coding agents in production.
- GPT-5.5’s API context window is 1 million tokens (roughly 750,000 words); Codex CLI caps it at 400K.
- Claude Opus 5 and Gemini 3.1 Pro both sit at ~1M tokens; Gemini 3.5 Pro doubles that to 2M tokens.
- Per NVIDIA’s RULER benchmark, retrieval accuracy on long-context tasks drops well before the stated maximum — the advertised ceiling is not the usable ceiling.
- The real-world failure modes are a coding agent silently losing track of earlier edits and a RAG pipeline dropping retrieved chunks it should have surfaced.
OpenAI shipped GPT-5.5 on April 23, 2026 with the API context window doubled from 512K to 1M tokens, per OpenAI’s model announcement. That’s the headline. What most coverage skips is the gap between “the model accepts 1M tokens” and “the model reasons well across 1M tokens” — and that gap is exactly where RAG pipelines and coding agents fail.
How big is GPT-5.5’s context window, actually?

1 million tokens through the API, 400,000 tokens inside Codex CLI. That’s roughly 750,000 words — about 6–8 full-length novels, or a mid-sized codebase running into the tens of thousands of lines. The Codex CLI cap exists because agentic coding sessions carry overhead (tool calls, file diffs, retry loops) that a raw chat completion doesn’t, so OpenAI trims the working window to keep latency and cost predictable.
How does that compare to Claude Opus 5 and Gemini?
Close, with one outlier. Claude Opus 5 ships a 1M-token context window as both the default and the maximum — there’s no smaller-context variant to opt into — with a 128K output ceiling, per Anthropic’s platform docs. Gemini 3.1 Pro matches at 1,048,576 tokens. Gemini 3.5 Pro is the exception at 2M tokens, currently the largest window on a production frontier model, per Google DeepMind’s model card.
| Model | Context Window | Max Output | Notes |
|---|---|---|---|
| GPT-5.5 (API) | 1,000,000 tokens | — | Doubled from 512K at launch, April 2026 |
| GPT-5.5 (Codex CLI) | 400,000 tokens | — | Trimmed for agentic tool-call overhead |
| Claude Opus 5 | 1,000,000 tokens | 128,000 tokens | 1M is both default and max, no smaller tier |
| Gemini 3.1 Pro | 1,048,576 tokens | — | Matches GPT-5.5/Opus 5 tier |
| Gemini 3.5 Pro | 2,000,000 tokens | — | Largest production window as of mid-2026 |
Why does a bigger context window not fix RAG accuracy?
Because storing tokens and reasoning over them are different problems. A model can technically hold 1M tokens without being able to reliably find and use the one paragraph in that pile that answers your question. This is the “needle in a haystack” failure mode, and it’s exactly what the RULER benchmark was built to measure.
Per NVIDIA’s RULER benchmark paper, models that score near-perfect on simple single-needle retrieval tests still show large accuracy drops as effective context length grows — the drop shows up on multi-hop tracing and aggregation tasks specifically, the kind of reasoning a RAG pipeline actually needs when it’s stitching together several retrieved chunks rather than quoting one sentence back verbatim.
What breaks first: RAG pipelines or coding agents?

RAG pipelines break quietly. When retrieval quality decays past the effective context ceiling, the model doesn’t error out — it just drops or under-weights chunks it should have used, and the answer looks plausible while missing the source that actually mattered. There’s no stack trace for “the model ignored paragraph 40,000.”
Coding agents break more visibly, but not necessarily fast enough to notice mid-session. A long-running agent editing a multi-file feature accumulates diffs, tool outputs, and retry logs in its context. Once that log approaches the working window — 400K for Codex CLI sessions, for example — older edits start falling out of effective attention. The agent doesn’t announce this. It just starts re-introducing a bug it already fixed three files ago, because the fix scrolled out of its working context.
How should you actually chunk for a 1M-token model?
Smaller than the window suggests. If you’re building retrieval on top of any of these models, picking the right embedding model and chunk size still matters more than the headline context number — see our embedding model comparison for how retrieval accuracy actually varies by model and chunk size, not just by context window headroom. And if you’re still deciding what vectorization step feeds that pipeline, our vectorization explainer covers where that step sits before retrieval even happens.
“Model context length has grown 10,000x in five years, but retrieval accuracy over long context has not kept pace at the same rate” — per NVIDIA’s RULER benchmark paper on long-context evaluation.
Does the context window size affect pricing?
Indirectly, yes. All four models charge per token for both input and output, and a 1M-token prompt costs roughly the same multiple whether or not the model uses all of it well. Pushing a prompt to 900K tokens because the window allows it, when 200K well-chunked tokens would answer the query just as accurately, is paying full price for tokens that hurt retrieval accuracy rather than helping it.
- GPT-5.5’s real working ceiling depends on where you’re calling it: 1M via API, 400K inside Codex CLI.
- Claude Opus 5 and Gemini 3.1 Pro sit at roughly the same 1M-token tier; Gemini 3.5 Pro doubles that to 2M.
- The RULER benchmark shows retrieval accuracy degrading on multi-hop and aggregation tasks well before the advertised maximum is reached.
- RAG pipelines fail silently (dropped chunks); coding agents fail by re-introducing already-fixed bugs once diffs scroll out of working context.
- Chunking and embedding-model choice still matter more than the headline context number for retrieval accuracy.
What should builders actually do differently today?

Three changes, in order of impact. First, stop sizing RAG retrieval budgets off the model’s advertised maximum — size them off where accuracy actually holds, which for multi-hop and aggregation queries is meaningfully below the stated ceiling on every model in this comparison, per the RULER results above. Second, for long-running coding agents, add an explicit checkpoint: re-read the current state of edited files from disk rather than trusting the agent’s running summary of what it already changed, especially once a session crosses into six-figure token counts. Third, treat context window size as a tie-breaker, not a selection criterion — Codex CLI’s 400K cap versus the API’s 1M is a bigger practical gap than GPT-5.5 versus Claude Opus 5 versus Gemini 3.1 Pro, because it changes which interface you’re actually working in, not just a number on a comparison chart.
None of this means bigger context windows are pointless. A 1M-token window genuinely lets you load an entire mid-sized repository or a full support-ticket history into one prompt without manual chunking, which is real value for one-off analysis. The failure mode only shows up when that same headroom gets treated as a substitute for retrieval architecture in a system that runs continuously — that’s where the RULER-documented accuracy decay actually costs you wrong answers instead of just wasted tokens.
Frequently Asked Questions
What is GPT-5.5’s actual context window size?
1 million tokens via the API, doubled from 512K at launch on April 23, 2026. Inside Codex CLI, the working window is capped at 400,000 tokens to account for tool-call and diff overhead in agentic sessions.
Is Claude Opus 5’s context window bigger than GPT-5.5’s?
No — they’re effectively tied. Claude Opus 5 ships a 1M-token window as both its default and its maximum, with a 128K output ceiling. There’s no meaningful size advantage either direction between GPT-5.5’s API tier and Opus 5.
Which model has the largest context window in 2026?
Gemini 3.5 Pro, at 2 million tokens — double GPT-5.5, Claude Opus 5, and Gemini 3.1 Pro, which all sit at roughly 1M.
Why does my RAG pipeline get worse answers even with a huge context window?
Because context window size measures what the model can accept, not what it can reliably reason over. Per the RULER benchmark, retrieval accuracy on multi-hop and aggregation tasks drops well before the stated token maximum, so a pipeline that stuffs more retrieved chunks into the prompt can get less accurate, not more.
What’s the RULER benchmark and why does it matter here?
RULER is a long-context evaluation benchmark from NVIDIA covering retrieval, multi-hop tracing, aggregation, and question-answering tasks at increasing context lengths. It matters because it separates “the model found one needle in a haystack” (easy, most models pass) from “the model correctly reasoned across several scattered facts” (hard, where accuracy drops matter for RAG).
Should I switch models just to get a bigger context window?
Not on window size alone. If your pipeline is already hitting degraded accuracy at your current model’s effective ceiling, a bigger raw window (like Gemini 3.5 Pro’s 2M) buys you more room before that ceiling, but it doesn’t fix the underlying retrieval-accuracy decay pattern that shows up on all of these models past a certain fill point.
Last updated: 2026-09-02
