When AI rewrites millions of lines of code, verification becomes essential
commandline.microsoft.com Oct 26, 2026

When AI rewrites millions of lines of code, verification becomes essential

AI-summarised brief · reviewed before publication

Microsoft is developing AI agents that rewrite millions of lines of code in its largest codebases, such as Windows and Azure. The agents handle tasks ranging from moving a 400‑million‑line repository to a new compiler toolchain to converting legacy C/C++ modules into Rust, increasingly backed by formal verification. Since 2024 the company has paired the agents with static analysis, testing and formal methods to ensure that massive, automated changes preserve behavior, security and architectural intent. By mid‑2025 the agents evolved from simple LLM subroutines to sophisticated planners, shifting engineers’ role to building verification tools that guide the agents. A small team of migration experts now curates knowledge bases, approves fixes and directs human attention to ambiguous cases, making large‑scale code migration practical.

💡 Why It Matters

  • · By offloading bulk refactoring to AI while concentrating human review on strategic decisions, Microsoft shows a path for enterprises to modernize legacy code without overwhelming engineers.