1.34 Million Tokens That Never Touched Claude's Context
603 delegated calls
0
tokens processed locally
Every time Claude reads a file just to answer one narrow question, that's context spent on work that didn't need Claude-level reasoning. I built a wrapper that routes those reads to a local model instead. It's logged 603 calls and 1.34 million tokens processed locally, tokens that never entered Claude's context window at all.
The tool is called ask_local.py. It attaches a file by path, sends a local Ollama model the actual question, and hands back only the answer, usually a few hundred tokens. The file itself never gets pasted into a prompt Claude has to hold.
Results
| Metric | Value |
|---|---|
| Time span | 8.9 days (2026-09-04 to 2026-09-13) |
| Calls logged | 603 |
| Total input tokens processed locally | 1,346,141 |
| Median input rate | 3,689 tok/s |
| Median output rate | 75 tok/s |
| Time split | 22% reading, 78% generating |
Key finding
Reading is nearly free. Generating the answer is the bottleneck: input tokens get consumed at a median 3,689 tokens per second, output at just 75. Time per call splits 22% reading versus 78% generating, even though the files read are almost always far bigger than the answers written back. If a delegated call feels slow, the length of the answer it's asked for is worth cutting before the size of the file.
How it works
Four rules, enforced by the tool rather than left to good intentions: files are attached by path, never pasted into a prompt. Real line numbers get stamped in, so an answer can point back at a specific line. The input budget is derived from the context actually available, and an oversized request is refused outright instead of silently truncated by the server. Every call is logged, which is where the numbers above come from.
What it's not
This isn't a background agent, and it isn't a replacement for Claude on anything that needs real judgment or synthesis across sources. It's built for a narrow class of work: bulk reads, first-pass triage, structured extraction, mechanical summarizing. The kind of task where the answer doesn't need to be smart, just accurate.
How this stacks up against real usage
Every session transcript on this machine going back to 2026-08-06 adds up to 6,335 assistant turns, 2.17 billion prompt tokens, and 6.42 million output tokens. This is a heavy-usage account, and the delegation wrapper is about a week old, so its share of that was always going to start small.
Matching the two days the wrapper actually has call-log data for:
| Day | Local (ask_local.py) | Claude Code |
|---|---|---|
| 2026-09-04 | 46 calls, ~170K input tokens | 306.4M prompt tokens (707 turns) |
| 2026-09-05 | 9 calls, ~11K input tokens | 30.8M prompt tokens (147 turns) |
There are two honest ways to read that, and they don't agree. Against total prompt volume, local delegation is about 0.05% of it, a rounding error. But 304 of those 306 million tokens on 09-04 were cache reads: Claude Code replaying its own already-cached conversation history every turn, not new file content. That's the structural cost of a long agentic session, and it's not something local delegation competes with or could ever touch.
Against the category delegation actually displaces, fresh content added to context, the comparison is different: 2,305,074 tokens of fresh ingestion across the two days, versus 181,102 pushed to local instead. That's roughly 8% of new context diverted to a local model instead of paid context, measured against the baseline that's actually relevant.
Token counts aren't directly cost-comparable across categories: cached reads are billed at a steep discount against fresh input, so their huge share of the total-volume number overstates their share of actual spend. The 8% figure, measured against fresh ingestion, is the fairer read on whether this tool is doing its job.
In dollars, using Sonnet 5's actual published rates: 1,346,141 tokens priced as base input comes to $2.69. Priced as a 5-minute cache write, the more realistic comparison since Claude Code caches everything it reads, it's $3.37. Either way, it's a small number. At this account's current volume, the tool isn't cutting a meaningful dollar figure. What it's actually doing is keeping requests smaller and sessions further from their context ceiling, a real effect, just not one measured in dollars yet.
That estimate also undercounts the real effect: content Claude reads directly gets cached and re-billed at the cache-read rate on every later turn of the same session, so the true avoided cost compounds in a way this single-read estimate can't capture.
Sources
- The repo: github.com/DragonsBones/local-llm-delegate
- Ollama: ollama.com