I Deleted 168,000 Lines of Comments. My AI Agent Didn't Notice (openstation.blog)

🤖 AI Summary
A recent experiment revealed that code comments may not impact the performance of AI agents when generating code. By removing 168,000 lines of comments from a codebase and testing an AI agent—Claude Code with Opus 5.5—on both the original and comment-free versions, the outcome was strikingly similar in terms of quality. The agent successfully completed two tasks, scoring equally well regardless of the presence of comments. This indicates that comments do not enhance the agent's performance, but may simply add unnecessary complexity. This finding is significant for the AI/ML community as it challenges the conventional wisdom surrounding the necessity of comments in code, particularly when using AI-driven coding tools. The experiment emphasizes the importance of focusing on how code readability impacts human developers rather than AI agents. Given that comments did not affect the checks—including lint and hidden tests—developers might consider streamlining their code without compromising functionality, ultimately fostering leaner codebases.
Loading comments...
loading comments...