Spotify open-sourced the Claude Code plugin that sends its big file reads to a cheaper model

Image: Spotify Engineering
Why it mattersThe expensive part of an agent session is often reading, not writing, and reading is the part you can hand to a smaller model without touching the code that gets produced.
Spotify published a plugin on 3 September that intercepts the large file reads a coding agent makes and sends them to a cheaper model instead. The post is by Dimitri Mazmanov, a principal product manager, and the code is on GitHub under Apache-2.0 as spotify/portal-ai-plugins.
The plugin is called shunt. It sits inside Claude Code and watches tool calls. When the agent tries to read a file above a size threshold, shunt catches the call and passes the work to a worker running a smaller model, which reads the file and returns structured bullet points. The agent gets the summary rather than the raw text.
The number, and what it covers
Spotify says the mean saving on bulk reads was around 90 percent compared with reading the files directly. That figure is theirs, measured on their own workloads, and it describes bulk reads specifically rather than a whole session.
The default threshold is 350 lines, and it is configurable. Below that, the post says delegation is counterproductive: the network round trip costs more than the tokens it saves. Delegated calls typically take 10 to 30 seconds to come back, and a single invocation is capped at 30 seconds.
What it deliberately does not do
Two jobs stay with the main model, and the post is direct about why.
Code editing is not delegated, because line numbers coming back inside a summary are unreliable and an edit applied at the wrong line is worse than no saving at all. Reasoning and debugging are not delegated either: the worker model missed a thread-safety bug during their testing, which is the kind of failure that only shows up later.
There is a second worker mode, code-writer, which generates boilerplate matching patterns already in the codebase. Anything large has to be split, because of the 30-second cap.
The split is worth reading as a design rule rather than a product limit. Reading is compression, and a small model can compress. Editing and debugging carry the risk, and the risk stays where the capable model is.
The cost background
The post cites figures for what teams are currently spending: 200 to 500 dollars per developer per month, with some above 2,000. It also repeats an industry projection that AI coding costs will pass the average developer salary by 2028. Those are the article's framing numbers, and the projection is a forecast rather than a measurement.
Most cost advice points at the model you pick or the prompt you send. This points at something else: the volume of file content an agent pulls into context before it does anything useful. That volume is largely mechanical, and mechanical work is the kind you can move.
Adopting it means accepting a second model in the loop and a summary where you used to have the file. Whether that trade holds depends on how much of your agent's context is bulk reading, which is a number you can measure on your own sessions before installing anything. The repository had 73 stars when checked, so this is early code from a large engineering team rather than a widely adopted tool.
Source
- Portal by Spotify cut my Claude Code token usage by 90%, Spotify Engineering, 3 September 2026
- spotify/portal-ai-plugins, Apache-2.0
Source: Spotify Engineering
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually shipping with them. Short, and only when there is something worth reading.
