How to clear tech debt with coding agents Spotify replaced deterministic migration scripts with an AI coding agent called Honk, built on Anthropic's Claude Code, and by March 2026 teams were merging 1,000 of its changes every ten days, according to Spotify engineering reports. Spotify's earlier script-based approach moved 70% of its backend services to a new version in under 7 days versus roughly 200 days previously, but stalled on the irregular remaining 30%; in one migration, about 1,800 data pipelines across three frameworks were targeted with a six-month deadline against an estimated ten engineering weeks of manual work. The method pairs Honk with Fleetshift, the tool that sends and tracks a proposed change across every code project, and depends on a test that can check the agent's work. You know how a migration goes. Your teams have to move their code from an old version to a new one. The easy 70% moves fast. The last 30% is too hard, so it stays on the old version. After that, everyone maintains both. That’s how tech debt piles up. Spotify measured it on its own code. Scripts moved 70% of its backend services to a new version in under 7 days https://engineering.atspotify.com/2023/04/spotifys-shift-to-a-fleet-first-mindset-part-1 . It used to take about 200 days. Then progress went flat, because the rest was too irregular for a script. AI coding agents can now take much of that last 30%. The condition is a test that can check their work. A coding agent is an AI model that writes code, tests it and corrects itself. Spotify’s is called Honk. By March 2026, teams merged 1,000 of its changes every ten days https://www.infoq.com/presentations/spotify-ai-codebase-migration-agent/ . Let me show you how Spotify did it. Then we’ll see how you can do it, and how to set up the agent. How Spotify does it Spotify’s problem was volume. Each migration asked hundreds of teams to make the same change by hand. Niklas Gustavsson, a VP of engineering there, gives the ceiling https://claude.com/customers/spotify-boris-office-hours : “We could maybe do ten of them a year” . In Spotify’s internal surveys, migrations topped the list of what annoyed people. Its first fix had no AI in it. A team that owns shared code moves every other team to its new version. It writes a script, and a tool called Fleetshift runs it on every code project. Each owning team receives a proposed change, called a pull request, and approves it. That’s the method that reaches 70% and stalls. One script grew past 20,000 lines https://engineering.atspotify.com/2025/11/spotifys-background-coding-agent-part-1 to cover every unusual case. Then Spotify changed one piece. Its engineers put it in one sentence https://engineering.atspotify.com/2025/11/spotifys-background-coding-agent-part-1 . “We replaced deterministic migration scripts with an agent that takes instructions from a prompt” . Deterministic means the script does the same thing every time. Spotify named the agent Honk. So two tools work together. Fleetshift sends a change to every code project and tracks it. Honk writes the change. One migration, step by step A Spotify engineer wrote up one migration in full https://engineering.atspotify.com/2026/4/background-coding-agents-dataset-migrations-honk-part-4 . Here’s the project first. Spotify had to retire two of its most used datasets, to release new versions. About 1,800 data pipelines read from them. A pipeline is a program that reads data, transforms it and passes it on. They were written in three different frameworks. The team had six months, and estimated ten engineering weeks by hand. Here’s how it ran, in seven steps. 1. One team led it. At Spotify, the team that ships a change carries it to everyone else. Here, that was the team that owned the two datasets. 2. Fleetshift found every pipeline to change. Fleetshift is the tool that sends one change to many code projects https://backstage.spotify.com/fleetshift . Spotify also keeps a catalog of all its software and who owns it. The catalog listed every pipeline that read the two datasets. Fleetshift marked them as targets. 3. The team wrote the instructions. This took the longest. The first version came from the guide written for people, and it wasn’t complete enough. Honk guessed which old field matched which new one, often wrongly. Tables spelling out every match fixed it. One framework varied too much from team to team, so the team left it out. 4. Honk changed each project. Honk is Spotify’s AI agent, built on Claude Code https://claude.com/customers/spotify , which Anthropic sells. Fleetshift hands it one project at a time, with the instructions. Where a field needed a judgment call, Honk left a comment linking to the guide. It works inside a sealed environment https://engineering.atspotify.com/2025/12/feedback-loops-background-coding-agents-part-3 . 5. A build checked each change. A build assembles the code and runs its tests. Normally, Honk retries until the build passes, and no pull request exists before that. Jo Kelly-Fenton, a Spotify engineer, gives the reason https://www.infoq.com/presentations/spotify-ai-codebase-migration-agent/ : “We don’t want to create garbage PRs” . Here, the SQL projects had almost no tests, so that check was missing. 6. The owning teams reviewed and merged. Fleetshift opened 240 pull requests. Because of the missing tests, each team tested by hand first. 7. Fleetshift tracked it to the end. One board showed which pull requests were open, merged or stuck. The write-up doesn’t say how many of the 240 merged, or how long it took. The team’s own conclusion is the useful part: standardize the code, and require tests. You’ll meet it again in the steps below. What Spotify got from it Across all its migrations, the numbers came fast. By November 2025, teams had merged 1,500 of Honk’s pull requests https://engineering.atspotify.com/2025/11/spotifys-background-coding-agent-part-1 . A Java migration across Spotify’s backend services took three days https://engineering.atspotify.com/2026/6/code-with-claude-coding-is-no-longer-the-constraint . Spotify puts the saving at 60 to 90% of the time by hand. The bigger gain is work that never got done before. Aleksandar Mitic, another of its engineers, puts it this way https://www.infoq.com/presentations/spotify-ai-codebase-migration-agent/ . “We’re definitely doing these migrations, which we just could not do before.” Read those numbers with two things in mind. Spotify gives no method for its 60 to 90%. And it now sells this system to other companies https://engineering.atspotify.com/2026/10/introducing-spotify-technology-proven-at-spotify-now-yours , since March 2026 https://www.youtube.com/watch?v=fHDGQHr agg . It also doesn’t publish its costs, or how much of the last 30% it cleared. What went wrong on the way Spotify published what broke too. Four of its problems are worth knowing before you start. - The agent cheated the check. To pass the build, it commented out failing tests or downgraded the Java version https://www.infoq.com/news/2026/03/spotify-honk-rewrite . Spotify added a second AI model to judge each change. It later removed that judge, which blocked changes that were right. The tests stayed. - A wrong change passed every check. It built, it passed the judge, and it opened a new connection on every call https://www.youtube.com/watch?v=1oicrAfrEIk . At scale, it would have brought down the services behind it. A person caught it. - An automated upgrade failed in production. It had passed every check https://engineering.atspotify.com/2026/9/ai-changed-how-spotify-builds-what-we-learned-and-fixed-about-quality-at-higher-velocity . Automated changes now go out while the owning team is at work. - Review became the slow step. Spotify reports 76% more pull requests to review https://engineering.atspotify.com/2026/6/code-with-claude-coding-is-no-longer-the-constraint . Most come from everyday coding with AI, and migrations add to the pile. How other companies did it Three companies are worth a closer look. One confirms Spotify’s method, one changes it, and one adds to it. Airbnb confirms the loop, with far less machinery. It has no tool like Fleetshift. Its framework is little more than a script runner https://www.youtube.com/watch?v=dTD8Xbqvxb0 . For each file, a script checks the result. The agent fixes what failed, and the script checks again. That loop moved about 3,500 test files in six weeks https://airbnb.tech/infrastructure/accelerating-large-scale-test-migration-with-llms/ . Airbnb had estimated a year and a half. Three quarters of the files passed in the first four hours. The last 3% took the longest, and people finished them. Review took a third of the effort. The lesson: you can start with a script and a loop, before any platform. Dozens of migrations followed https://getdx.com/podcast/beyond-the-cli-agentic-ai-for-async-workloads-and-non-developers/ . Stripe changes how much freedom the agent gets. It built its own agents. Each run follows a recipe https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2 that mixes fixed steps and agent steps. Running the code checker is plain code. Fixing a failed build is the agent’s job. Its engineers call this “putting LLMs into contained boxes” . Stripe also stopped treating an upgrade as a project. Its Java upgrade runs every day https://stripe.dev/blog/modern-java-at-stripe-language-upgrades-as-a-service . A tool upgrades what it safely can, and agents fix what breaks. The team’s question became “What did we upgrade today, and what is still blocked?” . The lesson: let code decide what code can decide, and run the migration as a service. Google adds the numbers, and the brakes. A small team ran 39 rounds of one migration in a year https://arxiv.org/html/2504.09691 . The AI model wrote about 74% of the changes. The team estimated half the time saved. The paper says what that rests on: “developer perception” . Google counts the whole job, from finding the code to review and rollout. And it slowed down on purpose https://arxiv.org/html/2501.06972 , “to avoid overwhelming the teams that had to do the reviews” . Its own summary: “LLMs are only one part of the complete solution” . The lesson: measure the whole migration, and pace it to your reviewers. How you can do it Don’t copy Spotify. It had its catalog, its standards and Fleetshift years before the agent. So use the steps below, and fit each one to your own teams. I didn’t invent them. They’re where four written processes agree: Spotify’s, Google’s three stages https://research.google/blog/accelerating-code-migrations-with-ai/ , Airbnb’s four techniques https://leaddev.com/wp-content/uploads/2025/11/AI-accelerated-migrations-at-scale-Charles-Covey-Brandt-StaffPlus-New-York-2025.pdf and Anthropic’s migration guide https://claude.com/resources/articles/ai-code-migration . Step 3 is the technical one, and it gets a section of its own. 1. Pick a migration a test can check Start with a list. Note every migration your teams began, how far it got, and what blocks it. Then pick the one that fits an agent. The work must be too complex for a script, and checkable by a test. Four questions settle it. 1. Can a script do it? If the change is identical everywhere, write the script. Kelly-Fenton’s reason: “Deterministic is much cheaper” . Uber moved 75,000 test classes with a script, after its attempt with generative AI https://www.uber.com/blog/junit-migration/ “was unsuccessful” https://www.uber.com/blog/junit-migration/ . GitHub ran both in order https://github.blog/engineering/architecture-optimization/improving-site-performance-by-shipping-more-css/ : a script first, then its agents on the last 895 cases. 2. Can a test say it worked? Spotify’s advice https://engineering.atspotify.com/2025/11/context-engineering-background-coding-agents-part-2 : “Define the desired end state, ideally in the form of tests” . 3. Does the code look alike from team to team? Where it varies, Spotify says https://engineering.atspotify.com/2026/6/code-with-claude-coding-is-no-longer-the-constraint , “agent performance is measurably worse” . 4. Does it make the next ones easier? Spotify moves everyone to the new Java version first. The libraries that need it come after. If several migrations pass, start where a wrong change costs least. That’s often test code, which never reaches your users. Airbnb, Slack https://slack.engineering/balancing-old-tricks-with-new-feats-ai-powered-conversion-from-enzyme-to-react-testing-library-at-slack/ and Asana all started there. Then check the test itself. Anthropic sells the agent Spotify uses, and its migration guide calls that test the judge. Its advice is to run the judge on code you broke on purpose. The reason: “a judge that doesn’t catch breakage isn’t a judge” . 2. Find every place to change, and its owner Google calls this stage “Targeting the locations in the codebase that needed modifications” . The output is one list, and it has to be complete before the first run. Five questions make it so. 1. Where is every target? Find them with a search or a script, never by asking teams. Spotify used its catalog and code search. 1Password listed every place that called one function https://1password.com/blog/what-we-learned-using-ai-agents-to-refactor-a-monolith , then sorted them into a few patterns. 2. Who owns each one? Name one owner per target. Wix’s reason https://www.wix.engineering/post/how-wix-saved-650-developer-days-in-one-quarter-by-automating-code-migrations : “A PR that five teams need to review is a PR that gets ignored” . 3. What’s out of scope? Leave out what the agent can’t finish, on purpose and in writing. Spotify dropped one framework. Uber’s script skipped every file it couldn’t handle completely. 4. What’s blocked, and by what? Stripe’s upgrade tool tracks blockers “so the remaining hard parts are visible” . 5. Do the reviewers have room? Google’s rule https://arxiv.org/html/2501.06972 is to migrate only where “we have bandwidth to land the changes” . Then confirm the size before any run. Spotify’s tool asks first. Mitic quotes it: “I’ll do this on a thousand repos?” . 3. Set up the agent This is the technical step. The agent needs written instructions, a check it can’t skip, and a machine in the cloud. Most of the engineering goes here, so the next section walks through it, hands-on. One principle holds until then: explain the change once, in writing. Wix’s motto for its migration platform is “Explain once, apply everywhere” . 4. Try a sample, then run everything Airbnb’s method fits in three words: “Sample, tune, sweep” . The sample exists to fix the instructions, not to make progress. Five moves, in order. 1. Pick a handful of targets. Take some at random, as Airbnb does, and add the worst ones you know. One Anthropic engineer moved Bun, a developer tool, to a new programming language. The work began with 3 files out of 1,448. 2. Run them exactly as the full run will go. Same instructions, same check, same machine. 3. Expect many failures, and read each one. Airbnb expects its first sample to fail often. The trial on Bun caught two critical problems before they spread. 4. Fix the instructions, then run the sample again. Never fix the output by hand. Anthropic’s guide: “you don’t fix the code. You fix the process loop that produced the code” . 5. Throw the sample’s output away, then run everything. Keep what passes, and repeat on what’s left. 5. Run the loop, with a cap Every company here runs the same loop: check, change, check again. What matters is who checks, and when the loop stops. Five settings decide it. 1. Check before any change. Airbnb runs the check first https://www.youtube.com/watch?v=dTD8Xbqvxb0 . Old failures then aren’t blamed on the agent. 2. Keep the check outside the agent. Airbnb’s phrase is “outside of the AI” . The agent never grades itself. 3. One change per run. At Spotify, a combined change is more likely to come back half done. 4. A limit on retries. Stripe’s agent gets two tries on the build https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents , then hands over to a person. Brex stops at three. 5. A rule for what happens at the limit. At Brex, the agent stops, writes down what it found, and flags the pull request. Uber’s script put failing files back as they were. 6. Review at a pace people can hold Google’s last stage is “Change review and rollout” , and it’s where the work slows down. Two people read each change: the migration lead first, then the owning team. Spotify and Google both do it. Six rules make it bearable. - Put the reason in the pull request. Wix writes why the migration exists and exactly what the change does. - No automatic merge at first. Brex requires a person. A few of its changes passed every test and still caused bugs. - Let the migration lead approve what the lead knows best. At Spotify, the lead of a library migration can approve its changes. The owning team still sees them. - Cap the pace. Google slowed its own migrations to spare its reviewers. Yours need the same. - Agree how long a review may wait. Spotify now sets expected review times. Pull requests that go stale get closed, and the migration tries again. - Later, sort by risk. For mechanical changes, Google lets one expert approve for everyone https://abseil.io/resources/swe-book/html/ch22.html . Wix merges a change automatically where its risk assessment allows it. Which changes can merge unread is still open, even at Spotify. Mitic: “This is a hard question, and it’s not fully answered” . 7. Finish by hand, and close it The agent won’t reach 100% alone. So decide in advance how the last part gets done. Four moves close a migration. 1. Stop tuning when retries stop paying. Airbnb’s automation stopped at 97%. It had retried some files 50 to 100 times. 2. Have the lead’s team finish the rest by hand. Will Larson wrote the reference essay on migrations https://lethain.com/migrations/ in 2018. His rule: the team leading the migration finishes it, down to “the nooks and crannies” . 3. Go back to what you left out. Stripe keeps its skipped targets on the list, so they stay visible. Each one needs a decision: migrate it by hand, or keep it and say why. 4. Remove the old way, so nobody copies it. Google’s reason: “engineers tend to use existing code as examples when writing new code” . Agents do the same. Temporal leaves a note in the code https://temporal.io/blog/using-coding-agents-on-a-migration-three-practices-that-mattered beside each temporary piece. Later, an agent finds every note and deletes what it marks. Save the celebration for the end. Larson again: most of the recognition “should be reserved for its successful completion” . Who does what Those seven steps need five roles. - One migration lead. One engineer picks the targets, writes the instructions and follows the migration to the end. - The owning teams. They keep their tests working. They review and merge what touches their code. - A platform team. It runs the agent, the checks and the tool that sends changes everywhere. - A small group that sets the standard. At Spotify, five or six senior engineers pick the supported technology for each discipline. Why not ask every engineer? Kelly-Fenton: “you will literally never get it done” . - Leadership. Someone has to say that teams keep their tests in shape. Someone has to set how long a review may wait. Both are management decisions. Two rules settle most arguments. The team that wants the migration does the work. Google wrote down why in 2020: “nobody likes unfunded mandates” . Airbnb’s version https://leaddev.com/technical-direction/ai-accelerated-migrations-at-scale is “Be a host” . And someone has to order the migrations, so teams aren’t flooded. HubSpot gave that job to a small group of senior engineers https://hubspot.engineering/blog/migrated-from-enzyme-to-react-testing-library/ . Set up the agent you bought This section zooms in on step 3. It’s for whoever does the setup: a developer, or a product manager working with one. It shows one way to do it. That way follows the starter kit Anthropic published https://github.com/anthropics/code-migration-kit-with-claude-code with its migration guide. Spotify’s and Brex’s accounts describe the same pieces. The file names change from one agent to another, and the pieces stay the same. One word first. Everything you set up around the AI model is called the harness. Spotify uses the word https://engineering.atspotify.com/2026/6/code-with-claude-coding-is-no-longer-the-constraint for what it built around Honk. Here’s what the code project holds once the setup is done. A code project, or repository, is the folder for one piece of software and its history. your-code-project/ ├── AGENTS.md standing rules, read before every run ├── migration/ │ ├── RULEBOOK.md every decision of this migration, taken once │ ├── manifest.tsv the queue: one line per target, its owner, its status │ ├── inventory.tsv the places that need a person's judgment │ └── verify.sh the check: one command, pass or fail └── .claude/ ├── settings.json the commands the agent may not run └── skills/ ├── migrate-one-target/SKILL.md └── fix-one-failure/SKILL.md one small skill per recurring failure The layout follows Anthropic’s kit, and the failure skill follows Brex. The check’s name and the two skill names are placeholders. Claude Code calls the first file CLAUDE.md. Codex https://learn.chatgpt.com/docs/agent-configuration/agents-md , Cursor https://cursor.com/docs/rules and Copilot https://docs.github.com/en/copilot/concepts/prompting-and-context/custom-instructions read AGENTS.md, and keep skills and settings in their own folders. 1. Decide which type of migration you have Each type starts differently. - The same change in many places. A new library version or a new framework, across hundreds of files or code projects. That’s Spotify’s type. Go to step 2. - One old application to move. A new language, or a new architecture. Here the agent first reads the old system and writes down what it does. Anthropic’s code-modernization plugin https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-modernization does it in order. First an assessment, then a map, then the business rules as testable cards. Each card cites its file and line. A person approves the plan before anything is built. The plugin’s promise: “Nothing edits your legacy source” . Either way, ask first whether to migrate at all. The kit’s first prompt only writes a report. Its verdict can be “don’t migrate”. For inspiration: Anthropic’s migration guide https://claude.com/resources/articles/ai-code-migration , its plugin, and Spotify’s data migration. 2. Write the check first The check is one command that answers pass or fail for one target. It builds the code and runs its tests. Anthropic’s kit calls it the judge, and it’s blunt: “No judge, no exit condition” . Then test the check itself. Break the code on purpose, and confirm the check fails. If that code has no tests, have the agent write some first. They record what the code does today, before any change. For inspiration: Spotify’s verify tool https://engineering.atspotify.com/2025/12/feedback-loops-background-coding-agents-part-3 starts the right checker for each type of project. Grab’s agent https://engineering.grab.com/scaling-out-distroless-adoption-with-ai wrote the missing tests first. Anthropic’s rewrite of its own API shows where tests fall short. 3. List every target in one file A target is one unit of work: a file, a module, a service. Put them all in one file, one line each, with an owner and a status. A target is done when the check passes, never when the agent says so. The kit’s rule: “Queues live on disk” . If a run stops, the file knows what’s left. For inspiration: 1Password’s list of every place to change, sorted into patterns. Airbnb, which wrote each file’s status at the top of the file. Spotify, where Fleetshift keeps that list. 4. Write the instructions in one rulebook The rulebook is one text file that holds every decision of the migration. The word is Anthropic’s. Spotify calls its own file a prompt, and Wix keeps a prompt bank. The kit’s test for what goes in: “if two agents could answer a question differently, the answer goes in this file” . Spotify published a real one https://gist.github.com/mbruggmann/5ca649914f58ea935f42ffd01c1343ee . It opens like this. Migrate from AutoValue to Java Records Your task is to migrate classes from AutoValue to Java records, and modify any code using them as needed until the tests pass. Four things make a rulebook work. - The task and the finish line, in one sentence. Spotify’s ends on “until the tests pass” . - One example per case, before and after. Spotify’s shows the old class, then the new one. - A table for every mapping. On its data migration, Honk guessed until tables listed each old field with its new name. - When to do nothing. Spotify’s warning https://engineering.atspotify.com/2025/11/context-engineering-background-coding-agents-part-2 : agents are “eager to act on your prompt, to a fault” . Its prompt ends on limits such as “Keep changes only to what is absolutely needed” . Keep the predictable part out of the rulebook. Brex’s agent runs scripts for the simple edits, and uses the AI model for the rest. For inspiration: Spotify’s full prompt. The kit’s rulebook template, modeled on the 576-line rulebook of Bun’s port. Wix, which stores its prompts as “first-class, version-controlled artifacts” . 5. Turn repeated fixes into skills A skill is a folder with one instruction file. The agent reads its short description, and loads the rest only when the task calls for it. Claude Code https://code.claude.com/docs/en/skills , Codex, Cursor and Copilot all have skills. Start with one skill: migrate one target, following the rulebook. Then watch what fails. The kit’s rule: “A failure seen three times is a rule bug” . Each recurring failure gets a rule, or a small skill of its own. Brex ended with eleven skills https://www.brex.com/journal/agent-automations-for-big-migrations , each for one type of failure. One is named micronaut-4-nullability . When a build fails that way, the agent loads it and applies its rules. Here’s how the kit’s own skill file starts. --- name: code-migration description: Run a large-scale language migration with the six-step process: create the map and the rules, stress-test the rules, translate everything, compile, run it, match behavior. Use when the user wants to migrate, port, or rewrite a codebase from one language to another ... --- The description tells the agent when to use the skill. Rules that always apply go in AGENTS.md instead, since the agent reads that file every time. Two from the kit: “The rulebook is read-only inside any loop” , and “Recurring failures move upstream” . For inspiration: Brex’s skills. The kit’s skill file https://github.com/anthropics/code-migration-kit-with-claude-code/blob/main/skill/SKILL.md . Salesforce https://www.salesforce.com/news/stories/how-engineering-became-agentic/ , which fed every round of review comments back into its rule files. 6. Lock what the agent can run Don’t ask the agent to behave. Configure it. The kit’s rule: “Banned operations are banned by configuration” . Its settings file https://github.com/anthropics/code-migration-kit-with-claude-code/blob/main/templates/settings.json denies eighteen commands, such as pushing code or running the build inside a loop. Spotify gave Honk three tools, for the same reason: “The more tools you have, the more dimensions of unpredictability you introduce” . Then make the check impossible to skip. A hook is a script that runs at a fixed moment, whatever the AI model decides. Spotify runs its check when Honk wants to stop. If it fails, no pull request opens. Claude Code https://code.claude.com/docs/en/hooks-guide , Cursor and Copilot have hooks. Last, give the agent a machine with no access to production. For inspiration: the kit’s settings file. Spotify’s three tools https://engineering.atspotify.com/2025/11/context-engineering-background-coding-agents-part-2 . Grab, whose agent may only touch tests and build settings. 7. Run it in the cloud, one run per target Don’t run a migration on laptops. Brex tried: “If a laptop went to sleep, dropped its Wi-Fi connection, or was closed for a meeting, the agentic loop broke entirely” . A cloud run is a fresh machine. It holds the code, runs the agent, and ends in a pull request. All four agents sell it: Claude Code https://code.claude.com/docs/en/claude-code-on-the-web , Codex https://learn.chatgpt.com/docs/cloud , Cursor https://cursor.com/docs/cloud-agent and Copilot https://docs.github.com/en/copilot/concepts/copilot-surfaces/copilot-on-github . Your part is to make that machine able to build your code. In Copilot, that’s one setup file https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment . Spotify learned it the hard way. Its first wide runs failed by the hundred on missing permissions, with nothing wrong in the code. Then start one run per line of the target file. A script can do it. Claude Code https://code.claude.com/docs/en/headless and Codex https://learn.chatgpt.com/docs/developer-commands?surface=cli start from a command, Cursor https://cursor.com/docs/cloud-agent/api/endpoints and Copilot https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/use-cloud-agent-via-the-api through an API. A ticket can do it too. At Brex, an engineer creates 20 tickets at 5 PM. Draft pull requests wait the next morning. For hundreds of code projects, a fleet tool starts the runs and tracks them. On large runs, add a second agent whose only job is to find bugs. Bun’s port https://bun.com/blog/bun-in-rust used two per writing agent. Then cap the spending. Brex’s limit of three attempts prevents “infinite loops and runaway API costs” . Claude Code can stop a run at a set dollar amount https://code.claude.com/docs/en/cli-reference . Cursor asks for a spend limit before the first cloud run. Anthropic’s guide adds a saving. Use a smaller model for the bulk, and the largest for the reviewers. For inspiration: Brex, on bought agents working overnight. Stripe https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents , whose machines start in ten seconds and can’t reach production. Stripe’s engineer https://www.youtube.com/watch?v=W42t-CoXyuE , who advises starting with “a reproducible developer environment” . 8. Share the setup with other teams One migration lead can’t run every team’s code. So package the setup. A plugin is a folder that bundles skills, hooks and settings, and installs with one command. Claude Code https://code.claude.com/docs/en/plugins and Codex both have plugins. A marketplace is a catalog of plugins kept in a code project, which can be private. Each team installs the plugin, and runs the migration on its own code. When a team corrects the agent’s work by hand, feed that correction back into the rulebook. Wix does. For inspiration: Zalando https://engineering.zalando.com/posts/2026/08/agentic-engineering-at-zalando-a-snapshot.html , whose most popular skills are migration skills. Anthropic’s plugin, installed with one command. Wix’s prompt bank. Where it breaks, and what to measure Where it breaks Five problems come back in almost every account. - No tests, no agent. Spotify’s SQL code had almost no tests, so Honk worked blind there. Brex’s lesson: “If your tests are bad or absent, your agent is flying blind” . The way out is to write tests that record what the code does today. Grab had its agent write them, before its migration started. - Passing tests isn’t proof. Anthropic’s rewritten API passed about 98% of its tests https://www.anthropic.com/research/migrating-api-to-rust . On real traffic, only about a quarter of requests matched the old version. An audit of the moved tests also found more than 100 weakened checks. Bun’s port passed its whole test suite, and 19 regressions still surfaced after the merge. The old language’s creator called that port https://www.devclass.com/devops/2026/07/15/zig-creator-calls-buns-claude-rust-rewrite-unreviewed-slop/5271749 “unreviewed slop” . Datadog ran old and new side by side https://www.datadoghq.com/blog/engineering/ai-assisted-storage-migration/ , and compared their answers every 30 seconds. - Some code resists. Where each team built its own way, Spotify left the code out. Design changes resist too. PagerDuty’s summary https://www.pagerduty.com/eng/how-ai-tools-accelerated-six-month-framework-migration-to-nine-days/ : “AI excels at patterns but struggles with architecture” . - Review becomes the bottleneck. Wix says it plainly: “Creating PRs is the easy part. Getting them merged is where migrations usually become harder” . Google sent the 595 changes of one migration to 306 reviewers in 149 teams. Spotify merges 1,000 agent changes every ten days, and Mitic draws the same conclusion: “This is becoming the new bottleneck” . His explanation: “we tend to leave the hardest tasks for ourselves” . - Nobody can tell you the cost. No company here publishes its total. The price tags that exist are AI bills for one migration. Asana paid about $12,000 https://asana.com/inside-asana/migrating-off-enzyme-2-weeks , and PagerDuty $200. Bun’s move cost about $165,000 https://claude.com/resources/articles/ai-code-migration at list price. People’s time comes on top. Most savings are estimates too. Google’s saving of half the time rests on “developer perception” . Gergely Orosz checked the biggest claims https://newsletter.pragmaticengineer.com/p/the-pulse-we-need-to-talk-about-migrations-b3d : Asana’s five years was a projection for a low-priority job. Amazon’s 4,500 developer-years https://aws.amazon.com/blogs/devops/amazon-q-developer-just-reached-a-260-million-dollar-milestone is an estimate too, and Amazon sells the tool. Thoughtworks, a consultancy, reports from its client work https://www.thoughtworks.com/radar/techniques/ai-for-code-migrations : “our results are mixed in measurable time savings” . Two more limits are quieter. Teams that only receive changes may know their code less. Asked how Spotify prevents it, Mitic answered: “hard to answer and hard to say” . And every company here is large. Nothing published shows a 50-engineer company doing this. What to measure Count what merged, never what the agent produced. Spotify does, on one board per migration. Seven numbers are enough. - Migrations finished to 100%. Count this one first. - Changes merged with no manual edit. At Wix, it’s 88%. - The share a person had to write. At ServiceTitan, it was about 15% https://www.infoq.com/presentations/refactoring-ai-agents/ . Google sorts every change into three bins. The AI model wrote it alone, the model then a person, or a person alone. It found 36%, 38% and 26%. - How long a pull request waits. It’s the first number to move when agents arrive. At Wix, 60% of migrations are fully merged within two weeks. - Changes undone after merging. Brex found a few that had passed every test. Count yours, beside the rate for changes people write. - Teams that refuse the change. Google counted 5% early in one migration https://arxiv.org/html/2510.14928v1 , then 0.6%. - Cost per merged change. Brex says its cost per migrated service fell by about 90%, and gives no amount. Nobody publishes theirs, which is a reason to know yours. Two cautions. Don’t trust the merged count alone. Honk once passed the build by removing tests. Spotify adds two questions to every incident review. Did AI-written code contribute? Did the volume of change strain review or testing? Start with one unfinished migration Agents made writing the change cheap, for code a test can check. Checking it stayed expensive. Spotify wrote: “The next constraint became our ability to verify it” . Anthropic wrote the same about its own migration: “Verification, not generation, had become the bottleneck” . So the money goes to tests, one way of building, and review time. If you need one line for the room, take this. Agents can finish the migrations our scripts never did, where a test can check the result. What we fund is tests, one way of building and review time. We start with one migration. A good first question for the tech leads: which unfinished migration would you finish first? Go further: every source, by company Every source used in this article, grouped by company. Posts by a company that sells what it describes are marked. Start with these three - Migrations: the sole scalable fix to tech debt https://lethain.com/migrations/ : Will Larson’s 2018 essay on finishing. - Rewriting all of Spotify’s code base, all the time https://www.infoq.com/presentations/spotify-ai-codebase-migration-agent/ : the QCon London talk and transcript. - We need to talk about migrations with AI https://newsletter.pragmaticengineer.com/p/the-pulse-we-need-to-talk-about-migrations-b3d : Gergely Orosz checks the big estimates. Spotify Since 2026, Spotify has sold Honk and Fleetshift inside Spotify Portal. - Honk, part 1 https://engineering.atspotify.com/2025/11/spotifys-background-coding-agent-part-1 : where scripts stop, and the first 1,500 merged pull requests November 2025 . - Honk, part 2 https://engineering.atspotify.com/2025/11/context-engineering-background-coding-agents-part-2 : the three agents it tried, and the three tools it kept. - The full migration prompt https://gist.github.com/mbruggmann/5ca649914f58ea935f42ffd01c1343ee : one real set of instructions, whole. - Honk, part 3 https://engineering.atspotify.com/2025/12/feedback-loops-background-coding-agents-part-3 : the three failure modes, the checks, and the judge’s instructions. - Honk, part 4 https://engineering.atspotify.com/2026/4/background-coding-agents-dataset-migrations-honk-part-4 : the data migration. It closes with a link to the product. - The same talk at AI Engineer Paris https://www.youtube.com/watch?v=1oicrAfrEIk : October 2025, with the judge still in place. - InfoQ’s report on the QCon talk https://www.infoq.com/news/2026/03/spotify-honk-rewrite : a journalist’s summary. - Coding is no longer the constraint https://engineering.atspotify.com/2026/6/code-with-claude-coding-is-no-longer-the-constraint : the June 2026 page. It ends on a sales line. - AI changed how Spotify builds https://engineering.atspotify.com/2026/9/ai-changed-how-spotify-builds-what-we-learned-and-fixed-about-quality-at-higher-velocity : what broke, and two questions for incident reviews September 2026 . - Introducing Spotify Technology https://engineering.atspotify.com/2026/10/introducing-spotify-technology-proven-at-spotify-now-yours : the tools it sells, under one brand October 2026 . - Fireside chat with Anthropic https://www.youtube.com/watch?v=fHDGQHr agg : where Honk’s outside launch is mentioned March 2026 . - Fleet Management, part 1 https://engineering.atspotify.com/2023/04/spotifys-shift-to-a-fleet-first-mindset-part-1 : the scripts before any AI, and the 200 days 2023 . - Office Hours with Niklas Gustavsson https://claude.com/customers/spotify-boris-office-hours : on Anthropic’s site, with the judge’s removal and his advice. - Spotify cuts migration time by 90% https://claude.com/customers/spotify : Anthropic’s customer story, a seller’s page. - Fleetshift https://backstage.spotify.com/fleetshift : the product page. Anthropic Anthropic sells Claude Code, the agent Honk is built on. It also owns Bun. - How Anthropic runs large-scale code migrations https://claude.com/resources/articles/ai-code-migration : six steps, and one rule: fix the process July 2026 . - Migrating our Messages API to Rust https://www.anthropic.com/research/migrating-api-to-rust : tests that passed while production differed November 2026 . - Rewriting Bun in Rust https://bun.com/blog/bun-in-rust , by the engineer who did it, and the objection it drew https://www.devclass.com/devops/2026/07/15/zig-creator-calls-buns-claude-rust-rewrite-unreviewed-slop/5271749 . - The migration starter kit https://github.com/anthropics/code-migration-kit-with-claude-code : a rulebook template, prompts, a settings file and a skill https://github.com/anthropics/code-migration-kit-with-claude-code/blob/main/skill/SKILL.md . Reference code, with its settings https://github.com/anthropics/code-migration-kit-with-claude-code/blob/main/templates/settings.json , not maintained. - The code-modernization plugin https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-modernization : commands that read an old system, plan the move, rebuild it and prove the result. Airbnb - Accelerating large-scale test migration with LLMs https://airbnb.tech/infrastructure/accelerating-large-scale-test-migration-with-llms/ : 3,500 test files, and where automation stopped 2025 . - AI-accelerated migrations at scale https://www.youtube.com/watch?v=dTD8Xbqvxb0 : the talk, with its slides https://leaddev.com/wp-content/uploads/2025/11/AI-accelerated-migrations-at-scale-Charles-Covey-Brandt-StaffPlus-New-York-2025.pdf and its two principles https://leaddev.com/technical-direction/ai-accelerated-migrations-at-scale . - Beyond the CLI https://getdx.com/podcast/beyond-the-cli-agentic-ai-for-async-workloads-and-non-developers/ : the migration framework 18 months later. Stripe - Minions, part 1 https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents and part 2 https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2 : its agents, their machines, and the build retries. - Modern Java at Stripe https://stripe.dev/blog/modern-java-at-stripe-language-upgrades-as-a-service : a language upgrade run as a daily service. - Stripe at the Background Agents Summit https://www.youtube.com/watch?v=W42t-CoXyuE : an engineer on review and environments. Ona, which sells agent infrastructure, runs the summit. Google - Accelerating code migrations with AI https://research.google/blog/accelerating-code-migrations-with-ai/ : the three stages 2024 . - How is Google using AI for internal code migrations? https://arxiv.org/html/2501.06972 : several migrations, with review as the limit 2025 . - Migrating code at scale with LLMs at Google https://arxiv.org/html/2504.09691 : 39 rounds, and “developer perception” 2025 . - Large-scale changes https://abseil.io/resources/swe-book/html/ch22.html : chapter 22 of Software Engineering at Google , on who pays 2020 . - Instruction set migration at warehouse scale https://arxiv.org/html/2510.14928v1 : how many teams refused October 2025 . Uber - The JUnit migration https://www.uber.com/blog/junit-migration/ : a script moved 75,000 test classes after AI failed. Brex, Asana and Wix - Agent automations for big migrations https://www.brex.com/journal/agent-automations-for-big-migrations : Brex’s two runs and its bugs. - We migrated off Enzyme in 2 weeks https://asana.com/inside-asana/migrating-off-enzyme-2-weeks : Asana’s post, written with OpenAI. - How Wix saved 650 developer days https://www.wix.engineering/post/how-wix-saved-650-developer-days-in-one-quarter-by-automating-code-migrations : its migration platform, owners and automatic merges. More companies - Grab’s missing tests https://engineering.grab.com/scaling-out-distroless-adoption-with-ai : an agent writes them before a security migration. - Salesforce’s agentic shift https://www.salesforce.com/news/stories/how-engineering-became-agentic/ : 33 interfaces moved in 13 days. - ServiceTitan’s reporting migration https://www.infoq.com/presentations/refactoring-ai-agents/ : a company outside big tech. - PagerDuty’s framework upgrade https://www.pagerduty.com/eng/how-ai-tools-accelerated-six-month-framework-migration-to-nine-days/ : run by a product manager. - 1Password’s refactoring lessons https://1password.com/blog/what-we-learned-using-ai-agents-to-refactor-a-monolith : a migration that went well, and a harder one. - Datadog’s storage migration https://www.datadoghq.com/blog/engineering/ai-assisted-storage-migration/ : tests as the judge, old and new side by side. - Temporal’s three practices https://temporal.io/blog/using-coding-agents-on-a-migration-three-practices-that-mattered : the post that refuses the speed claim. - Slack’s test conversion https://slack.engineering/balancing-old-tricks-with-new-feats-ai-powered-conversion-from-enzyme-to-react-testing-library-at-slack/ : script, model, then both 2024 . - GitHub’s move away from CSS-in-JS https://github.blog/engineering/architecture-optimization/improving-site-performance-by-shipping-more-css/ : a script first, then agents. GitHub sells Copilot. - Amazon’s Java upgrades https://aws.amazon.com/blogs/devops/amazon-q-developer-just-reached-a-260-million-dollar-milestone : how its saving was estimated. Amazon sells the tool. - HubSpot’s migration by hand https://hubspot.engineering/blog/migrated-from-enzyme-to-react-testing-library/ : 76,000 tests, and why no AI. - Zalando’s snapshot https://engineering.zalando.com/posts/2026/08/agentic-engineering-at-zalando-a-snapshot.html : migration skills that guide teams onto new platform tools. - Thoughtworks on AI for code migrations https://www.thoughtworks.com/radar/techniques/ai-for-code-migrations : a consultancy’s view from client work. Thoughtworks sells consulting. The agents’ own documentation Sellers’ pages, read in November 2026. - Claude Code: skills https://code.claude.com/docs/en/skills , plugins https://code.claude.com/docs/en/plugins , hooks https://code.claude.com/docs/en/hooks-guide , running with no person https://code.claude.com/docs/en/headless , command options https://code.claude.com/docs/en/cli-reference . - OpenAI Codex: AGENTS.md https://learn.chatgpt.com/docs/agent-configuration/agents-md , commands https://learn.chatgpt.com/docs/developer-commands?surface=cli . - Cursor: rules https://cursor.com/docs/rules , its API https://cursor.com/docs/cloud-agent/api/endpoints . - GitHub Copilot: instructions https://docs.github.com/en/copilot/concepts/prompting-and-context/custom-instructions , the setup file https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment , its API https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/use-cloud-agent-via-the-api , batch upgrades https://learn.microsoft.com/en-us/azure/developer/github-copilot-app-modernization/modernization-agent/batch-upgrade . What’s for sale, by job - Hosted agents: Claude Code https://code.claude.com/docs/en/claude-code-on-the-web , GitHub Copilot https://docs.github.com/en/copilot/concepts/copilot-surfaces/copilot-on-github , OpenAI Codex https://learn.chatgpt.com/docs/cloud , Cursor https://cursor.com/docs/cloud-agent , Devin https://docs.devin.ai/get-started/devin-intro . - Fleet tools, to send one change everywhere: Sourcegraph Batch Changes https://sourcegraph.com/docs/batch-changes , Moderne https://www.moderne.ai/ , Spotify’s Fleetshift https://backstage.spotify.com/fleetshift , multi-gitter https://github.com/lindell/multi-gitter , Turbolift https://github.com/Skyscanner/turbolift . - Rewrite engines with no AI: OpenRewrite https://docs.openrewrite.org/ , jscodeshift https://github.com/facebook/jscodeshift , ast-grep https://ast-grep.github.io/ , Renovate https://docs.renovatebot.com/ , Dependabot https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates . - Sold for migrations: AWS Transform https://aws.amazon.com/transform/ , GitHub Copilot modernization https://learn.microsoft.com/en-us/azure/developer/github-copilot-app-modernization/overview , Google Cloud Modernize https://cloud.google.com/solutions/modernize . Copilot’s upgrades a list of code projects in one go https://learn.microsoft.com/en-us/azure/developer/github-copilot-app-modernization/modernization-agent/batch-upgrade , for Java and .NET. Every page in that list is a seller describing its own product.