Hacker News
Spotify Open-Sourced a Hook That Intercepts Claude Code File Reads Over 350 Lines and Cut Token Use ~90%
Spotify engineering published a shunt plugin that intercepts Claude Code reads of files longer than 350 lines and delegates them to cheaper models running as AiKA Modes on Spotify's Portal platform, returning summaries instead of raw file contents. Measured against bulk-read operations on a Java monorepo across four scenarios, it cut tokens Claude consumed by roughly 90%. The plugin is public at spotify/portal-ai-plugins and ships two modes, bulk-reader and code-writer; the tradeoff is 10 to 30 seconds of latency per delegation against a 30-second invocation cap, so it is not worth using on small reads.
↳ Follow the thread