DEV Community

gentic news
gentic news

Posted on • Originally published at gentic.news

Claude Code Turns Are 75% Reading, 219 Sessions Show

Red Hat's analysis of 219 Claude Code sessions shows median turns are ~75% reading. This reframes optimization toward context management.

Red Hat's analysis of 219 real Claude Code sessions, retweeted by SemiAnalysis, shows the median agent turn spends most of its time reading context, not writing code. This inverts the assumption that generation is the bottleneck.

Key facts

  • 219 real Claude Code sessions analyzed
  • Median turn: ~75% tokens reading context
  • 25% of tokens for generation
  • Data from Red Hat, retweeted by SemiAnalysis
  • Context, not generation, is the bottleneck

A coding agent's turn is mostly reading. Across 219 real Claude Code sessions from SemiAnalysis, the median request sends roughly 75% of tokens to reading context, per Red Hat's analysis. The remaining quarter goes to generating patches or commands, Red Hat's post says.

Key Takeaways

  • Red Hat's analysis of 219 Claude Code sessions shows median turns are ~75% reading.
  • This reframes optimization toward context management.

The bottleneck is context, not generation

The split matters because it reframes where optimization effort goes. Most agentic coding frameworks optimize generation latency—model inference speed, speculative decoding, smaller draft models. But if 75% of a turn's tokens are consumed reading files, diffs, and tool outputs, then cutting generation cost by half only shaves a fraction of total latency. The real lever is context management: pruning irrelevant files, caching repeated reads, and compressing tool outputs.

This aligns with a broader pattern across the agentic coding market. OpenAI's Codex, Anthropic's Claude Code, and Google's Jules all push larger context windows as a selling point—Claude supports 200K tokens, Gemini 1M. But larger windows invite bloated prompts. The data suggests agents are spending compute on re-reading the same repository state turn after turn, a problem that no model release has directly solved.

Why this matters for infrastructure

For infrastructure teams, the ratio has direct cost implications. Token pricing is symmetric—input and output cost the same per token at many providers. If an agent burns 4x more input tokens than output, then input token volume drives the bill. Enterprises running agents at scale should expect context reads to dominate their API spend, not generation.

Red Hat's framing—"a coding agent's turn is mostly reading"—is a useful corrective to the marketing narrative that agents are writing code. They are mostly re-reading it. The 219-session sample is real production usage, not a benchmark, so the ratio reflects actual workloads: multi-file repos, long tool outputs, and iterative debugging.

The source does not disclose the exact token split or the distribution across sessions, so treat the 75% figure as a median from Red Hat's analysis, not a hard universal. Still, the direction is consistent with prior work on agent efficiency—[recent lab findings] show context caching and retrieval dominate agent latency in similar tools.

The takeaway for builders

For teams building coding agents, the implication is to invest in context engineering, not just model quality. Techniques like repository indexing, selective file inclusion, and incremental diff summaries could yield bigger latency wins than swapping to a faster model. For model providers, the opportunity is in cheaper input tokens or smarter context compression—both are active research areas at Anthropic and OpenAI.

Watch for whether next-generation agent frameworks—Claude Code 2.0, Codex improvements, or open-source alternatives—publicly report their read-to-write token ratios. If they start publishing this metric, it will signal that context efficiency has become a competitive differentiator.

What to watch

Watch for Claude Code 2.0 or Codex updates that publish read-to-write token ratios. If providers start optimizing context caching—like Anthropic's prompt caching or Google's context recycling—expect latency and cost benchmarks to shift. Also track whether enterprise agent logs show similar ratios in production.

[Updated 05 Aug via devto_claudecode]

A new tool, Headroom, targets this exact inefficiency by compressing redundant context before it reaches the API. Its README reports 15–20% token reduction for coding agents, with up to 70–95% for structured payloads like JSON and build logs. Headroom routes Claude Code through a local proxy or MCP server, using content hashing and retrieval to preserve fidelity. One practitioner reported ~26% real-world savings after a month. The tool's existence underscores the growing market response to context bloat, validating Red Hat's finding that reading dominates agent turns. [per dev.to]


Originally published on gentic.news

Top comments (0)