← Back to Artificial Intelligence cs.AI
How do AI agents safely evolve their own code while running?
Mariano Garralda-Barrio
May 26, 2026
AI agents increasingly generate and execute code as part of their reasoning loop, but letting them modify that code on the fly raises safety and reliability questions. This paper formalizes a governance framework called HarnessMutation that treats agent-generated code as persistent runtime artifacts that can evolve—but only within explicit constraints: validation checks, execution traceability, performance evaluation, and automatic rollback on failure. The approach operationalizes this over modern agent orchestration systems, making self-adaptive AI systems auditable and constrained rather than black boxes.
Read the original paper →