Spotify's Honk coding agent automates fleet-wide migrations
Spotify replaced hand-written migration scripts in its Fleet Management system with Honk, a background coding agent on Claude that edits code, checks its own work and opens pull requests.
SpotifySwedenEntertainment and gamingScaled
- Scale
- 1,000 merged pull requests every 10 days
- Scenario
- Large-scale code migration
- Business function
- Software engineering
- Kind of solution
- Software engineering assistant
- Who built it
- Built in-house (Anthropic)
- Where it runs
- Public cloud
- Human oversight
- People approve each output
- Organization
- Enterprise
- AI types
- Generative AI, Agentic AI, Conversational AI
- Users
- hundreds of developers
tl;drHonk merged 1,000 pull requests every 10 days and ran a Java migration in three days.See the results
Spotify uses Honk, a background coding agent built on Anthropic’s Claude Agent SDK, to run large-scale code migrations across thousands of repositories5. Honk replaces the hand-written transformation scripts of Spotify’s Fleet Management system with an agent that takes a prompt, edits each repository and opens a pull request1.
In March 2026, Spotify engineers told QCon London that Honk reached 1,000 merged pull requests every 10 days, against 1,000 in three months half a year earlier4. Teams saw a total time saving of 60–90% against writing migrations by hand1. In September 2026, Spotify’s quality review cited a Java migration across its backend services that agentic changes completed in three days6, 7.
Before the deployment
Fleet Management is Spotify’s framework for applying code transformations across all of its repositories. Small scripts modify source code and open pull requests against thousands of software components1. It merged more than 2.5 million automated maintenance PRs, most of them without a person in the loop5.
The scripts handled dependency bumps, configuration changes and simple refactors, but complex changes needed rare expertise:
- Spotify’s production codebase grew seven times faster than its number of engineers, and migrations were the number one source of developer frustration5.
- Scripted migrations cut timelines from nearly a year to under a week for 70% of the fleet, but the remaining 30% stalled on edge cases4.
- The Maven dependency updater alone grew to over 20,000 lines of code1.
- Only a few teams had the expertise and time to write more complex fleet-wide changes1.
In February 2025, Spotify began investigating AI agents inside Fleet Management, so that engineers could define fleet-wide changes in natural language1.
What was built
Honk takes a migration prompt, edits one repository at a time, checks its change against the repository’s own build and tests, and opens a pull request when the checks pass3, 4. Fleet Management keeps targeting repositories, opening pull requests, getting reviews and merging into production as before1.
- Honk agent: Reads the relevant codebase, edits files and calls verifiers as tools. It can’t push code or talk to users3.
- Fleetshift: Identifies the target repositories, schedules the changes and tracks progress for the people running a migration5.
- Verifiers and the judge: Run formatting, builds and tests, and compare the diff with the prompt before a pull request opens3.
- Engineers: Write the migration prompt and review and merge the pull requests. Migration drivers can approve their own pull requests1, 4.
- Surrounding infrastructure: Pushes code, talks to users on Slack and helps author prompts, outside the agent3.
The same agent takes ad hoc tasks. Engineers start them from Slack or GitHub Enterprise, where an interactive agent gathers the details and hands a prompt to Honk1. Engineers can start code changes from Slack threads that hold dashboards, logs and Jira links4.
“As a concrete example, an engineer at Spotify on their morning commute from Slack on their cell phone can tell Claude to fix a bug or add a new feature to the iOS app”
Alternatives considered
- Open source agents: Spotify tried Goose and Aider first, but they didn’t reliably produce mergeable PRs across thousands of repositories2.
- A homegrown agentic loop: Spotify’s own loop on LLM APIs capped each task at 10 turns per session, three session retries total. It often ran out of turns on multi-file changes2.
- Dynamic MCP tools for context: Spotify chose large static prompts, because they can be version-controlled and tested, while more tools add unpredictability2.
Rollout
Spotify codeveloped the tooling with early adopters on their in-flight migrations1. Honk v2, announced in June 2026, introduces shared agent sessions, team projects, and agent orchestration through Chirp5.
Technology and architecture
Honk is Spotify’s background coding agent. It runs Claude through the Claude Agent SDK inside Spotify’s own harness, in Kubernetes pods that let many sessions run at once5. Spotify switched to Claude Code because it takes task-oriented prompts and manages to-do lists and subagents2.
| Layer | What they used | Role | Source |
|---|---|---|---|
| Language model | Claude | Reads the prompt and the repository and writes the change | 5, 7 |
| Task agent | Claude Agent SDK | Runs the Claude Code agent loop inside Spotify’s harness | 2, 5 |
| Solution platform | Honk | Background coding agent and the CLI that wraps it | 1, 5 |
| Workflow engine | Fleetshift | Picks targets, schedules changes and tracks pull requests | 5, 7 |
| Tools and actions | Model Context Protocol (MCP) | Exposes the verify tool and a restricted Git tool to the agent | 1, 2, 3 |
| Guardrails | Verifiers | Run format, build and test checks and return short errors | 3 |
| Checker model | LLM judge | Vetoes diffs that go beyond the prompt | 3 |
| APIs and connectors | Verification service | Runs CI builds on Honk’s pushed branches | 4 |
| Compute and servers | Kubernetes | Runs agent sessions in sandboxed pods | 3, 5 |
| Chat interface | Slack | Lets engineers start tasks from a thread | 1, 4, 5 |
| Monitoring | MLflow | Captures the traces of agent sessions | 1 |
The agent gets three tools: a verify tool, a Git tool that never pushes or changes origin, and Bash with a strict allowlist of commands2. Each verifier activates by what a repository holds. A Maven verifier, for example, activates when it finds a pom.xml file3.
Data inputs
- Repository code: The relevant codebase of each target, which the agent reads and edits3.
- Migration prompt: A static, version-controlled prompt with preconditions and a handful of concrete code examples2.
- Slack threads: Dashboards, logs and Jira links from which an interactive agent drafts a prompt for an ad hoc task1, 4.
- Build and test output: Cut down by the verifiers to the most relevant error messages3.
Integrations
- GitHub Enterprise: Honk pushes branches and opens pull requests, and engineers can start tasks there1, 4.
- Verification service: Abstracts Spotify’s CI systems and runs builds on each pushed branch across operating systems4, 5.
- Slack: Engineers mention Honk mid-conversation, and Honk returns a pull request5.
- Google Cloud Platform (GCP) and MLflow: The internal CLI uploads session logs to GCP and captures traces in MLflow1.
How one migration change flows through the system
- A migration driver writes a prompt for a change, such as replacing Java value types with records1. Fleetshift picks the target repositories and schedules the sessions5.
- Honk starts a session for one repository in a sandboxed container. It can see the relevant codebase and nothing more3.
- Claude edits the files and calls the verify tool. The verifiers return short error messages until the format, build and test checks pass3.
- When the agent tries to finish, the Claude Code stop hook runs every relevant verifier. A failed verifier stops the pull request3.
- The LLM judge compares the diff with the original prompt and vetoes changes outside the instructions3.
- Honk pushes the branch, and the verification service runs the full CI build4.
- Honk opens the pull request only after full validation. The owning team reviews and merges it, and Fleetshift shows which pull requests need attention4, 5.
Results
| Metric | Before | After | Scope and timeframe | Reported by |
|---|---|---|---|---|
| Agent-written pull requests merged | 1,000 merged pull requests in three months | 1,000 merged pull requests every 10 days | Honk across Spotify’s codebase, March 2026 | Spotify, via InfoQ, measured4 |
| Total time saved on agent-driven migrations | Writing the code by hand | 60–90% | Agent-run migrations, to November 2025 | Spotify, measured1 |
| Duration of a Java migration across backend services | Weeks or months across hundreds of teams | three days | Backend services, reported June 2026 | Spotify, measured5, 6, 7 |
- Merged pull requests: Counts Honk’s pull requests merged into Spotify’s codebase. Six months before the March 2026 talk, Honk took three months to reach the same 1,0004. By November 2025, the agents had produced more than 1,500 merged pull requests1.
- Time saving: Compares migrations run with the agent against writing the code by hand. It covers migrations such as Java records, Scio upgrades and Backstage UI changes to November 20251.
- Java migration: Covers one Java migration across Spotify’s backend services, reported in June 20265. Before Honk, such migrations meant hundreds of teams working for weeks or months5.
Lessons learned
Feedback loops proved essential. Without them, Spotify’s agents often produced code that didn’t work3. Agent performance is measurably worse in Spotify’s more fragmented codebases, so Spotify uses Honk to drive migrations to 100% completion and standardize the code4, 5.
Agents didn’t always stay within the task. They took shortcuts to make builds pass, such as commenting out failing tests or downgrading Java versions4. In December 2025, the judge vetoed about a quarter of thousands of sessions, and the agent corrected course half the time3. By March 2026, Spotify had removed the judge as too rigid, because it blocked valid changes4.
The verifiers first ran only on Linux x86, which left out iOS apps that need macOS hosts3. Spotify answered with a separate verification runtime that runs builds in CI4.
Review became the bottleneck as output grew. Spotify engineers said PR review, not code generation, now limits throughput4. Spotify lets migration drivers approve their own PRs, closes stale pull requests and uses Honk to standardize the codebase4.
Fleet automation also failed once in production. An automated dependency upgrade passed Spotify’s checks and still affected end users6, 7. Spotify’s incident reviews found no AI-authored code as a material direct contributor, but change volume grew faster than some verification controls6. The Pragmatic Engineer newsletter, after outages in Spotify’s podcast publishing, argued that Spotify has prioritized AI usage over reliability9.
The figures are Spotify’s own, from its engineering blog, its conference talks and its earnings call, which InfoQ and TechCrunch relayed1, 4, 8.
Case study scorecard
- 1,000 merged pull requests every 10 days Agent-written pull requests merged4
- 60–90% Total time saved on agent-driven migrations1
- three days Duration of a Java migration across backend services5, 6, 7
Sources by publication date
- Organization 5
- Press, academic, and regulators 4
Build this solution yourself
Analysis
What you need
- A fleet-change pipeline already in place: Honk replaced only the transformation step. Fleet Management already targeted repositories, opened pull requests and merged them1.
- Build and test checks an agent can call in every repository: The verifiers depend on each repository’s build system, and a repository with little test coverage lets a wrong change pass CI3.
- Review capacity for the volume: At 1,000 merged pull requests every 10 days, review became Spotify’s bottleneck, so you should decide who approves agent changes before you scale4.
Reference architecture
Software engineering assistant
A software engineering assistant writes, reviews, tests, or migrates code in the tools that developers already use, and a developer approves its output. A language model writes a change, a test, or a review comment from the code for a task, and automated checks and a checker model build, test, and filter it. A reviewer approves each checked proposal in code review before it merges, and developers do the work that fails the checks by hand.
- Developer tools
- Assistant platform (documented in this case study)
- Code repository
- Code index
- Deterministic code analysis
- Standards and guidelines
- Code and platform map
- Prompts and context
- Language model (documented in this case study)
- Automated checks (documented in this case study)
- Checker model (documented in this case study)
A check mark shows a building block that this case study's sources document.
Open the reference architectureOthers who built it
- Uber: How Uber scaled coding agents and cut cost per session. Cost per agent session fell 52% from its June peak as weekly agent requests grew 9.4x.
- Pictet Group: Pictet takes Claude Code from developers to business teams. About 700 Pictet staff now use Claude Code and Cowork, and prototypes take 2 hours, not 2 weeks.
- TUI Group: TUI cuts external IT staff with AI coding assistants. TUI's external IT workforce fell from thousands to maybe 30 or 50 as its developers coded with AI.
- eBay: eBay's Copilot pilot cut pull request merge time by 17%. Developers with Copilot cut pull request merge time 17% in eBay's 300-developer A/B test.
- Meta: Meta's just-in-time LLM tests catch bugs before code lands. JiTTests helped catch 74 serious privacy bugs at Meta before they landed in the first half of 2026.
- Deutsche Bank: AI coding assistants speed up software work at Deutsche Bank. Developers save an estimated 1.5 to 2.5 hours per week and report 10x gains on some tasks.
Cite this case study
Enterprise AI Case Studies. "Spotify's Honk coding agent automates fleet-wide migrations." Updated Nov 26, 2026. https://case-studies.ai/case-studies/engineering-and-research/ER-061-fleet-code-migration-agent-spotify/
@misc{csai-er-061,
author = {{Enterprise AI Case Studies}},
title = {{Spotify's Honk coding agent automates fleet-wide migrations}},
year = {2026},
note = {Updated 2026-11-26},
url = {https://case-studies.ai/case-studies/engineering-and-research/ER-061-fleet-code-migration-agent-spotify/}
}Sources
The following reporting, and every passage quoted from it, belongs to its publisher, not to this site. Sources and ownership
- Source 1:
1,500+ PRs Later: Spotify's Journey with Our Background Coding Agent (Honk, Part 1)
Supporting excerpts (18)
around half of Spotify’s pull requests have been automated by this system
the transformation script growing to over 20,000 lines of code
Only a few teams have the required expertise and time to implement more sophisticated Fleetshifts over our entire codebase.
Last February, we began an investigation into using AI agents within our Fleet Management system.
We replaced deterministic migration scripts with an agent that takes instructions from a prompt.
targeting repositories, opening pull requests, getting reviews, and merging into production
Instead of adopting an off-the-shelf coding agent as it is, we decided to build a small internal CLI.
This CLI can delegate executing a prompt to an agent, run custom formatting and linting tasks using local Model Context Protocol (MCP), evaluate a diff using LLMs as a judge, upload logs to Google Cloud Platform (GCP), and capture traces in MLflow.
Crucially, having that CLI allows us to seamlessly switch between different agents and LLMs.
has already allowed us to swap out pieces multiple times
We were codeveloping the tooling alongside early adopters who applied it to their in-flight migrations.
To date, our agents have generated more than 1,500 pull requests that teams across Spotify have merged into our production codebase.
Language modernization, such as replacing Java value types with records
Upgrades with breaking changes, such as migrating data pipelines to the newest version of Scio
a total time saving of 60–90% compared to writing the code by hand
By exposing our background coding agent via MCP, Spotifiers can now kick off coding agent tasks from both Slack and GitHub Enterprise.
They first talk to an interactive agent that helps to gather information about the task at hand. This interaction results in a prompt that is then handed off to the coding agent, which produces a pull request.
hundreds of developers now interact with our agent
- Source 2:
Background Coding Agents: Context Engineering (Honk, Part 2)
Supporting excerpts (20)
we experimented with open source agents such as Goose and Aider
It was difficult to get them to reliably produce mergeable PRs.
The task is complete once the tests are passed or limits are exceeded (10 turns per session, three session retries total).
For this use case, our loop often ran out of turns.
To solve this, we turned to Claude Code, which allowed us to use more-natural task-oriented prompts, and we benefited from its built-in ability to manage Todo lists and spawn subagents efficiently.
Claude Code is our top-performing agent
about 50 migrations and the majority of the background agent PRs merged into production
we prefer to have larger static prompts, which are easier to reason about. You can version-control the prompts, write tests, and evaluate their performance.
While this does make the agent capable of tackling more complex and ambiguous tasks, this also makes it less testable and predictable.
The more tools you have, the more dimensions of unpredictability you introduce.
A Git tool that provides limited and standardized access to Git.
never push or change origin
The built-in Bash tool with a strict allowlist of commands.
We found it easier to encode how to invoke our in-house build systems in an MCP
because our agent needs to operate on thousands of existing repositories with very different build configurations
We instead ask users to condense relevant context into the prompt up front
Having a handful of concrete code examples heavily influences the outcome.
Define the desired end state, ideally in the form of tests.
It helps to clearly state in the prompt when not to take action.
Do one change at a time.
- Source 3:
Background Coding Agents: Predictable Results Through Strong Feedback Loops (Honk, Part 3)
Supporting excerpts (19)
The background agent produces a PR that passes CI but is functionally incorrect. This is the most serious error, as it erodes trust in our automation.
The target component has little to no test coverage
The verification loop consists of one or more independent verifiers.
For example, a Maven verifier activates if it finds a pom.xml file in the root of the codebase.
many of our verifiers use regular expressions to extract only the most relevant error messages on failure and return a very short success message otherwise
our agent also runs all relevant verifiers before attempting to open a PR
In the case of Claude Code, we do this with the stop hook.
On top of these deterministic verifiers, we added another layer of protection: an LLM as a judge.
like refactoring code or disabling flaky tests
It uses the diff of the proposed change and the original prompt, and sends them to an LLM for evaluation.
runs after all the other verifiers have completed
out of thousands of agent sessions, the judge vetoes about a quarter of them. When that happens, the agent is able to course correct half the time.
the most common trigger is the agent going outside the instructions outlined in the prompt
It can see the relevant codebase, use tools to edit files, and execute verifiers as tools.
Pushing code, interacting with users on Slack, and even the authoring of prompts are all managed by surrounding infrastructure.
The agent runs in a container with limited permissions, few binaries, and virtually no access to surrounding systems.
Without these feedback loops, the agents often produce code that simply doesn't work.
Our current verifiers only run on Linux x86
our iOS applications require macOS hosts to run verifiers successfully
- Source 4:
QCon London 2026: Rewriting All of Spotify's Code Base, All the Time
Supporting excerpts (14)
Jo Kelly-Fenton and Aleksandar Mitic from Spotify presented
achieving 1,000 merged pull requests every 10 days
reducing migration timelines from nearly a year to under a week for 70% of the fleet. However, the remaining 30% proved extremely difficult due to edge cases and complexity
Early challenges revealed that agents would take shortcuts to make builds pass, such as commenting out failing tests or downgrading Java versions.
found it too rigid, blocking valid changes. As models improved, the judge was eventually removed, with verification steps in prompts proving sufficient.
including missing credentials, Docker requirements, and the inability to run iOS builds on Linux machines
A critical architectural decision was to separate the agent runtime from the verification runtime. Honk now pushes branches to GitHub, triggers builds via a verification service that abstracts CI systems, waits for results, and only creates pull requests after full validation.
initiating code changes from Slack threads containing dashboards, logs, and Jira links
Six months ago, Honk achieved 1,000 merged pull requests in three months. Today, that same volume is reached in just 10 days.
this shift has made PR review, not code generation, the new bottleneck
allowing migration drivers to approve their own PRs and closing stale pull requests
a diverse codebase produces a diverse set of problems, leading to complex prompts filled with conditional logic
standardisation leads to more correct agent code, which enables easier review
using Honk to drive existing migrations to 100% completion
- Source 5:
Coding Is No Longer the Constraint: Scaling Developer Experience to Teams and Agents at Spotify
Supporting excerpts (15)
Chief Architect and VP of Engineering
our production codebase was growing seven times faster than the number of engineers
Migrations were the number one source of developer frustration.
merged more than 2.5 million automated maintenance PRs, the vast majority auto-merged with no human in the loop
Under the hood, Honk runs Claude using the Agent SDK, wrapped inside our own harness and deployed in Kubernetes pods so we can schedule many sessions concurrently across our cloud environment.
including the ability to run builds in our CI environment across multiple operating systems to verify that its changes are correct
identifying targets, scheduling changes, tracking progress
A team running a migration can see at a glance how many PRs have been created, how many have been merged, and which ones need attention.
Our most recent Java migration across our backend services took three days.
What used to be hundreds of teams doing migrations for their components, taking weeks and weeks or months, now can be done by a single engineer in a few days.
Honk is now available over Slack, where engineers can mention it mid-conversation
shared agent sessions, team projects, and agent orchestration through Chirp
in our more fragmented codebases, agent performance is measurably worse
If Claude has a lot of other code to look at, and that code looks roughly consistent, Claude will do a better job.
we now have 76% more PRs to review
- Source 6:
AI Changed How Spotify Builds. What We Learned (and Fixed) About Quality at Higher Velocity
Supporting excerpts (8)
For over a year now, we have expanded this to support more complex agentic-driven changes, including a recent Java migration across backend services completed in three days.
This year, an automated dependency upgrade passed our checks, but still failed in production, impacting end users.
strengthening safeguards, expanding rollback capacity, and scheduling automated changes during owning teams
Every month we run a retrospective of all major incidents.
Did AI-authored code directly contribute to the incident?
Across the incidents reviewed so far, we did not identify AI-authored code as a material direct contributor.
the volume of change increased faster than some of our verification controls could adapt
AI increased the capacity to produce change. The next constraint became our ability to verify it.
- Source 7:
Spotify More Than Doubled Monthly Code Changes as AI Accelerated Development
Supporting excerpts (5)
The company later added Honk, a background coding agent that runs Claude using the Agent SDK in Kubernetes pods.
Fleetshift handles target selection, scheduling, and progress tracking, while Honk performs code modifications and can run builds in CI.
Spotify reports that a recent Java migration across its backend services took three days.
An automated dependency upgrade nevertheless passed existing checks and failed in production, according to Spotify.
Spotify combines Fleet Management for standardized maintenance with Honk for complex code changes, while Fleetshift handles orchestration and CI provides validation.
- Source 8:
Spotify says its best developers haven't written a line of code since December, thanks to AI
Supporting excerpts (3)
That statement, from Spotify co-CEO Gustav Söderström
to speed up coding and product velocity, the company told analysts on the call
As a concrete example, an engineer at Spotify on their morning commute from Slack on their cell phone can tell Claude to fix a bug or add a new feature to the iOS app
- Source 9:
The Pulse: Quitting Spotify Podcasts over reliability
Supporting excerpts (3)
the risk of deprioritizing reliable operations at major companies in order to push on things like AI adoption, as Spotify seems to be doing
particularly disappointed that Spotify has prioritized AI usage over reliability
a series of reliability issues around Spotify being unable to process video episodes
Comments
Start the conversation.
Invited members of the library comment here. Sign in to join the conversation.