Agents Made Code Free. Maintaining It Didn't Get Cheaper. - Dmitry Buykin, Maersk

Dmitry Buykin from Maersk highlights the challenges of maintaining AI-generated code, advocating for continuous, evidence-based oversight and collaboration between human experts and agents to manage complexity and ensure reliability. Rather than relying on drastic rewrites, his approach emphasizes small, controlled updates, rigorous validation, and clear separation of business logic to sustain long-term stability in large-scale AI-driven projects.

In this talk, Dmitry Buykin from Maersk discusses the challenges of maintaining large AI-driven coding projects, particularly focusing on the balance between rapid code generation by agents and the increasing complexity and entropy that follows. He draws an analogy to the Marvel character Thanos, who solved overpopulation by wiping out half the universe, likening his own experience of “snapping” a project by deleting unused tests and boilerplate code to control runaway growth. However, this rewrite was not a permanent fix, as the agents continued to generate complexity, leading Dmitry to develop a sustainable third option: maintaining control through continuous small sweeps and feedback loops rather than drastic rewrites.

Dmitry emphasizes that defining what is “right” in such a system is complex and depends heavily on human judgment, especially since AI agents cannot fully grasp the nuances of the business rules (referred to as “pros”). He explains how the system operates across many countries with thousands of scenarios, where agents write instructions and execute them, but only humans can truly validate the correctness of these instructions. To manage this, they use a combination of mutation testing, expert reviews, and a clear separation between code and pros, ensuring that experts can read and sign off on the business logic while agents handle repetitive tasks.

The talk also covers the importance of controlling what the AI model “sees” and how it makes decisions. Dmitry describes how limiting the model’s context and validating data consistency helps prevent erroneous actions. Control is enforced both during development and at runtime, with multiple safeguards ensuring that changes are deliberate and traceable. This includes retry mechanisms, journaling to prevent duplicate actions, and strict permissioning, which together form a robust framework to keep the system reliable despite its complexity.

A significant challenge Dmitry faced was maintaining oversight as the volume of changes outpaced his ability to review them all personally. To address this, he developed monitoring tools and metrics such as “blast radius” to detect unusual changes and prioritize investigation. He stresses the importance of evidence-based decision-making, where changes are only accepted if supported by real task data and verified by independent agents. This approach prevents silent failures and ensures that the system evolves based on measurable outcomes rather than assumptions or unchecked automation.

In conclusion, Dmitry presents a comprehensive process for managing AI-generated code that balances automation with human oversight. Instead of drastic rewrites or unchecked growth, his method relies on continuous, evidence-driven maintenance and collaboration between experts and agents. He shares a set of guiding questions (“stones”) to help teams assess their projects and encourages early adoption of these practices to avoid burnout and loss of control. Ultimately, his approach transforms the daunting task of maintaining complex AI systems into a manageable, ongoing process that preserves both innovation and stability.

Useful Links