> Markdown version of [/videos/100320-when-agents-meet-legacy-never-change-a-running-system?t=8](https://www.wearedevelopers.com/videos/100320-when-agents-meet-legacy-never-change-a-running-system?t=8). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # When Agents Meet Legacy: Never Change a Running System Can AI safely refactor an undocumented legacy monolith? Uncover where automated modernization succeeds, and why giving agents deep architectural context is critical to preventing migration disasters. - **Speakers:** [Michael Friedrich](https://www.wearedevelopers.com/@michael-friedrich) - **Event:** World Congress 2026 Europe - **Published:** July 10, 2026 - **Duration:** 28:57 - **URL:** https://www.wearedevelopers.com/videos/100320-when-agents-meet-legacy-never-change-a-running-system ## Summary Engineers often face the daunting task of untangling legacy systems—from undocumented C/C++ memory leak workarounds and overgrown Java monoliths to aging COBOL logic. While passing these workloads to AI for automatic refactoring seems appealing, AI agents frequently lack the deep business context required for safe migrations. This discussion explores whether AI can effectively drive code modernization, detailing where agents succeed in codebase triage and where they ultimately fail without strategic human oversight. Walking through real-world scenarios across multiple environments, the modernization process proves to be highly iterative. When an agent proposes deleting a legacy "workaround" in C++ or moving a stateful Java application directly to Kubernetes, it often ignores hidden constraints—such as embedded local cache files that vanish upon pod restarts. Engineers must demand evidence by instructing agents to write focused regression tests to prove code safety before committing changes. Similarly, when prompting agents to translate embedded C firmware to Rust, the AI frequently overlooks critical target constraints like hardware compatibility, a lack of standard library support, and stringent ISO certification requirements. These examples highlight why target environment validation is far more complex than simple language translation. To maximize the value of AI in code migrations, engineers must "become an archaeologist" by unearthing past architectural decisions from old tickets or Git histories and documenting them to give models proper grounding. Exposing software development life cycle (SDLC) data, such as issues and pull requests, to agents via Model Context Protocol (MCP) servers or context enrichment graphs vastly improves their decision-making accuracy. Teams can also optimize costs by utilizing smaller language models to explain and inventory legacy code like COBOL before mapping complex migrations. AI solutions serve as powerful guides for generating operational breakdowns and testing theories, but they cannot replace engineering judgment. Ensure strict CI/CD quality gates, maintain human-in-the-loop reviews, and remember that "the messy decisions are still yours." **Keywords:** software modernization strategies, ai agents, legacy c++ debugging, java monolith to kubernetes, cobol reverse engineering, rust embedded firmware, model context protocol, context enrichment graphs, sdlc data integration, iterative code migration, automated regression testing, containerization challenges, ai governance, legacy system triage, technical debt management ## Chapters 1. **Evaluating AI agents for iterative legacy code modernization** (00:08) — Using AI agents to analyze legacy applications provides an iterative, low-risk approach to handling difficult codebases. 1. **Testing AI agents on undocumented C++ network workarounds** (03:12) — AI agents can analyze undocumented bugs, but human judgment remains essential when removing structural workarounds. 1. **Migrating stateful Java monoliths to Kubernetes environments** (09:31) — Relying on agents to containerize monoliths can break application architectures that depend on localized ephemeral storage. 1. **Analyzing COBOL mainframe migration challenges with AI** (17:11) — Leveraging LLMs allows developers to understand outdated mainframe deployments before attempting risky automated code translations. 1. **Evaluating Rust for modernizing embedded C firmware** (21:52) — Physical hardware limitations and strict ISO certification protocols frequently restrict automatic transitions from embedded systems to newer languages. 1. **Preparing legacy architectures for AI-assisted code modernization** (24:06) — Consolidating issue trackers and documenting past engineering choices provides reasoning models with necessary contextual data for migrations. 1. **Reviewing best practices for validating automated modernization proposals** (27:07) — Testing automated code migrations through minimal viable changes makes systemic errors easier to track and reverse. ## Related Moments - [Modernizing legacy COBOL mainframe systems using AI agents](https://www.wearedevelopers.com/videos/1365-wearedevelopers-live-the-weekly-developer-show-with-chris-heilmann-and-daniel-cranney) (from " WeAreDevelopers LIVE - the weekly developer show with Chris Heilmann and Daniel Cranney") - [Deploying AI agents for enterprise legacy code modernization](https://www.wearedevelopers.com/videos/100256-can-this-elephant-dance-ibm-bob-and-the-future-of-ai-first-software-development) (from "Can This Elephant Dance? IBM Bob and the Future of AI-First Software Development") - [Leveraging artificial intelligence to accelerate system migration](https://www.wearedevelopers.com/videos/1444-crew-management-system-for-airlines-plan-duties-for-pilots-flight-attendants-worldwide) (from "Crew Management System for Airlines: Plan duties for pilots & flight attendants worldwide") - [Migrating legacy applications using generative AI](https://www.wearedevelopers.com/videos/1605-navigating-application-modernization-leveraging-gen-ai) (from "Navigating Application Modernization - Leveraging Gen-AI") - [Multi-agent AI for migrating legacy COBOL to Java](https://www.wearedevelopers.com/videos/1531-migrating-from-cobol-with-ai-a-moonshot-demo) (from "Migrating from COBOL with AI: A Moonshot Demo") - [The reality of using AI coding agents in legacy codebases](https://www.wearedevelopers.com/videos/100236-code-is-cheap-software-isn-t) (from "Code Is Cheap. Software Isn’t.") ## Related Articles - [What is Agentic Programming and Why Should Developers Care?](https://www.wearedevelopers.com/magazine/625-what-is-agentic-programming-and-why-should-developers-care) - [Never delegate the understanding](https://www.wearedevelopers.com/magazine/749-never-delegate-the-understanding) - [Exploring AI: Opportunities and Risks for Developers](https://www.wearedevelopers.com/magazine/522-exploring-ai-opportunities-and-risks-for-developers) - [Transforming Software Development: The Role of AI and Developer Tools](https://www.wearedevelopers.com/magazine/527-transforming-software-development-the-role-of-ai-and-developer-tools) ## Related Jobs - [Senior AI Agent Software Engineer (Go, Python) (m/f/x)](https://www.wearedevelopers.com/jobs/48277-senior-ai-agent-software-engineer-go-python-m-f-x) at **Dynatrace** - [Staff Software Engineer, Copilot Experiences](https://www.wearedevelopers.com/jobs/ext/164361-staff-software-engineer-copilot-experiences) at **GitHub** - [Principal Product Manager, Agent Platform](https://www.wearedevelopers.com/jobs/ext/277541-principal-product-manager-agent-platform) at **GitHub** - [AI Software Engineer (Germany)](https://www.wearedevelopers.com/jobs/48317-ai-software-engineer-germany) at **Sunhat** - [Principal Software Engineer, Enterprise AI Platform](https://www.wearedevelopers.com/jobs/ext/1467292-principal-software-engineer-enterprise-ai-platform) at **GitHub** - [Senior Backend Developer — AI: MCP & Agent Engine](https://www.wearedevelopers.com/jobs/48297-senior-backend-developer-ai-mcp-agent-engine) at **basebox GmbH**