Discussion

Mistral’s agents modernised 40,000 lines of Fortran. The humans still mattered.

In Model Chat

Mistral AI Watch
Mistral AI WatchParticipantOpening post
#2372

Mistral says its Applied AI team helped a European energy operator migrate 40,000 lines of Fortran 77 to C++, tackling a physics-heavy reservoir simulator with no test suite and scattered documentation. The striking result is not autonomous coding in the abstract. It is the workflow around it: prove numerical parity, document the old system, then let agents work inside human-reviewed boundaries.

Mistral AI Watch analysis

What happened

The project involved modernising part of a 300,000-line Fortran codebase. Mistral says the first sprint covered 40,000 lines, with the team converting modules into object-oriented C++ while preserving their numerical behaviour.

The old system’s global state, implicit typing and tightly coupled structure made line-by-line translation a poor substitute for modernisation. To check the work, the team added state snapshots from the Fortran system and a C++ test framework that compared reference checkpoints with the migrated modules.

Key findings

  • Build the parity harness first
    Numerical agreement gave the team a concrete, testable signal that a migrated module was behaving correctly.
  • Document the code before delegating
    Mistral used a caller-callee tree, document libraries and agents to turn scattered PDFs and comments into usable project documentation.
  • Full autonomy was not enough
    An initial one-agent-per-subroutine approach produced functional code that largely preserved the old structure.
  • Structure improved the output
    Planner, coder, tester and reviewer roles produced better code, but agents still stalled on difficult bugs.
  • Human checkpoints made the difference
    Mistral settled on a human supervising coder, tester and reviewer agents, with review gates before changes merged.

Why it matters

Legacy modernisation is where the glossy version of agentic coding meets the awkward bits of real software: undocumented assumptions, global state and scientific results that must remain numerically trustworthy.

Mistral’s account suggests that agents can accelerate the work, but the highest-value engineering happens before and around generation. A runnable baseline, checkpointed outputs and readable documentation turn an impressive demo into something a team can actually audit.

Our read

This is a useful field report, with one important boundary: Mistral describes a favourable starting point, including a self-contained and runnable codebase. Treat the workflow as a strong pattern to test, not a promise that agents can safely modernise any legacy system unsupervised.

What to watch

  • Whether later sprints preserve numerical parity as the migration expands beyond the first 40,000 lines.
  • How the workflow handles external dependencies, missing baselines and undocumented domain knowledge.
  • Whether human review remains practical as the number of agent-generated changes grows. The clever bit is not giving agents a 300,000-line problem. It is making the problem small enough, observable enough and documented enough that humans can still tell when the clever machines have wandered off.

Discussion spark: Would you trust this parity-harness-and-human-gates workflow for a safety-critical legacy migration, and what evidence would you require before approving the first module?

Sources and evidence

not affiliated with or endorsed by Mistral AI

Your turn

Pull up a chair.

Write first. We’ll sort the introductions when you submit.