New

Snout 0.3.3 is out: your agent can search this project's history, on your machine.

New

Snout 0.3.3 is out: your agent can search this project's history, on your machine.

What context costs your agent.

We study what coding agents spend on context, and whether cutting it costs them solved tasks. Below is the outside research we rely on, then our own benchmark results, including the ones that haven’t held up yet.

Snout research · Updated October 19, 2026

$13

Anthropic’s average Claude Code spend per developer per active day.

84%

of an average SWE-agent turn was tool output in one study.

53.3%

of developers say the cost of some AI agent platforms is a barrier.

Why context gets expensive.

A coding agent keeps nothing between requests. On every turn it sends the system prompt, your instructions, every earlier message and every tool result again. A file it reads once is paid for on every turn after.

01

Input is most of the bill.

On SWE-bench Verified, agent tasks used about 1,000 times the tokens of code chat, and input drove the cost. Tool output was about 84% of an average SWE-agent turn. Another study found file reads were 76.1% of Claude Sonnet 4.5’s tokens.

02

Caching softens it but doesn’t remove it.

Cached context costs a tenth of the input price or less. Each new block is first written at 1.25 to 2 times that price, and after five idle minutes on an API key, or an hour on a subscription, Claude Code reprocesses the whole conversation.

03

Plans meter it in time windows.

Claude Team and Enterprise seats reset on a rolling five-hour window and a weekly one, and Claude Code’s weekly limits began in August 2025. GitHub moved Copilot to token-based billing on June 1, 2026. A long context spends the allowance faster, however short the prompt.

04

The bill is hard to predict.

Anthropic puts average Claude Code spend at about $13 per developer per active day, or $150 to $250 a month. The same task can use up to 30 times more tokens on one run than on another.

05

Longer input, worse answers.

Models use the middle of a long input worst. On one benchmark, 11 of 13 models that claim 128K tokens or more fell below half their short-context score at 32K. Length alone cut performance by 13.9% to 85%, even with perfect retrieval.

06

Compaction trades detail for room.

When the window fills, Claude Code replaces the history with a summary. Writing it is a paid call over the whole history, and the original text is gone afterwards. In one controlled study, summaries made agents run up to 15% longer.

What happens when you cut it.

Three published methods take old or low-value tool output out of context. All three cut tokens or cost. Solve rates held or rose in most settings and fell in a few.

Hide old tool output.

Replacing output older than the last 10 turns with a placeholder cut cost per task by 50.9% to 57.1% in four of five model settings, and by 9.8% in the fifth. Solve rate rose in three settings and fell by about a tenth in two.

Trim each read.

Cutting each file read down to the lines the task needs lowered Claude Sonnet 4.5’s tokens by 23.1% and its cost by 26.8% on SWE-bench Verified. Solved tasks went from 353 to 360 of 500.

Clear stale results.

Clearing stale tool results cut token use by 84% on a 100-turn eval and raised an internal agentic-search score by 29%. These are Anthropic’s numbers on its own eval.

Snout checks reads before bulk enters context. Claude Code can return bounded excerpts and hints; Codex can block ambiguous bulk prints or rewrite supported PowerShell reads. When classification is uncertain, the read goes through.

What Snout has measured.

We pair Snout-off and Snout-on attempts and grade each task with its own tests. Our benchmark of the 0.3.3 release shows a cost-per-solved saving with a 95% interval below zero. Older builds are shown separately as historical results.

Claude Code · Sonnet · v0.3.3

Whole stack

−25.0%

cost per solved task

Snout off

Snout on

95% CI −38.2% to −9.5%

14 tasks × 5 per arm · 70/70 solved in each arm

Claude Code · Haiku

Tasks with bulk on the path

−29.3%

cost per solved task

Snout off

Snout on

95% CI −44.3% to −11.2%

10 tasks × 5 per arm · 50/50 solved in each arm

Codex · historical, pre-0.3.1

Read gate alone · older build

−22.6%

effective tokens

Snout off

Snout on

95% CI −34.1% to −13.8%

5 tasks · 15 of 15 solved, off and on

Older runs · inconclusive or historical

These pre-0.3.1 intervals cross zero, so they do not establish a saving for the current build.

Long multi-step sessions · Haiku · 11 tasks × 3 runs

−19.4% cost per solved task, 95% CI −36.4% to +3.9%

Read gate alone · Sonnet · 5 tasks × 2 runs

−23.3% cost per solved task, 95% CI −47.0% to +6.7%

Read gate alone · Haiku · 5 tasks × 5 runs

−24.3% cost per solved task, 95% CI −45.2% to +3.1%

What these runs can’t show.

In the current 140-session run, 70/70 attempts passed in each arm. That does not establish no quality loss: the lower 95% bound was −19.3 percentage points against a −5-point margin. Five of 14 tasks cost more with Snout.

The test projects were built to contain the bulk Snout trims. They show the saving when that bulk is on the agent’s path, not on an average repository.

On the four 0.3.3 control tasks with little bulk, the cost-per-solved change was −8.7%; its interval crossed zero. Savings are not universal.

Open questions.

How much of a team’s bill is bulk.

Published breakdowns come from benchmark agents, not production teams. No public source splits a real team’s spend into bulk reads, useful reads and reasoning.

How much compaction forgets.

No public study counts the facts that survive a Claude Code or Codex compaction. We’re measuring it and will publish when the run meets our own standard.

Whether trimming makes sessions faster.

Halving a prompt may cut latency by only 1% to 5%, so any gain has to come from fewer turns. Earlier long-session runs suggested 3.1% fewer turns; this needs replication on the current build.

Sources.

  1. Manage costs effectively. Claude Code docs, Anthropic.

  2. How Claude Code uses prompt caching. Claude Code docs, Anthropic.

  3. Prompt caching. Claude Platform docs, Anthropic.

  4. Managing context on the Claude Developer Platform. Anthropic, September 2025.

  5. How Do AI Agents Spend Your Money? Bai et al., 2026, preprint.

  6. The Complexity Trap. Lindenbauer et al., NeurIPS 2025 DL4C workshop.

  7. SWE-Pruner. Wang et al., 2026, preprint.

  8. Lost in the Middle. Liu et al., TACL, 2024.

  9. NoLiMa. Modarressi et al., ICML, 2025.

  10. Context Length Alone Hurts LLM Performance Despite Perfect Retrieval. Du et al., Findings of EMNLP, 2025.

  11. Latency optimization. OpenAI API docs.

  12. What changed with Copilot billing. GitHub Docs.

  13. Anthropic throttles Claude rate limits, devs call foul. VentureBeat, July 2025.

  14. 2025 Developer Survey: AI. Stack Overflow.

  15. Snout v0.3.3 Sonnet Windows benchmark: 14 tasks, five repeats per arm, 140 sessions; earlier runs identified as historical. November 2026.

See it on your own repo.

Snout runs on your machine and shows what each session spends on context.

Snout, a pink anteater in a cowboy hat
Snout, a pink anteater in a cowboy hat