Spotify's Trick That Cut Claude Code Token Usage by 90%
It blocks Claude from reading any file over 350 lines.
Spotify published a plugin that stops Claude Code from reading your files. Not throttles. Blocks. Two hooks sit in front of every read, and if a file is longer than 350 lines the read does not happen.
Dimitri Mazmanov, a principal product manager at Spotify, reported the result on the company's engineering blog on 3 September: mean savings of around 90% on bulk reads across a Java monorepo. The plugin is called Shunt and it is open, inside spotify/portal-ai-plugins, which now has about 3,200 stars.
The number is real and the mechanism is simple. Whether it does anything for you is a different question, and it has an answer further down that is worth more than the 90%.
What it actually does
The argument underneath is that most of what an agent spends is not thinking. It is carrying. Reading forty files to answer one narrow question, or generating boilerplate that already exists three directories over. That traffic is input and output, not reasoning, and it is billed the same as reasoning.
So Shunt moves the carrying somewhere cheaper. A worker model reads the files and hands back a structured summary, and the raw file contents never enter Claude's context at all. For generated code the output goes straight to disk, and Claude never sees that either.

From the public repo, spotify/portal-ai-plugins, captured 11 November 2026.
The enforcement is the design decision worth stealing. The routing is not a suggestion in a prompt that the model may follow when it feels like it. It is a hook that refuses the tool call. Spotify did not ask Claude to be frugal. They made the expensive path unavailable.
Then someone else ran it
Aakash Gupta tried the same plugin on his own repositories and published the numbers on 10 November. On Apache Commons Lang he measured cost cuts of 76% and 87%, in the same territory as Spotify. On his own repositories of about 78,000 lines, the hook cost him more than not using it.
That is the useful result, and it is the one the headline number buries. His own conclusion is the honest version: Spotify's 90% is real for teams whose Claude reads whole files.
What Spotify says it cannot do
The post is unusually clear about its own limits, which is why it is worth reading rather than repeating.
Editing cannot be delegated. Summaries do not carry reliable line numbers, so Claude still has to read the relevant section itself before changing it. That is why targeted reads with an offset and a limit are deliberately allowed through.
Reasoning cannot be delegated. The worker model missed a subtle thread-safety bug that Claude caught quickly. Debugging, architectural decisions and safety-critical code are kept off the routing path on purpose.
It is slower. Each delegation takes roughly 10 to 30 seconds, and an invocation is capped at 30 seconds, so a large generation has to be split. Small reads are slower delegated than done directly, which is the entire reason the 350-line threshold exists.
What to do with this
Do not install it and expect 90%. Measure your own read profile first, because that is the variable the result actually turns on. If your agent routinely swallows whole files to answer narrow questions, the ceiling is high. If it already reads in targeted slices, there is close to nothing to win and the extra hop will cost you.
The transferable idea is not the plugin. It is that the cheapest token is the one that never enters the context, and that you enforce it in a hook rather than request it in a prompt. It is the same lesson as a model that bills $1 or $100 per million tokens depending on one setting, and the same discipline behind a team whose usage rose while its bill fell.
Route reads, not reasoning.




