Unattended Agent Migrations: Where the Risk Moves

The pitch for unattended migration is simple: point frontier models at a legacy codebase, let them work around the clock, and come back to a rewritten UI, a cleaner backend and hundreds of thousands of new lines. Anthropic describes one port where Claude designed its own end-to-end test suite and ran it "autonomously overnight, fixing what broke and re-running four nights in a row." The part the pitch skips is the testing that still has to happen before anyone trusts the result.
That is the real price. Unattended migration does not remove risk. It moves it out of writing code and into judging code. Below: what public migrations show, where the risk lands, a decision table, and a checklist for the agent's process.
What the Public Numbers Show
Three write-ups give real figures.
- Anthropic, July 2026. In How Anthropic runs large-scale code migrations with Claude Code, individual developers "migrated 10 code packages consisting of tens to hundreds of thousands of lines of code" in one month, using Claude Fable 5, Claude Opus 4.8 and dynamic workflows. For the Bun port from Zig to Rust, "A million lines of code were produced in less than two weeks," with 100% of Bun's existing test suite passing in CI before merge. That run used 5.9 billion uncached input tokens and 690 million output tokens, around $165,000 at API pricing. Another engineer "migrated a Python codebase to 165,000 lines of TypeScript over a weekend."
- Airbnb. Its test migration post covers "nearly 3.5K React component test files" moved from Enzyme to React Testing Library "in just 6 weeks," against an original estimate of "1.5 years of engineering time to do by hand."
- Google. In How is Google using AI for internal code migrations?, the authors report that "80% of the code modifications in the landed CLs were fully AI-authored" in one migration, and that engineers estimated total time fell by 50%.
None of these teams trusted the model's word. Each one had a mechanical judge: a test suite, a compiler, a linter, an output diff. The speed came from the agents. The trust came from the judge.
Where the Risk Moves
1. Into the Judge
Anthropic's guide puts this before any translation: "have a strong judge in place, otherwise you won't have an exit condition or measure of success." And bluntly: "a judge that doesn't catch breakage isn't a judge." Its prerequisites include categorizing the existing tests, rewriting them for portability, and having adversarial agents check that rewritten tests do not weaken assertions.
Legacy projects often have no suite worth the name. The guide says "a missing test suite doesn't block this step" and suggests you "have Claude build one." That works, but now the checks are part of the output. An agent that writes the code and the tests that grade it can make the two agree. We covered that trap in agents that grade their own acceptance criteria: agent-built checks need review like any other code, and the implementer must not be able to edit them.
2. Into "Done"
Anthropic's harness post for long-running agents names the failure: "Claude's tendency to mark a feature as complete without proper testing." Without explicit prompting, the agent tested with unit tests or curl against a dev server and did not notice when a feature failed end to end. Long runs add a second version: a later session "would look around, see that progress had been made, and declare the job done."
Their fixes are concrete. A JSON feature list where agents may change only the passes field, because "the model is less likely to inappropriately change or overwrite JSON files compared to Markdown files." A prompt line that reads "It is unacceptable to remove or edit tests because this could lead to missing or buggy functionality." A git commit with a progress note at the end of each session, so a bad change can be reverted. And browser automation for end-to-end checks.
3. Into the Long Tail
Airbnb migrated "75% of our target files in just four hours." Getting from 75% to 97% took four more days of tuning, with long-tail files retried "anywhere between 50 to 100 times." The last "just under 100 files" were fixed by hand in another week.
Passing every test is not the finish line either. After the Bun merge, "Nineteen regressions surfaced after merge and have all been fixed." Anthropic's warning on partial results: "if the end result was 90% parity, you had a bigger headache than when you started." The remaining bill is whatever the judge cannot see.
4. Into Review
Google's paper: "Code reviews and change rollouts still require a human operator and can quickly become bottlenecks in the larger code migration process." Hundreds of thousands of lines cannot be read line by line on any honest schedule. Review has to move up a level, to the rules the agents follow. Anthropic's advice: "Your attention belongs on the patterns." When a reviewer keeps catching the same mistake, "You add one sentence to the rulebook and regenerate the affected batch."
Why UI Rewrites Leave the Biggest Bill
Anthropic notes that its stress-test step "only works for structure-preserving migrations." A port that keeps the structure has an old program to diff against. A UI rewrite changes both the structure and what users see. Unit tests rarely cover layout, focus order, or a five-step checkout flow. Browser automation helps, but it has blind spots: the harness post says Claude "can't see browser-native alert modals through the Puppeteer MCP." This is where the manual testing comes from. They are not a sign the run failed. They are the price of a weak judge, paid late.
Decision Table: How Unattended Can It Run?
| Migration shape | Judge you can get | Run unattended? | Where the remaining bill lands |
|---|---|---|---|
| Structure-preserving port, strong existing suite | Existing tests, compiler, output diff | Yes, overnight loops | Regressions the suite missed |
| Framework swap, per-file checks | Tests, lint and type checks per file | Yes, with a retry cap | Long-tail files fixed by hand |
| Backend cleanup, thin tests | Agent-built characterization tests | Only after a human reviews the tests | Behaviour the new tests froze wrongly |
| UI rewrite | Browser end-to-end scripts, scenario runs | Partly | Manual exploratory testing |
| Behaviour redesign | Nothing mechanical | No | All of it |
What to Demand Before You Trust the Output
Ask for evidence of each item, not a summary from the agent:
- A validated judge. Break something on purpose before the run starts. The judge must fail.
- Checks the implementer cannot edit. Tests live outside its write scope, or a hash check fails the run when they change.
- A rulebook and a throwaway stress test. Anthropic's guide runs a mini-migration first and discards the output: "The goal is to refine the rules, not make incremental progress."
- A mechanical queue. Done means the artifact exists and the check passed, so the run is resumable after a crash.
- Reviewers with separate contexts. In Anthropic's process, "Two adversarial reviewers evaluate the work of the implementers using separate contexts," and disagreements go to a third agent. See also clean-context critics.
- A parity diff on real scenarios. One port ended with "a final parity check that diffed every command's output against the Python original."
- A retry cap with a failure list. Airbnb "built a loop runner that ran each step up to a configurable number of attempts." What hits the cap goes to a person, with logs.
- A coverage map of what the judge does not see. This is your manual test plan, and its size is the honest estimate of the remaining work.
A Worked Example: Pricing the Remaining Bill
Before you start a long run, split the codebase into modules and tag each one with the judge it will have:
# judge-map.yaml: written before the run, updated after it
modules:
billing-api: { judge: existing-suite, parity: true } # spot-check
reports-api: { judge: agent-tests-reviewed, parity: true } # sample review
admin-ui: { judge: browser-e2e, parity: false } # scripted flows plus manual pass
legacy-export: { judge: agent-tests-unreviewed, parity: false } # full manual test
settings-ui: { judge: none, parity: false } # full manual test
Modules with an existing suite and a parity diff need a spot check. Modules with reviewed agent-built tests need a sample review. Everything tagged agent-tests-unreviewed or none needs a full manual pass, and the sum of that bucket is your testing estimate. If the run built a large set of checks along the way, re-tag the modules afterwards: each module that moves up a level shrinks the bill. If most of the code sits in the last two rows, you know the price before you spend the tokens.
The Same Rule in Operations
Unattended agents in operations follow the same rule: the agent can draft, but something else decides. In Akmatori, per the architecture docs, the self-improvement evaluator is a system cron job, off by default, that runs without connector tools and drafts runbook and skill updates as proposals. An operator approves or rejects each one before it changes anything. And before a model goes into a loop at all, SRE Bench shows how it does on real production incidents.
Conclusion
Unattended agents make writing a migration cheap. They do not make trust cheap. The risk moves into the judge, the definition of done, the long tail and the review queue. Demand a validated judge, checks the agent cannot touch, separate-context review, parity diffs and a map of what the checks miss, then budget manual testing for that map up front.
If your team wants AI-assisted incident workflows where agents draft and operators decide, Akmatori helps SRE teams investigate alerts, coordinate response, and automate safe infrastructure actions. Powered by Gcore for global infrastructure reliability.
