AgentRailv0.1.0
← Blog
token-efficiencyagentsAgentic WorkflowsDeveloper Experience

Your AI Coding Agent Spends Half Its Budget Re-Reading Files It Already Knows

02 Jun 2026

AI coding agents silently burn the majority of their token budget re-reading files and re-deriving project state they've already processed — a structured control plane eliminates this waste, which is why AgentRail achieves 93% fewer reasoning tokens.

Every time you kick off a Claude Code or Codex session, the first thing your agent does is not write code. It reads your repo. It reads it again. It discovers your file structure, infers your naming conventions, and reasons through architectural decisions that were settled three sessions ago. By the time it touches your actual task, a significant chunk of its context budget is already spent on information it processed last time.

This pattern has a name in practitioner communities: the catch-up tax. One engineer on Hacker News put it plainly after two weeks with Claude Code: the quality of generated code is inversely proportional to the time the agent spends on it uninterrupted. A Reddit thread about Opus 4.5 went viral because the agent consumed an entire context window re-reading skill files before starting any real work. A developer on dev.to reported building a custom knowledge graph to give Claude Code precise context upfront, saving 40-95% of tokens on some runs. These are not anomalies. They are the expected behavior of stateless systems dropped into a stateful problem.

Here is what makes it worse. The longer a session runs, the more poisoned the context becomes. Each re-read file fills the context window with information the agent has already seen, pushing the actual task further toward the middle. Research on large language models consistently shows that models reason worst about information buried in the middle of long contexts. Re-read state is not just wasteful, it is actively degrading the quality of the reasoning it is crowding out. The agent gets slower and produces worse output the longer it runs, and re-reading old files is a primary reason why.

The catch-up tax is not a model quality issue. It is not something better prompting or a more recent model version will fix. The agent is stateless by design. Every session is a fresh start. It has no memory of which files it already processed, no record of the architectural decisions it derived, no awareness that it is about to spend 2,000 tokens re-discovering something it documented in detail four hours ago. The problem is architectural, and architectural problems require architectural solutions.

A control plane approaches this differently. Instead of handing the agent a task and watching it explore, it provides a structured briefing at the start of every action: here is the issue, here is the current PR status, here are the CI failures, here is what the last review said. The agent starts with ground truth rather than having to derive it. File discovery is unnecessary because the relevant context is already formatted and present. Architectural decisions are recorded in structured state, not re-inferred from code comments and directory trees.

AgentRail benchmark against plain Codex: 47% fewer total tokens on the same task, and 93% fewer reasoning tokens. The reasoning number is the telling one. Reasoning tokens are where the model does expensive re-derivation work. When you eliminate the need to re-derive what is already known, the savings are dramatic. The model still does all the same coding work. It just does not spend most of its budget catching up on things it already figured out the last time it ran.

The gap between a useful coding agent and an expensive one often comes down to what happens before the first tool call. If that first call is a file read to figure out where things are, you are paying the catch-up tax on every single run. AgentRail handles issue intake, PR status, CI feedback, and review history so your agents start on the actual problem. Install with: npm install -g @agentrail-core/cli and agentrail init. Read more at https://agentrail.app