3 min read

Portal saves up to 90% of Claude Code tokens

Claude CodePortalуправление контекстом

Spotify's Portal reduced average Claude Code token consumption by roughly 90% in bulk file-reading workflows. Its shunt plugin sends those operations to a smaller model such as Gemini 2.5 Flash, then returns a compressed result to the main agent. The key lesson is practical context management, not smarter coding.

Portal trims context before Claude ever sees it

What stands out here is not the number alone, but where Portal removes the cost: before the contents of large files enter Claude Code's context. In Spotify's engineering post, “Portal by Spotify cut my Claude Code token usage by 90%,” the average saving for bulk reads is estimated at roughly 90%.

Portal does not replace the main model or make it smarter. It acts as an intermediary layer: operations such as reading many files are delegated to a smaller model, for example Gemini 2.5 Flash, while Claude receives a compressed summary or the relevant excerpts. The primary agent keeps its context for planning, reasoning, and code edits instead of repeatedly absorbing raw text.

Routing is handled by the shunt plugin. The article includes the command claude plugin install shunt@portal, which illustrates the integration model: optimization is added as a plugin rather than as a new version of Claude Code.

At the time of the experiment, the figure applied mainly to bulk-read scenarios. That caveat matters: this is not a universal 90% reduction for every type of usage, but a result for tasks where an agent scans large files, rereads repository sections, or investigates a monorepo. Context management has its greatest impact precisely there.

The savings are real, but quality depends on routing

The practical benefit is genuine, though narrow: the expensive model stops acting like a file vacuum. Developers get a more compact context, while the main model spends its attention on work that actually requires strong reasoning.

The first thing I would test is not the overall savings percentage but information loss during compression. If the smaller model misses a configuration condition, a dependency between modules, or an important comment, Claude may reason confidently from an incomplete project map. The next checkpoints are clear: how accurately tasks are classified, how often files need to be read again, and whether the quality of final edits changes.

Code generation may have a different profile: the main agent does not always need to read every line of generated boilerplate. Portal therefore looks less like a magic Claude Code accelerator and more like a sound implementation of an old engineering principle: a strong model should not have to see everything. The unresolved question is no longer context size, but who decides what to discard and how reliably they do it.

We previously explored how parallel Claude Code agents can find race conditions in pull requests and keep model spending under control. That approach complements Spotify Portal's experience reducing token consumption in development.