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

Image: Spotify Engineering
Why it mattersThe expensive part of an agent session is often reading, not reasoning, and that part can be moved to a cheap model without changing which model writes the code.
Spotify published an engineering post on 3 September describing shunt, a Claude Code plugin that intercepts large file reads and sends them to a cheaper model instead. Dimitri Mazmanov, a principal product manager at Spotify, wrote that "mean bulk-read savings were around a whopping 90%", measured as the tokens Claude would have spent reading files directly against the tokens in the summary it received back.
How the interception works
The plugin uses a pre-tool-use hook. When Claude Code is about to read a file over a size threshold, the hook catches the call and routes it to what Spotify calls an AiKA Mode: a declarative agent running on a short-lived runtime, configured with its own instructions, its own model and its own tools. Two modes are public, a bulk-reader and a code-writer, and they run on cheaper models such as Gemini 2.5 Flash.
The default threshold is 350 lines, and it is configurable. Spotify caps a Portal invocation at 30 seconds.
What the post says it does not do
The post is unusually direct about the limits, and they are the useful part.
Editing cannot be delegated, because the line numbers that come back in a summary are not reliable enough to patch against. Reasoning cannot be delegated either: Spotify says the cheaper worker model missed subtle bugs that the frontier model caught. And responses typically take 10 to 30 seconds, so pushing a small file through the hook costs more in waiting than it saves in tokens.
That leaves a narrow job. Read a lot, summarise it, hand the summary up.
The cost figure behind it
Spotify frames the work against a number it attributes to engineering leaders rather than to its own billing: a quarter of them already spend $200 to $500 per developer per month on tokens, and some are well past $2,000. Treat that as the company's own framing, since the post does not name the survey it came from.
Availability
The plugins live in the spotify/portal-ai-plugins repository on GitHub under Apache-2.0, and the repository shows 65 stars. Shunt is Claude Code only for now. Portal itself is Spotify's own platform and is not open source, so the plugin needs a Portal instance behind it. That is the real adoption cost, and it means most teams cannot install this and get the saving.
The pattern is portable even when the implementation is not. A pre-tool-use hook is a standard extension point, and the idea underneath it is that an agent session has two different kinds of work in it that people currently pay one price for. Pulling six files into context to find out where a function is defined does not need the model that writes the patch. Splitting the two is a routing decision a team can make itself, and Spotify has now put a measured number on what that split is worth.
The 90% figure covers the reads that were intercepted, not a whole session, so a team's total saving depends on how much of its agent time is spent reading. Worth measuring before assuming it transfers.
Source
- Portal by Spotify cut my Claude Code token usage by 90%, Spotify Engineering, 3 September 2026
- spotify/portal-ai-plugins, GitHub
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.
