September 6, 2026ToolCodingOpen Source

Spotify Cut Claude Code Tokens 90% by Giving It a Cheap Intern

A Spotify engineering post that hit the HN front page this weekend has the most replicable agent-cost number of the season: mean savings of about 90% on bulk file reading in Claude Code (https://engineering.atspotify.com/2026/9/portal-by-spotify-cut-my-claude-code-token-usage-by-90, by Dimitri Mazmanov, September 3). The trick is not a better model or a bigger cache. It is delegation: stop letting your most expensive model do the reading.

The setup runs on Portal, Spotify's internal platform whose AiKA Modes are declarative agents on ephemeral runtimes — Lambda-style, no infrastructure to manage. Two cheap modes do the grunt work on Gemini 2.5 Flash at temperature 0.2: a bulk-reader that digests piles of large files to answer a single question, and a code-writer that stamps out boilerplate, tests and configs by matching existing patterns. Claude keeps the reasoning and the editing; the intern does the I/O.

The enforcement detail is the part worth stealing. A PreToolUse hook physically intercepts any file read over 350 lines and blocks it — the harness does not ask Claude to please remember to delegate, it makes the expensive path impossible. Skills files tell the model when and how to hand off; bash wrappers handle the plumbing. The plugin, called shunt, is open source at https://github.com/sorantis/portal-ai-plugins.

This is the routing thread moving inside the loop. The past month's datapoints were per-request — pick a cheaper model, compile the agent away, or just talk less like caveman does (https://clauday.com/article/f7ff5033-a16b-4867-ad15-d51331bf92e1). Spotify routes per tool call: every read is a routing decision. Ninety percent was sitting in the file reads all along.
← Previous
Intelligence Index v4.2 Hides 40% of the Test From the Labs
Next →
Can AI Design a Circuit Board? EEBench Says 61.6% of One
← Back to all articles

Comments

Loading...
>_