# Do AI Agents Really Improve Code Readability?

arXiv: https://arxiv.org/abs/2603.13723 · HTML: https://mlsanity.com/paper/2603.13723/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use.
- Builds on 10 of its 40 references that are in the map.
- First posted on arXiv 14 Mar 2026.

## Placed in

- LLM agents and tool use / [Software engineering coding agents](https://mlsanity.com/agents/software-engineering-coding-agents/)

## Builds on (most cited first, 10 of 10)

- [CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation](https://mlsanity.com/paper/2102.04664/) (2021)
- [On the Use of Agentic Coding: An Empirical Study of Pull Requests on GitHub](https://mlsanity.com/paper/2509.14745/) (2025)
- [AI-assisted coding: Experiments with GPT-4](https://mlsanity.com/paper/2304.13187/) (2023)
- [Unveiling ChatGPT's Usage in Open Source Projects: A Mining-based Study](https://mlsanity.com/paper/2402.16480/) (2024)
- [Whodunit: Classifying Code as Human Authored or GPT-4 Generated -- A case study on CodeChef problems](https://mlsanity.com/paper/2403.04013/) (2024)
- [RefBERT: A Two-Stage Pre-trained Framework for Automatic Rename Refactoring](https://mlsanity.com/paper/2305.17708/) (2023)
- [Automated Unit Test Refactoring](https://mlsanity.com/paper/2409.16739/) (2024)
- [How do Developers Improve Code Readability? An Empirical Study of Pull Requests](https://mlsanity.com/paper/2309.02594/) (2023)
- [Introducing Interactions in Multi-Objective Optimization of Software Architectures](https://mlsanity.com/paper/2308.15084/) (2023)
- [Evidence is All We Need: Do Self-Admitted Technical Debts Impact Method-Level Maintenance?](https://mlsanity.com/paper/2411.13777/) (2024)

## Abstract (arXiv)

Code readability is fundamental to software quality and maintainability. Poor readability extends development time, increases bug-inducing risks, and contributes to technical debt. With the rapid advancement of Large Language Models, AI agent-based approaches have emerged as a promising paradigm for automated refactoring, capable of decomposing complex tasks through autonomous planning and execution. While prior studies have examined refactoring by AI agents, these analyses cover all forms of refactoring, including performance optimization and structural improvement. As a result, the extent to which AI agent-based refactoring specifically improves code readability remains unclear. This study investigates the impact of AI agent-based refactoring on code readability. We extracted commits containing readability-related keywords from the AIDev dataset and analyzed changes in readability metrics before and after each commit, covering 403 commits evaluated using multiple quantitative metrics. Our results indicate that AI agents primarily target logic complexity (42.4%) and documentation improvements (24.2%) rather than surface-level aspects like naming conventions or formatting. However, contrary to expectations, readability-focused commits often degraded traditional quality metrics: the Maintainability Index decreased in 56.1% of commits, while Cyclomatic Complexity increased in 42.7%.
