Repository spotlight · Cost & Performance · 2 min read
Let your coding agent delegate the file reading
Start with the work your agent repeats: reading large files, following existing test patterns and generating configuration. Spotify’s shunt moves selected work to a worker model through Portal’s AiKA modes.
Open Spotify’s repository ↗What Spotify measured
Spotify reported roughly 90% mean savings on bulk-read tokens in its Java-monorepo benchmark. That measures the reads it delegated, not a 90% reduction in the whole engineering token bill.
| Task | Before | After | Saved |
|---|---|---|---|
| One large file | 33,684 | 5,737 | 82% |
| Source and test files | 75,990 | 4,148 | 94% |
| Several services | 16,221 | 821 | 94% |
Publisher-reported bulk-read token counts. Percentages are reproduced as reported; the first row works out to about 83% from the displayed counts. AgentBay has not rerun this benchmark.
How the work moves
- 01
Claude Code chooses
A hook redirects large full-file reads. Targeted reads still go through.
- 02
A worker handles the I/O
bulk-reader returns a focused answer. code-writer can write a file from a spec and reference.
- 03
Review the result
Keep debugging and architecture decisions with the main agent. Inspect changes and run the relevant checks.
Set it up
You need Claude Code, jq and access to a Portal instance with AiKA enabled. Install the marketplace and both plugins:
claude plugin marketplace add spotify/portal-ai-plugins
claude plugin install portal@portal
claude plugin install shunt@portalStart a new Claude Code session and run /portal:setup. Check that your Portal instance has bulk-reader and code-writer modes. Create or customize them using the repository instructions if needed.
The Portal plugin supports several coding agents. Shunt itself is currently documented for Claude Code.
Try it on one ticket
For a CSV-import ticket, start with a bounded question: ask the agent to locate the existing parser, validation rules and import tests. Use a targeted read before changing a function. If generating a routine test file, provide a nearby test as the reference. Review the diff before accepting it.
Try one representative ticket. Record main-model tokens, worker usage, elapsed time, retries and review fixes. Compare the total cost of completing the ticket, including the worker. Keep routing only where it improves that result.
The examples in Spotify’s post used Gemini 2.5 Flash. Your configured worker model, repository and workload determine the result. Delegated files are sent through your Portal instance to its configured model provider; use your team’s approved configuration.