How Spotify runs 5-10 AI agents in parallel on a 20-million-line monorepo
Spotify’s AI agent setup: 5-10 Claude sessions in tmux, one per git worktree, on a 20-million-line monorepo. 73% of all Pull Requests are AI-assisted.

Luca Di Domenico
· 3 min read

In short
Niklas Gustavsson, VP of Engineering at Spotify, described his setup in an interview with Boris Cherny, creator of Claude Code: 5-10 Claude sessions open at the same time in tmux, one per git worktree, on a backend monorepo with over 20 million lines of code. The numbers: 73% of Pull Requests are AI-assisted, PR frequency is up 75%, around 4,500 production deploys per day, and 99% of engineers use AI tools every week. Behind it sits infrastructure built over years: Backstage, Fleet Management with Fleetshift, an LLM-as-judge system that took the success rate of agent-generated PRs from 20-30% to around 80%, and Honk, a proprietary agent built with the Claude Agent SDK.
5-10 AI agents in parallel on a 20-million-line monorepo: Spotify’s tmux + git worktree setup
The setup: 5-10 Claude sessions in tmux, one per git worktree
How do people actually work with AI agents at enterprise scale?
The explanation comes straight from Niklas Gustavsson, VP of Engineering at Spotify.
In an interview with Boris Cherny, creator of Claude Code, he described his setup:
- 5-10 Claude sessions open at the same time in tmux
- one session for each git worktree
- agents left working in the background
- all inside a backend monorepo with over 20 million lines of code
He expected problems. Instead, by his own account, it works surprisingly well.
The numbers: 73% of PRs AI-assisted and 4,500 deploys a day
Spotify’s numbers are impressive:
- 73% of Pull Requests are AI-assisted
- PR frequency has increased by 75%
- around 4,500 production deploys per day
- 99% of engineers use AI tools every week
Setup and numbers come from the video interview published by Anthropic on June 29, 2026 and from the Spotify Engineering post of June 3, 2026.
I use the same pattern on a much smaller scale: AI agents on analysis, development, testing, and documentation, with technical control and the decisions always mine. It’s how I run custom software projects for companies.
The infrastructure behind the results
But it takes more than installing Claude Code to get these results.
Over the years, Spotify has built an infrastructure that makes the codebase understandable, standardized, and easy to modify.
1. Backstage
Backstage is the open source Internal Developer Portal created by Spotify.
It centralizes in a single interface:
- services, libraries, pipelines, and websites
- component ownership
- dependencies
- documentation
- system health status
In practice: instead of hunting for information across Slack, wikis, GitHub, and other tools, developers and AI agents can find everything in one place.
Why does it matter in the context of AI?
It provides standardization and structured context for the codebase. AI agents (like Claude) work much better when the code is consistent and well described.
2. Fleet Management and Fleetshift
Fleet Management is Spotify’s philosophical and technical approach to managing software at the “fleet” level (fleet = the set of all components), instead of component by component.
Fleetshift is the concrete tool that turns this vision into reality. What does it do exactly? It makes it possible to apply code changes across thousands of repositories at the same time.
Typical examples:
- Updating a dependency (e.g. a library) across hundreds of services
- Running complex migrations (e.g. from Java AutoValue to Records, framework upgrades, etc.)
- Applying security fixes or large-scale refactorings
Operations that used to take months can now automatically generate Pull Requests ready for review or, in some cases, for auto-merge.
3. LLM-as-judge
Every Pull Request is also analyzed by an AI model.
Thanks to this system, the success rate of agent-generated PRs went from 20-30% to around 80%.
4. Honk
Spotify has also developed Honk, a proprietary AI agent built using the Claude Agent SDK.
What really matters in 2026
The most important lesson?
In 2026 the real advantage comes above all from everything built around the AI agents: standardization, documentation, ownership, automation, and control systems.
Sources
- How Spotify runs agents across 20M+ lines of code, with Niklas Gustavsson — Boris Cherny interviews Niklas Gustavsson, Anthropic, June 29, 2026: 5-10 tmux sessions one per git worktree, 73% of PRs AI-assisted, +75% PR frequency, around 4,500 deploys per day, 20M+ line monorepo, agent PR success rate from 20-30% to 80% with LLM-as-judge
- Coding Is No Longer the Constraint: Scaling Developer Experience to Teams and Agents at Spotify — Spotify Engineering, June 3, 2026: more than 99% of engineers use AI coding tools every week; Honk runs Claude using the Claude Agent SDK
- Backstage — An open source framework for building developer portals — Official site of the open source project created by Spotify: service catalog, ownership, dependencies, and documentation in a single interface
- Fleet Management at Spotify (Part 3): Fleet-wide Refactoring — Spotify Engineering, May 2023: how Fleetshift applies code changes across thousands of repositories, generating automated Pull Requests
- 1,500+ PRs Later: Spotify’s Journey with Our Background Coding Agent (Honk, Part 1) — Spotify Engineering, November 2025: Honk, Spotify’s proprietary background coding agent
Want to know what this means for your product?
If you're building software with AI and want a second opinion on how you're working, tell me about your project.
Related articles
Keep reading
Fable 5 found the cause of a year-long revenue drop with an SEO audit
Read: the SEO audit with Fable 5