Configuration Smells in AGENTS.md Files: Common Mistakes in Configuring Coding Agents
Summary
A study identifies six common configuration "smells" in AGENTS.md and CLAUDE.md files, which guide coding agents in automating software engineering tasks. Researchers conducted a grey literature review and repository mining to catalog these issues, then evaluated their prevalence across 100 popular open-source repositories. Findings reveal that configuration smells are widespread, affecting 91% of analyzed files. Lint Leakage was the most common, present in 62% of files, followed by Context Bloat (42%) and Skill Leakage (35%). The study also highlights frequent co-occurrence patterns, particularly among Context Bloat, Skill Leakage, and Conflicting Instructions, suggesting that multiple issues often compromise agent performance. Automated heuristics, including LLM-based detection, were proposed and validated for identifying these smells.
Key takeaway
For AI Engineers or ML Engineers configuring coding agents, proactively addressing configuration "smells" in AGENTS.md or CLAUDE.md files is crucial. Regularly review your agent's configuration for issues like Context Bloat, Lint Leakage, and Conflicting Instructions to optimize performance, reduce token costs, and ensure consistent agent behavior. Consider implementing automated detection tools to maintain configuration file quality and prevent performance degradation.
Key insights
Configuration "smells" in AGENTS.md/CLAUDE.md files are widespread, increasing costs and reducing coding agent effectiveness.
Principles
- Agent configuration files should be concise and focused on essential guidance.
- Avoid duplicating rules already enforced by linters or formatters.
- External references require descriptive context for agents to prioritize information.
Method
Six configuration smells were identified via grey literature review and repository mining, then detected in 100 open-source projects using LLM-based heuristics and line-of-code thresholds.
In practice
- Target under 200 lines for AGENTS.md/CLAUDE.md files.
- Move task-specific instructions to separate "skill" files.
- Periodically review configurations to remove outdated or conflicting instructions.
Topics
- Coding Agents
- Configuration Management
- LLM Context
- Code Smells
- Software Engineering
- AGENTS.md
Code references
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.