Check what share of your bill it covers
If you run Claude Code and have seen Spotify’s 90% saving going round LinkedIn, this is for you. I run it all day, so I went through four weeks of my own transcripts to see what it would do for me, and it would save me less than 1%.
Spotify’s engineering blog has a post called “Portal by Spotify cut my Claude Code token usage by 90%”, and it’s been going round LinkedIn as Spotify cutting its Claude Code bill by 90%.
The 90% is real, but it applies to something that makes up 0.9% of my spend, and that second number is the one worth checking before you install anything.
So before you install a saving, find the share of your own spend it applies to. The script near the end of this page does that for Claude Code.
Ask what the headline percentage measured
The plugin is called shunt, and the idea is a good one. A hook stops Claude reading a whole file over 350 lines.
A cheaper model (Gemini 2.5 Flash in the post) reads the file instead and sends back a short answer, so the file never enters Claude’s context.
To be fair to Spotify, the post doesn’t say the company’s bill fell by 90%. It’s one product manager, Dimitri Mazmanov, writing up his own testing on a 162,000-line Java monorepo, and the title says “my”.
He’s upfront about the limits as well. The cheaper model “missed a subtle thread-safety bug”, so debugging, architecture and safety-critical code stay with Claude.
Where I’d push back is the headline. The 90% is “mean bulk-read savings”, the average of three file-reading tests, and “token usage” is a much bigger claim than that.
So I ask two things of any percentage: what it was measured on, and whether it comes with a whole-session or dollar figure. This one came with neither.
Count the big reads in your own transcripts
I replayed four weeks of my own transcripts to see what the hook would have caught, charging each big read for every call that carried it.
Those 644 reads averaged 12 cents each. At 90% off, each would save about 11 cents, in exchange for a call Spotify says typically takes 10 to 30 seconds.
Tool output as a whole is nearly a quarter of the bill, but 62% of my Read calls already ask for a line range, which the hook lets through by design.
More than half of the big reads, 365 of the 644, were test files and diffs, which is the code you read to check the work. A size limit can’t tell those from a generated file, and a summary is a poor thing to review from.
Brief your agents and budget their calls
I went in expecting to put the low 0.8% down to how I run my agents, and the data only half agrees.
One agent plans and reviews while others do the work, so the planner barely opens files: 17 big reads in 72,638 calls.
The rest comes from a few habits I’ve built up over the last few months.
The best evidence for them is one bad week, when a fleet of agents ran with no briefs and no budget and big reads hit 2.1% of spend.
My ordinary sessions spoil the story a bit: with no planner, no briefs and no budget, big reads came to 0.7% over the same four weeks.
So the setup helps, I’d guess by about half, though that’s comparing different work.
The part I’d copy either way is the hook. Spotify found what I found, that rules in CLAUDE.md are “advisory, not enforced”, and a hook is what makes the rule stick.
Shrink what agents carry, not what they read
The plainer reason shunt wouldn’t save me much is that whole reads of big files were never much of my bill. Just over half of my spend is cache reads, which is the cost of sending everything an agent is carrying on every call.
The average call carried 179,000 tokens, so the size of that load matters far more than any one file in it.
That’s why my effort has gone into what agents carry rather than what they read.
Replacing compaction with a fresh start has cut one agent’s restart from about 145,000 tokens to 78,000, and its cost per call by about 9% so far, though that test isn’t finished.
How far to trust it
Copy this script to check yours
Shunt does need a Portal instance with AiKA enabled, so most people would be copying the idea rather than installing the plugin. Measure first either way.
This script reads your local transcripts, sends nothing anywhere and prints the share.
It’s rougher than my full analysis and reads a little high: 1.2% to 1.5% on my machines, against 0.8% to 0.95% with proper pricing.
#!/usr/bin/env python3
"""How much of your Claude Code context came from whole-file reads over 350 lines?"""
import glob, json, os
LIMIT, CHARS_PER_TOKEN = 350, 2.3
USAGE = "input_tokens", "cache_read_input_tokens", "cache_creation_input_tokens"
home = os.path.expanduser("~/.claude/projects")
sent = big = reads = 0
def settle(found, calls):
"""A read is sent again on every call until its context ends."""
global big, reads
big += sum(tokens * (calls - at) for at, tokens in found)
reads += len(found)
for path in glob.glob(f"{home}/*/*.jsonl") + glob.glob(f"{home}/*/*/subagents/*.jsonl"):
calls, found, wanted, seen = 0, [], {}, set()
for line in open(path, errors="replace"):
try:
record = json.loads(line)
except ValueError:
continue
if record.get("subtype") == "compact_boundary":
settle(found, calls)
calls, found = 0, []
message = record.get("message") or {}
blocks = message.get("content")
for block in blocks if isinstance(blocks, list) else []:
if block.get("type") == "tool_use" and block.get("name") == "Read":
wanted[block["id"]] = block.get("input") or {}
if block.get("type") == "tool_result" and block.get("tool_use_id") in wanted:
asked = wanted[block["tool_use_id"]]
text = json.dumps(block.get("content"))
whole = not (asked.get("offset") or asked.get("limit"))
if whole and text.count("\\n") > LIMIT:
found.append((calls, len(text) / CHARS_PER_TOKEN))
usage = message.get("usage")
if usage and message.get("id") not in seen:
seen.add(message.get("id"))
calls += 1
sent += sum(usage.get(key, 0) for key in USAGE)
settle(found, calls)
print(f"{reads} whole-file reads over {LIMIT} lines")
print(f"{100 * big / max(sent, 1):.2f}% of the tokens you sent were those reads")If that prints under a couple of percent, I’d leave your setup alone. If it’s well above that, shunt or a home-made version is worth a look.
How I measured it
Claude Code keeps a transcript of every session, with the tokens used by each model call and the full text of every tool result. That’s enough to replay what the hook would have caught.
A percentage saving only means something next to the share of the bill it applies to. Ask for both numbers, mine included.