A Spotify engineer described cutting Claude Code's token usage on certain tasks by about 90% using Portal, an internal platform for running lightweight agents on ephemeral infrastructure. The platform runs declarative agents called AiKA Modes, according to a post on Spotify's engineering blog.
Instead of sending every task to an expensive frontier model, Portal routes specific work patterns to cheaper, specialized models, Gemini 2.5 Flash in the examples given. A bulk-reader mode handles I/O-heavy work such as reading many large files to answer one question, returning structured analysis that Claude never directly consumes. A code-writer mode generates boilerplate, tests and configuration files that bypass Claude entirely and write straight to disk, the post said.
The routing runs through three layers: hooks, Claude Code plugins that intercept tool calls and automatically delegate files over 350 lines; scripts, bash wrappers that invoke the Portal command-line tool; and skills, markdown documentation that tells Claude when and how to delegate, according to the post.
"Mean bulk-read savings were around a whopping 90%," the post said, because the corpus goes to the worker model and never enters Claude's context.
Token cost scales with what enters a model's context window, not just what it outputs. An architecture decision made before the model is ever called can matter more than which model gets picked.