Spotify cut Claude Code tokens 90% with a 350-line routing rule, not a model breakthrough
krishnan · x · 2026-09-08
krishnan breaks down how Spotify achieved 90% token savings in Claude Code via routing, not modeling: its Shunt plugin acts as a pre-tool hook that intercepts tool calls—untargeted reads over 350 lines are blocked and rerouted to a cheaper worker model via Portal, while targeted reads still reach Claude and predictable code generation writes straight to disk without consuming context.
The key insight: asking a model to route itself is a suggestion, but a pre-tool hook is an enforced economic policy—reserving expensive reasoning for debugging, architecture, and other judgment-heavy work.
Caveat: the reported 90% is mean bulk-read token savings across four scenarios in a Java monorepo, not a 90% cut in total engineering cost, and delegation adds 10–30 seconds of latency.
Related event: Spotify's Shunt Cuts Claude Code Token Costs by ~90% via Model Routing(6 posts)→
More from coding & agent
- Indie dev's agent tracks 519 directories, 311 submitted for SEO backlinks — fekdaoui · 2026-10-23
- ScienceClaw Hackathon at MIT Media Lab to build decentralized AI agent collectives for science — ProfBuehlerMIT · 2026-10-23
- What should a native agent harness handle beyond tool calling? — Glittering812 · 2026-10-23
- Running ~100 DeepSeek v4.1 flash agents in parallel for under $20/month — zack_overflow · 2026-10-23
- MCP's stateless 2026-07-28 spec drops session-id — how are stateful tools adapting? — Stock-Pumpkin-8859 · 2026-10-23
- Dev adds local MCP server to Mac screenshot app so Claude designs from your references — Embarrassed-Ebb-740 · 2026-10-23