Spotify's Shunt Cuts Claude Code Token Costs by ~90% via Model Routing
Spotify's engineering team publicly shared its internal Claude Code configuration and a plugin called Shunt, claiming a 90% reduction in token consumption, validated on a Java monorepo. The core insight: most of a coding agent's work is I/O—reading files, generating templated tests, updating docs—not reasoning, yet it was all being fed to an expensive frontier model. The 90% savings come from engineering routing rules rather than model breakthroughs.
Confirmed
- Spotify's engineering blog post (linked in m6, also relayed by m5) explains the motivation: most agent consumption is I/O rather than reasoning, citing industry projections that AI coding costs will exceed average developer salaries by 2028 and that a quarter of engineering leads already pay substantial monthly bills.
- Per @aliscodes and @krishnan, Shunt acts as a pre-tool hook that intercepts Claude Code tool calls: non-targeted reads exceeding 350 lines are routed to two cheap auxiliary models instead of Claude reading them itself; @RexDouglass notes the routing target is a cheap Gemini worker.
- Per @RexDouglass, the internal tool Portal uses model routing and measured 90% lower token overhead on a Java monorepo.
- @krishnan argues the 90% savings stem from routing rules, not model breakthroughs.
Why it matters
- It demonstrates a path to drastically cut agent costs by offloading I/O-heavy tasks through engineering, without swapping the main model—directly applicable to teams using Claude Code heavily.
2026-09-07 ~ 2026-09-08 · 6 related posts
Primary sources
- Spotify engineer's Claude Code hook cuts token spend 90% by rerouting big file reads to Gemini — RexDouglass · 2026-09-07
- [source] Spotify cut Claude Code token usage by 90% by routing big file reads to cheap models — aliscodes · 2026-09-07
- [source] Spotify details the Portal mode setup that cut Claude Code token usage by 90% — aliscodes · 2026-09-07
- Spotify details internal Claude Code setup that cut token usage by 90% — SumitGup · 2026-09-08
- [source] Spotify cut Claude Code tokens 90% with a 350-line routing rule, not a model breakthrough — krishnan · 2026-09-08
- Spotify cut Claude Code token usage by 90% with a cheap-model router — unixterminal · 2026-09-08