Million-token context windows changed what fits inside a single prompt, yet dumping raw repositories and full logs into every turn still degrades reliability and inflates cost. Production coding and research agents perform better when long context works alongside selective retrieval, tool deferral, and isolated subagents.

Naive 1M-token stuffing scales prefill latency and cost linearly, whereas hybrid retrieval, deferred tools, and subagent compaction keep prompts lean and accurate.

Why 1M context still needs discipline

Multi-hop reasoning across massive prompts remains uneven across frontier models, and every extra token paid on input adds prefill latency on every agent step.

  • Benchmark spread stays wide: On the GraphWalks evaluation (256K to 1M BFS F1), Gemini 4 Neon reaches 95.2%, while GPT-6.2 Sol scores 80.1% and Claude Opus 5.5 scores 66.8% as reported in the same model card benchmarks.
  • Linear cost and latency tax: Prefill compute and per-turn token spend grow linearly with prompt length, turning repeated tool loops over 300K-token histories into slow, expensive turns.
  • Signal dilution in long loops: Unpruned terminal output, unused tool schemas, and stale file reads compete for attention against core repository rules.
  • Cache sensitivity: Appending noisy, ever-changing logs early in the conversation breaks prompt-cache prefixes and forces expensive recomputation.
Model GraphWalks (256K–1M BFS F1) Operational Implication
Gemini 4 Neon 95.2% Strong long-horizon recall, yet still pays linear prefill time and token cost per turn
GPT-6.2 Sol 80.1% Noticeable multi-hop degradation when unranked noise fills the window
Claude Opus 5.5 66.8% Steep drop on dense 256K–1M graph traversal without focused retrieval and compaction

"We built CoreWeave to help pioneers accelerate their innovations with the unmatched performance of our purpose-built AI platform, matching the right technology to the right workloads as they evolve." — Mike Intrator, CEO of CoreWeave (NVIDIA Newsroom)

Engineering playbook for hybrid context

Matching the right mechanism to each part of the workload beats brute-force prompt stuffing on accuracy, speed, and spend. Treat the 1M-token window as working memory for verified evidence rather than a dumping ground for raw artifacts.

  • Defer idle tools and load skills progressively: Keep rarely used tool schemas behind on-demand lookup and load specialized instructions only when a task enters that domain. The Mod API architecture in Quasar for Claude Code shows how deferring idle tools and anchoring core rules after compaction protects both token budget and instruction adherence.
  • Retrieve external corpora with hybrid search: Instead of pasting whole documentation trees or large knowledge bases into the prompt, index chunks with both BM25 lexical scoring and pgvector HNSW embeddings. Following the production RAG and pgvector architecture enforces tenant ACLs, keeps chunks anchored to headings, and passes only high-precision passages to the model.
  • Isolate noisy exploration inside subagents: Offload multi-file grep sweeps, failing test logs, and dependency audits to isolated subagents that read raw 200K-token traces in their own context and return a concise structured summary to the parent thread.
  • Compact between task phases: Summarize settled findings, drop raw build logs once verified, and reserve the main window for active diffs, failing assertions, and verified constraints.

With GraphWalks accuracy spanning nearly 30 percentage points across top models, context engineering remains an active systems problem. Teams that pair 1M-token reasoning with hybrid retrieval, progressive tool loading, and subagent isolation ship faster turns at lower cost without sacrificing recall.