Spotify cuts migration time by 90% with Claude Agent SDK

Try Claude
Contact sales
Industry:
Software
Company size:
Large
Product:
AI Platform
Partner:
Location:
North America
Up to 90% time savings
of engineering time on complex code migrations
650+ pull requests per month
generated by the background coding agent and merged into production

The problem

Building agents with the Claude Agent SDK

The Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code.

Building agents with the Claude Agent SDK
Next

The Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code.

Next
Building agents with the Claude Agent SDK

The Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code.

Read more

The solution

Introducing Claude Code

See Claude Code in action—from concept to commit in one seamless workflow.

Introducing Claude Code
Next

See Claude Code in action—from concept to commit in one seamless workflow.

Next
Introducing Claude Code

See Claude Code in action—from concept to commit in one seamless workflow.

Read more
“Claude has consistently delivered the strongest performance for large-scale code transformation work, which is why it has become our model of choice."
Niklas Gustavsson
Chief Architect and VP of Engineering, Spotify

Next

Next

Read more

Spotify, the world's most popular audio streaming subscription service, serves more than 713 million users across 180+ markets with access to over 100 million tracks, 7 million podcast titles, and 350,000 audiobooks.

With Claude Agent SDK, Spotify:

  • Saves up to 90% of engineering time on complex code migrations
  • Merged 650+ agent-generated pull requests into production per month
  • Automates fleet-wide transformations that were previously too complex to script
  • Enables hundreds of engineers to trigger autonomous code changes via Slack

The opportunity

Spotify has a massive codebase that requires constant upkeep: language modernization, framework upgrades, dependency updates, and configuration changes across thousands of repositories. With the rapid adoption of AI tooling, that codebase is growing faster than ever.

To tame its sprawling software ecosystem, Spotify relies on Backstage, its homegrown internal developer portal (IDP). By standardizing how components are built and ensuring clear ownership, Backstage provides a more consistent, predictable engineering environment for both your developers and your tools: You can’t safely automate what you don’t understand.

That foundation enabled Spotify’s first major step toward large-scale, automated code changes. In 2022, the company introduced Fleet Management, a framework for applying code changes across dozens, hundreds, or thousands of repositories at once. To date, around half of Spotify's pull requests are being driven through this system.

But Fleet Management had a ceiling. Each transformation required engineers to write deterministic scripts using abstract syntax tree (AST) manipulation or regex patterns. This approach demanded specialized expertise, which limited most automated changes to simple modifications. Complex semantic migrations—the kind that require understanding context and making judgment calls—remained manual, labor-intensive work.

Spotify needed a way to automate sophisticated code changes that traditional scripting couldn't handle: transformations that required understanding the meaning of code, not just its structure.

Claude Agent SDK enables autonomous, high-quality migrations

Spotify integrated Claude Agent SDK into their Fleet Management infrastructure in July 2025 as a background coding agent that operates autonomously from natural language prompt to merged pull request. The agent handles complex migrations that were previously challenging to automate, for example converting Java AutoValue classes to Records, managing framework upgrades with breaking changes, and making configuration updates that require codebase awareness. Before sending a pull request, the agent runs formatting, linting, builds, and tests in a verification process to ensure its changes are valid, shippable code — reducing manual review and repetitive engineering work.

From text instructions to production code

The shift from AST manipulation to natural language instructions changed what's possible. Engineers who previously needed specialized scripting expertise can now describe transformations in plain text and let Claude Code execute them across the fleet. For large-scale migrations, prompts are version-controlled in Git. Spotify's internal orchestration then triggers the Claude Code agent to execute transformations across repositories. For individual tasks, engineers interact with an internal Slack bot that triggers the agent in the background.

"Our engineers are now able to execute fleet-wide migrations at a pace that simply wasn't possible before,” says Max Charas, Senior Staff Engineer at Spotify. “It's a promising sign of how AI can reduce the complexity of maintaining large code bases and a clear signal of how AI is reshaping development velocity.”

Throughout the process, Spotify’s engineering team collaborated with Anthropic’s Applied AI team to ensure best practices. The architecture was a great fit due to Spotify's focus being automated background coding over interactive development, eliminating the need for custom user interfaces. Plus, Claude Code's flexible hooks system allowed extensive customization, enabling deterministic pre- and post-agent actions that seamlessly integrated with Spotify’s existing workflows.

“Claude has consistently delivered the strongest performance for large-scale code transformation work, which is why it has become our model of choice over the past six months,” said Niklas Gustavsson, Chief Architect and VP of Engineering at Spotify. “As we raise the bar again, we’ve adopted Sonnet 4.5 as our new default, because it currently leads on the metrics that matter for fleet-wide engineering at scale.”  

The team selected Claude Code specifically because it proved easy to prompt, effective at navigating codebases, and straightforward to integrate with existing infrastructure.

The outcome

Hundreds of engineers now interact with the background coding agent at Spotify. The agent is already generating more than 650 monthly pull requests merged into production, saving engineers up to 90% of the time they'd spend writing migrations manually. 

Platform teams are now starting to take on projects that previously were too costly and complex to undertake. One example includes a tech standardization effort enforcing explicit context propagation for all Java gRPC services throughout the company. This is a complex and breaking change that in many cases would take several hours and deep gRPC knowledge to implement per service. Now Claude has automated a majority of the implementation and engineers only have to review. The opportunity ahead, the team notes, is less about raw tooling and more about capability building — helping engineers learn to craft prompts that make AI a force multiplier in their workflow.

Looking ahead, deeper integration of Claude Code into Spotify’s Continuous Integration infrastructure is expected to enhance both success rates and code quality. Additionally, Spotify plans to extend the background coding agent to macOS and iOS codebases, aiming to accelerate client engineering velocity.

"The engineering teams at Spotify and Anthropic share a similar approach to building great products", said Charas. "We're eager to explore how we can push the boundaries together, using AI to help our teams move faster and ship even higher-quality products."

Building agents with the Claude Agent SDK

The Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code.

Read more
Building agents with the Claude Agent SDK
Next

The Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code.

Video caption
Next
Building agents with the Claude Agent SDK

The Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code.

Introducing Claude Code

See Claude Code in action—from concept to commit in one seamless workflow.

Read more
Introducing Claude Code
Next

See Claude Code in action—from concept to commit in one seamless workflow.

Video caption
Next
Introducing Claude Code

See Claude Code in action—from concept to commit in one seamless workflow.

Prev
Next
“Claude has consistently delivered the strongest performance for large-scale code transformation work, which is why it has become our model of choice."
Niklas Gustavsson
Chief Architect and VP of Engineering, Spotify

Next

Video caption
Next

Prev
Next