Dimitri Mazmanov, Principal Product Manager at Spotify, published on September 3, 2026 on the company's engineering blog an account of a setup that reportedly cuts his token consumption in Claude Code by 90%. His starting observation: most of what a coding agent does for him is not reasoning but I/O — reading five files to answer a question about a method, generating a test file identical to the twenty neighboring ones. This work is sent to an overqualified frontier model, when a cheap model would handle it just as well.

The solution relies on Portal by Spotify's AiKA Modes: declarative agents run on an ephemeral runtime, defined by instructions, a model, parameters, and MCP tools, with no infrastructure or API keys to manage. The author creates two public modes running on Gemini 2.5 Flash. The first, bulk-reader, reads a batch of files and responds in structured bullet points. The second, code-writer, generates code from a specification and a reference file whose conventions it must reproduce.

Most of what an AI coding agent does for me isn't thinking. It's I/O

— Dimitri Mazmanov , engineering.atspotify.com

Routing is handled by a Claude Code plugin called shunt, after the failure of a first version based on rules written in CLAUDE.md, which the model could ignore and which had to be copied into each project. The plugin stacks three layers. PreToolUse hooks block file reads beyond a configurable line threshold, as well as cat, head, or tail commands on large files; targeted reads pass through. Bash scripts wrap calls to the Portal CLI, build the request, and report back token usage. Skill files tell Claude when and how to call these scripts. The corpus moves to the secondary model without ever entering Claude's context, which also never sees the generated code, written directly to disk.

The measurements are presented as an average saving of about 90% across four scenarios tested against a Java monorepo, with the author acknowledging that the generation scenario is hard to measure. One section details what doesn't work: editing is not delegable for lack of reliable line numbers, nor is reasoning — the secondary model missed a thread-safety bug that Claude spotted immediately — and each delegation costs ten to thirty seconds of latency, which makes it counterproductive on small files.

The author concludes that token savings are only a starting point: the real value of the modes is turning model routing into a configuration problem rather than a systems engineering one.