Do AI Agents Write Less Maintainable Code Than Human Developers?
Abstract
Coding agents offer major efficiency gains for software engineering, but their effects on the downstream functionality and quality of a code base remain understudied. Existing evaluations largely focus on whether agents can resolve individual issues, overlooking how agent-authored code may affect future development by making the code harder to interpret, extend, or build on---the code's \emph{maintainability}. We design a controlled experiment to compare the maintainability of agent-authored versus human-authored code by constructing two-step pull-request chains in which the same downstream task is performed on top of either human- or agent-authored code. We find that agent-authored code consistently leads to more downstream failures than human-authored code, with absolute task resolve rate drops of 1.0 to 13.0 percentage drop across Claude 4.5 Sonnet, GPT-5, GLM 4.7, and MiniMax 2.5, as well as larger increases across structural complexity and verbosity metrics. We report additional findings on differences in performance and code quality across task types and common failure modes. Our findings suggest that coding agents contribute to both downstream performance drops and code quality degradation, a critical consideration as agent use becomes more widespread and agent-authored code increasingly becomes the foundation for future development.