Productivity

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

September 5, 2026 at 12:15 PM PT

Spotify Portal illustration accompanying the token usage article

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

Source: Spotify Engineering

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

More from AI News

Spotify routed bulk file reads away from Claude Code and reports about 90% fewer tokens

Spotify published a Claude Code plugin called shunt that intercepts large file reads and hands them to a cheaper model, and reports mean savings of about 90% on those reads.

Dev tools

Spotify's Claude Code plugin blocks big file reads and sends them to a cheap model instead

Spotify published a Claude Code plugin that intercepts reads of files over 350 lines and routes them to a cheaper worker model, reporting mean savings of around 90 percent on bulk reads in its own tests.

Productivity

Spotify measured 90% fewer tokens by sending bulk file reads to a cheaper model

Spotify says routing large file reads away from Claude Code to a cheaper worker model cut token use by about 90% on average, tested against a Java monorepo across four scenarios.

Productivity