Beyond Autocomplete
When GitHub Copilot launched in 2021, it felt like magic: an AI that could finish your sentences in code. Four years later, the magic has evolved into something far more ambitious. The current generation of AI coding tools — OpenAI's Codex agents, Anthropic's Claude Code, Google's Gemini Code Assist, and a host of open-source alternatives — are no longer just predicting the next line. They are reasoning about entire codebases, planning multi-step refactors, and executing migrations that would take a human team weeks.
This shift from assistant to agent has profound implications for software migration.
The Agent Architecture
An AI coding agent differs from an autocomplete model in three fundamental ways:
-
Context window: Modern agents can ingest tens of thousands of lines of code, configuration files, test suites, and documentation simultaneously. This allows them to understand not just the file you are editing, but the architectural context around it.
-
Tool use: Agents can invoke external tools — running tests, executing builds, querying package registries, reading changelogs — as part of their reasoning loop. This grounds their output in real-world feedback rather than statistical prediction alone.
-
Planning: Rather than generating code token by token, agents decompose tasks into plans, execute steps sequentially, verify results, and backtrack when things go wrong. This is the difference between "write me a function" and "migrate this Express.js middleware stack from v4 to v5, updating all affected routes and tests."
OpenAI recently published the architecture of the Codex App Server, revealing a bidirectional protocol that decouples the agent's core logic from its client surfaces. Whether you invoke Codex from the CLI, VS Code, or the web app, the same planning engine runs underneath. This standardisation hints at a future where migration agents can be orchestrated at scale across entire organizations.
Real-World Migration Use Cases
AI agents are already being applied to migration scenarios that were previously considered too labour-intensive to automate:
Framework Major-Version Upgrades
Moving from React 17 to React 18, or from Angular 15 to Angular 17, involves hundreds of small changes spread across many files: updated imports, renamed APIs, new configuration patterns, deprecated feature replacements. Agents excel at this because the changes are well-documented (in migration guides) and mostly mechanical. A human developer spends 80% of the time on the mundane changes and 20% on the tricky edge cases. An agent can handle the 80% in minutes, leaving the developer to focus on the cases that require judgment.
Cross-Language Translation
Google's internal research demonstrated AI translating code between C++, Java, and Python with accuracy rates that outperformed rule-based translators by significant margins. While production-grade cross-language migration is still in its early stages, the trajectory is clear. Teams migrating from legacy languages (COBOL, VB.NET, older PHP) to modern stacks are increasingly using AI agents for first-pass translation, followed by human review and testing.
Configuration and Infrastructure Migration
Migrating from one cloud provider to another — or from one IaC tool to another (Terraform to Pulumi, CloudFormation to CDK) — involves translating configuration files that follow provider-specific schemas. AI agents can map between these schemas with high fidelity, especially when given access to the provider's documentation and API references.
Database Schema Migration
Translating schemas between database engines (MySQL to PostgreSQL, SQL Server to Aurora) involves not just syntax changes but semantic ones: data type mappings, index strategies, stored procedure rewrites. Agents that can query both source and target documentation can propose migration scripts and flag cases where a direct translation is lossy.
The Trust Problem
Despite these advances, a fundamental question remains: how do you trust AI-generated migration output?
The answer, increasingly, is the same way you trust human-generated code: through testing. The most successful agent-driven migrations integrate testing at every step:
- The agent runs the existing test suite after each batch of changes.
- If tests fail, the agent diagnoses the failure and adjusts its approach.
- If tests pass, the changes are staged for human review.
- New tests are generated for code paths that lack coverage.
This "test-driven migration" pattern mirrors how careful human developers work, but at machine speed. The agent does not need to be perfect — it needs to be verifiable.
Leapwork's recent research underscores this point: while confidence in AI-driven testing is growing rapidly, accuracy and stability remain the decisive factors in how far teams are willing to trust automation. The implication for migration agents is clear: the tooling must produce auditable, testable output — not black-box transformations.
What This Means for Your Team
If you manage a codebase with significant technical debt — outdated frameworks, legacy languages, or a pile of deferred dependency upgrades — AI agents are moving from "interesting experiment" to "practical tool" faster than most teams realise.
Here is how to prepare:
-
Invest in test coverage. AI agents are only as trustworthy as your ability to verify their output. The teams that benefit most from agent-driven migration are the ones with comprehensive test suites.
-
Catalogue your drift. Before you can direct an agent to migrate your code, you need to know what needs migrating. A drift report that inventories every outdated dependency, framework version, and configuration pattern gives the agent — and your team — a roadmap.
-
Start small. Use an agent for a single dependency upgrade in a non-critical project. Evaluate the output quality, measure the time saved, and build confidence incrementally.
-
Pair agents with humans. The best results come from human-agent collaboration, where the agent handles mechanical changes and the human reviews, guides, and makes judgment calls.
The age of fully autonomous code migration is not here yet. But the age of agent-assisted migration is — and teams that embrace it early will move faster, upgrade more confidently, and spend less time on the work that machines can already do.
