Evidence · updated 2026-11-26

Fewer tokens.
Better answers.

An AI coding agent that reads less costs less and tends to be more accurate. That is what the research says, and it is why hexiel does the looking in Python and hands your model only what it needs. Below: the published studies, a test you can rerun yourself, and what we have not measured yet.

Why tokens matter twice

They cost money

Every token sent is billed, and an agent resends its whole conversation on every step. Reading a 600-line file to change three lines is paid for again on each later request.

They dilute attention

Models do not use a long input evenly. Padding the context with files that do not matter makes the part that does matter harder to use.

They fill the window

A full context window forces summarising, and a summary loses detail. The less that goes in, the longer a session stays sharp.

What the published research says

Five sources we rely on. We link every one; read them rather than taking our summary on trust.

SourceFindingWhat hexiel does about it
Liu et al., Lost in the Middle (TACL 2024) Accuracy is highest when the relevant information is at the start or end of the input and drops significantly when it is in the middle, even for models built for long contexts. Going from 20 to 50 retrieved documents helped only about 1–1.5%. Sends the relevant function, not the file around it; condenses big tool outputs for the current request.
Hong, Troynikov & Huber, Context Rot (Chroma, July 2025) Across 18 models and 194,480 calls, performance became less reliable as input length grew, even on simple tasks. Chroma sells a vector database, so weigh its recommended remedy accordingly; the measurements and code are public. Keeps the working context small and prunes old tool results (/context shows what occupies the window).
Anthropic, Prompt caching (documentation) A cache read costs 0.1× the base input price; a write costs 1.25× (5-minute) or 2× (1-hour). It only pays off if the start of each request is identical. Nothing volatile in the system prompt (date and git state ride the current user turn), so long sessions keep hitting the cache.
Xia et al., Agentless (arXiv 2407.01489) A fixed three-phase pipeline (localize, repair, validate), with no open-ended agent loop, was reported as the highest-performing and lowest-cost open-source approach on SWE-bench Lite at the time: version 1 reported 27.33% at $0.34 per issue; version 2, 32.00% at $0.70. Its first phase is narrowing down to the right files and lines. A symbol index (where_is, outline, callers) so the model goes straight to the right lines.
Anthropic Engineering, Effective context engineering for AI agents Tools should return token-efficient information and encourage efficient agent behaviour; the aim is the smallest set of high-signal tokens that gets the result. Python does the searching, test-waiting and parsing; a python tool batches many steps into one local script.

Case study: finding and reading code in two real projects

We ran hexiel's own tools against two real, public codebases and counted the text that would reach the model. No model is called, so it costs nothing and anyone can reproduce it.

ProjectTaskReading fileshexielSaved
hexiel
252 source files, ~648k tokens
Find and read 25 functions250,881 tokens8,222 tokens96.7%
Get your bearings647,727 tokens3,811 tokens99.4%
hexiel-website
23 source files, ~85k tokens
Find and read 19 functions80,585 tokens8,967 tokens88.9%
Get your bearings84,791 tokens775 tokens99.1%

How to read this honestly

Rerun it on your own code, no install of anything extra: python bench/context_savings.py /path/to/your/repo from the hexiel repository. End-to-end results (does the task pass, and what did it cost) will be added here once we have enough runs to mean something; the benchmark harness is already public.

Case study: 14 days of real use, 98.5% of input served from cache

The first case study counts text before it is sent. This one counts what happened in real work: the hexiel developer's own usage log from 9 to 26 November 2026, read straight from the per-provider usage totals hexiel already keeps for /usage. Totals only; no project names or content.

MeasureValue
Requests to models27,791 over 14 active days
Input tokens sent2.81 billion (about 101,000 per request)
Served from the provider’s prompt cache2.77 billion (98.5%)
Processed fresh43.0 million (1.5%), about 1 in 65
Output tokens written7.1 million (about 255 per request)
Hit rate by model94.2% to 99.1% across the five models with over 80 million input tokens each; 99.1% on the busiest (21,026 requests)

What this shows, and what it does not

How hexiel keeps context small

Symbols, not files

where_is, outline, callers and read by symbol answer “where is it and what does it look like” from a local index, in pure Python.

Python waits and parses

Searching, waiting on a test run (the model is woken with the result) and parsing output cost no tokens. See what is built in.

Small model for big outputs

Long files and web pages can be condensed by a small helper model first. Helper models.

A cache-friendly prompt

A stable system prompt keeps provider prompt caches hitting, which the pricing above rewards.

Oriented from message one

A local project brief and matching passages from your knowledge library arrive with the first message, so the model does not explore to find its feet.

Context you can see

/context shows what fills the window and /usage shows tokens in, cached and out, so the saving is visible, not claimed.

Measure it on your own work

  1. Install: curl -fsSL https://hexiel.tech/install.sh | sh (Windows: irm https://hexiel.tech/install.ps1 | iex).
  2. Work as usual, then type /usage for tokens in, cached and out, and /context for what is in the window.
  3. Run python bench/context_savings.py on your repository for the find-and-read numbers above.

Got numbers worth sharing, good or bad? Tell us with /feature or on the support page. We will publish measured results with their method, including the ones that do not flatter us.

Questions

Does giving an AI model more context make it more accurate?

Not reliably. Liu et al. (TACL 2024) found models use the start and end of a long input best and the middle worst, even long-context models. Chroma’s 2025 report found reliability falls as input grows, even on simple tasks. Relevant context beats more context.

How much fewer tokens does hexiel use to find and read code?

In our reproducible test, 96.7% fewer on the hexiel repository (250,881 down to 8,222 tokens over 25 functions) and 88.9% fewer on hexiel’s website (80,585 down to 8,967 over 19 functions), versus reading whole files. Method and caveats are above.

Does prompt caching reduce the cost of a coding agent?

Yes, when the start of every request is identical. Anthropic lists cache reads at 0.1× the base input price, with a 1.25× or 2× write premium. hexiel keeps its system prompt stable so sessions keep hitting the cache.

How much of a coding agent’s input can come from the prompt cache?

In the hexiel developer’s own log for 9–26 November 2026 (27,791 requests, 2.81 billion input tokens), 98.5% of input was served from the provider’s cache, 94.2% to 99.1% across the five busiest models. One user, 14 days, provider-reported, no counterfactual: a real example, not a benchmark.

Did you measure answer quality?

No. We measured how much text reaches the model for two common steps. We will publish end-to-end accuracy and cost per task when the sample sizes are large enough to trust.

Is hexiel free?

Yes, the agent is free and open source (GPLv3 with the Commons Clause). You pay your model provider for what you use; local models are free.

Give your model less to read.