Dev tools

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

September 5, 2026 at 9:05 AM PT

Illustration from Spotify's engineering post about Portal

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

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 open-sourced the Claude Code plugin that sends its big file reads to a cheaper model

Spotify published a Claude Code plugin that intercepts large file reads and routes them to a cheaper worker model, and says the mean saving on bulk reads was around 90 percent.

Productivity

Spotify moved file reading off Claude Code to a cheap model and measured about 90 percent fewer tokens

Spotify published a Claude Code plugin that blocks large file reads and sends them to a cheaper worker model instead, and reports a mean saving of around 90 percent of tokens on that work.

Productivity

Spotify published a Claude Code plugin that blocks large file reads and sends them to a cheaper model

Spotify released a Claude Code plugin called shunt that intercepts reads of files over 350 lines and routes them to a cheaper worker model, and reports mean savings of around 90 percent on bulk reads across a Java monorepo.

Dev tools