A developer and humanoid robots work among glowing data displays in a futuristic city of server towers.
Microsoft says it can now point AI agents at some of the largest codebases in the industry, Windows and Azure included. Its harder claim is that the bottleneck has moved from writing code to trusting it. Coding agents can produce more code than humans can inspect carefully. A Microsoft Command Line post titled "Cheap code, precious trust," by Sriram Rajamani and Tim Bozarth, both CVPs in CoreAI, is the company's first-person account of how it handles that gap. It is the first post in a planned series.

This is an internal engineering narrative, not a product launch or an independent evaluation. The post gives no benchmarks, error rates or review-time savings, and no outside validation. Everything below is the authors' own characterization.

A developer and humanoid robots work among glowing data displays in a futuristic city of server towers. The central argument: generation is cheap, trust is not​

The authors say they have combined AI agents with static analysis, testing and formal verification since 2024. They describe an "inversion of control" in how they work:

  • They first hard-coded workflows that called LLMs as subroutines.
  • By May 2025, they say, agents had become better planners than those pipelines.
  • The team's job then became building the tools that agents call.
  • The most valuable of those tools tell an agent, and the engineers behind it, whether a change is right.

Their stated design principle is that human attention is the scarcest resource. Tools should spend it where it matters most, rather than asking experts to read every edit.

Migration: a small expert team, a knowledge base, many agents​

The post defines migration as a codebase-wide transformation toward one engineering goal. Examples are dependency upgrades, adopting a new compiler, remediating static-analysis findings and moving to a new platform. Its case studies are:

  • Adding Clang/LLVM toolchain support across the Windows codebase. The authors call it several hundred million lines in one place and a "400-million-line codebase" in the intro. Treat both as approximate.
  • Remediating findings from CodeQL, PREfast and Roslyn analyzers.
  • Retargeting services from x86 to ARM.

The operating model is deliberately centralized. A very small team of migration experts drives the effort, instead of spreading ownership across thousands of engineers. The process runs in four steps:

  1. Agents learn a candidate knowledge base from sampled findings.
  2. A reviewer agent scores each proposed fix on correctness, minimality, consistency with file conventions and maintainability. Its findings refine the knowledge base.
  3. Human experts approve the knowledge base rather than individual fixes.
  4. Agents apply the approved knowledge across the codebase. Humans handle novel or ambiguous cases, and similar fixes are grouped to ease review.

The post does not give sampling rates, approval thresholds or safeguards against the reviewer agent missing a defect. It also gives no completion figures for the Clang/LLVM work. That leaves a fair question for skeptics: if experts approve the rules and not the edits, how well do those rules hold up against a long tail of odd code?

C and C++ to Rust: a bottleneck that keeps moving​

Microsoft presents Rust as safety by construction, but only if the rewrite preserves exactly what the original did. The authors give a four-step timeline of what their agents could do:

PeriodWhat the agents could do
January 2025Generated Rust that did not compile
June 2025Code compiled but failed to run correctly or pass tests
September 2025Working translations of about 30,000 lines, with manual guidance
February 2026 onwardModernizing large codebases with "significant automation"

The post does not name the codebase, define "significant automation" or say how much manual guidance was needed. Its point is that each stage moved the bottleneck, from compiling to passing tests to validated behavior at scale.

The validation approach has several parts:

  • Feature-by-feature migration. The team says this works better than translating line by line. A feature is a unit of user-visible behavior, with scenario-driven end-to-end tests and its own validation gate.
  • Differential testing. This compares source and target behavior.
  • Held-out tests. Tests the agent never sees are used to measure robustness and catch overfitting.
  • Formal proof. More recently, the team has begun extracting formal specifications from the source, carrying them into the target language, and using Verus to prove the modernized code satisfies them. The post does not say every translated component is verified.

Specification-driven development​

The authors argue that tests and reviewers cannot keep pace with agent output. Locally plausible code can still break architectural assumptions, distributed protocols, security boundaries or operational invariants. Their answer is to make intent explicit:

  • Agents infer formal specifications, such as TLA+, from existing code.
  • TLC checks whether the implementation's execution traces are admitted by the specification.
  • A trace that is not admitted may point to a code defect, an inaccurate specification or an invalid test. Agents revise whichever is wrong.
  • Specifications generate test cases for tricky concurrent interleavings and fault scenarios.
  • Candidate properties and inductive invariants are model-checked on small, finite configurations to find counterexamples quickly.
  • Proofs for all configurations are done in F and Lean, using TLA+-to-F and TLA+-to-Lean compilers the team says it is still building.

The goal is to let engineers approve the properties a system must satisfy while agents find the invariants needed to prove them. The authors concede that a trace being admitted shows only that the specification admits observed behavior. It does not show the specification captures what the system should do.

Context: this lines up with other Microsoft work​

The tooling in the post is part of a wider push. One example is the Proof-Driven Development Kit from Microsoft Research and GitHub Next. It is in research preview and converts a developer's plan into a formal specification, then checks AI-generated Rust with a theorem prover. Reporting on that kit says the workflow could reduce line-by-line review for properties covered by a proof, while architecture, specification quality, dependencies, security boundaries and deployment behavior stay under human review. That is the same trade-off the Command Line post describes.

On the research side, Verus is a verifier for Rust. It translates a program into SMT formulas and uses the Z3 solver, with user-provided proof hints, to check whether the code satisfies its specifications. Microsoft Research's VeriStruct paper reports that, on eleven Rust data-structure modules, it succeeded on ten, verifying 128 of 129 functions (99.2%). Those are research results on bounded modules. They are not evidence about a Windows-scale rewrite.

What this means for Windows and enterprise readers​

  • Windows is an AI-assisted engineering target. The Clang/LLVM work signals that the toolchain, not just features, is being changed with agent help. The post says nothing about customer-visible timelines or changes.
  • Review is shifting upstream. If this model spreads, scrutiny moves from individual diffs to knowledge bases, specifications and properties. Teams adopting agents may need to plan for that.
  • Verification is a gate, not a guarantee. The authors stress that proofs depend on the specifications. A wrong specification can certify the wrong behavior, and proofs about functional correctness say little about performance or security.
  • Open questions remain. The authors leave four unresolved: whether AI-written specifications can be trusted, whether verification can cover security, performance and reliability, whether engineers will eventually stop reading code, and who owns code when any agent can change anything.

Bottom line​

The post is a credible description of an engineering philosophy, and a useful marker of how Microsoft thinks about agent-scale change. It is not proof that agents can safely modernize arbitrary production systems. Its own caveats say expert oversight is still essential. The next posts in the series will be worth watching for numbers on the compiler migration, the Rust translations and how much human review time the approach actually saves.

 

References

  1. Cheap code, precious trust: Code modernization at scale Microsoft 2026-10-26T13:35:44+00:00
  2. VeriStruct: AI-assisted Automated Verification of Data-Structure Modules in Verus - Microsoft Research microsoft.com
  3. Can LLMs Reason Like Automated Theorem Provers for Rust Verification? VCoT-Bench: Evaluating via Verification Chain of Thought arxiv.org