Spotify's Portal cuts Claude Code token usage by 90%
Original: Portal by Spotify cut my Claude Code token usage by 90%
Why This Matters
Demonstrates a practical, infrastructure-free method to significantly cut enterprise AI coding costs as token expenses scale.
Spotify Engineering published a post detailing how 'Portal by Spotify' reduced Claude Code token consumption by 90% using a two-mode agent routing system built on the AiKA Modes feature, delegating I/O-heavy tasks to cheaper models like Gemini 2.5 Flash.
Spotify Engineering has published a technical post describing how engineers reduced Claude Code token usage by 90% using Portal by Spotify's AiKA Modes feature. The core insight: most of what AI coding agents do is I/O — reading multiple files, generating boilerplate code, updating docs — work that doesn't require a frontier model's reasoning capabilities. By 2028, AI coding costs are projected to exceed the average developer's salary, and a quarter of engineering leaders already spend $200–$500 per developer monthly on tokens.
The solution required no new infrastructure. Engineers created two declarative 'Modes' in Portal — ephemeral agent runtimes described as 'AWS Lambda for agents.' Mode 1, 'bulk-reader,' handles large file reads for code analysis using Gemini 2.5 Flash at temperature 0.2, outputting structured bullets only. Mode 2, 'code-writer,' generates boilerplate code matching existing patterns, outputting only raw code with no markdown or prose. A Claude Code plugin called 'shunt' enforces routing via PreToolUse hooks, intercepting file reads above a size threshold or bulk write operations and delegating them to Portal's CLI before the frontier model is ever invoked, eliminating the advisory-only limitation of earlier CLAUDE.md rule-based approaches.