> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# AI Agent Performance Unaffected by Code Comments in Experiment
- URL: https://www.stirup.si/ai-agent-performance-unaffected-by-code-comments-in-experiment-5ee9a956/
- Published: 2026-10-14T18:05:15.000Z
- Updated: 2026-10-14T18:05:15.000Z
- Description: An experiment found that removing 168,000 lines of comments from a codebase did not affect an AI agent's performance on tasks such as tiling windows and keeping a window on top.
- Author: Satish Das
- Tags: Community, News, Stirup Research

## Experiment Setup and Scope

In an experiment to assess the impact of comments on AI agent performance, Roberto Aranda created a copy of the codebase with every comment removed, totaling approximately 168,000 lines of deleted code ([Hacker News](https://openstation.blog/2026/10/13/i-deleted-168000-lines-of-comments-my-ai-agent-didnt-notice/?ref=stirup.si)). Almost a third of the original source code consisted of comments ([Hacker News](https://openstation.blog/2026/10/13/i-deleted-168000-lines-of-comments-my-ai-agent-didnt-notice/?ref=stirup.si)). The experiment compared two versions of the code: the main branch with comments intact, and the modified branch with all comments removed ([Hacker News](https://openstation.blog/2026/10/13/i-deleted-168000-lines-of-comments-my-ai-agent-didnt-notice/?ref=stirup.si)). The goal was to determine whether the absence of comments would affect the AI agent's ability to understand and interact with the code. No claims were made about the AI agent's performance in this setup, as the results of the experiment were not disclosed in the provided excerpts.

## Results of the AI Agent's Performance

The AI agent performed consistently well across both tasks, passing all checks including linting, type checks, and existing tests. On the smaller task of tiling all open windows, the agent scored 18.3 out of 19 when comments were included, and 19.0 out of 19 when they were excluded. For the larger task of keeping a window on top, the agent scored 21.7 out of 23 with comments and 22.0 out of 23 without them. These results are averages from three runs, with costs and token usage varying slightly between the two versions. Notably, the agent also passed a hidden test added after it completed the bigger task, ensuring it did not write code specifically to pass that test, as noted by the source speaker.

## Impact of Removing Comments on Cost and Efficiency

Removing comments from code significantly impacts the cost and efficiency of AI agents. On a small task, the agent used about 22% fewer tokens without comments, which makes sense: there was simply less to read . However, on a larger task, the presence of comments increased token usage, leading to higher costs. Comparing 10.64M with 8.21M, removing comments makes the agent 30% more expensive . In three runs with comments, the agent used 8.21M, 8.79M, and 10.17M tokens, highlighting variability in token consumption based on comment density . These findings suggest that while comments can improve readability, they may also increase computational costs depending on the task size and complexity.

## Additional Observations and Findings

In additional observations, the deletion of 168,000 lines of comments did not trigger any alerts or responses from the AI agent, suggesting a lack of sensitivity to such changes. According to [Hacker News](https://openstation.blog/2026/10/13/i-deleted-168000-lines-of-comments-my-ai-agent-didnt-notice/?ref=stirup.si), the only comments remaining are those essential for tool functionality, such as lint directives and plugin headers, totaling approximately 800 lines. [Hacker News](https://openstation.blog/2026/10/13/i-deleted-168000-lines-of-comments-my-ai-agent-didnt-notice/?ref=stirup.si) notes that the changes were labeled with random names, preventing the judge from identifying which branch each modification originated from. Furthermore, [Hacker News](https://openstation.blog/2026/10/13/i-deleted-168000-lines-of-comments-my-ai-agent-didnt-notice/?ref=stirup.si) indicates that while comments had no impact, the removal of the `docs/` folder and `AGENTS.md` did affect the system, highlighting the importance of structural files over commentary in this context.

## Conclusion and Recommendations

In conclusion, the presence or absence of code comments does not influence the quality of code generated by the AI agent, according to the findings of the experiment. This suggests that developers should focus on the readability and usefulness of comments for human readers rather than considering their impact on AI performance. The experiment compared two codebases—one with comments and one without—showing that the total lines of code in the repository decreased from 765,491 to 597,332 when comments were removed. These figures are attributed to the source code measurement tool *scc*, as noted in the data appendix. The results are available for review through the provided links, including pull requests and full results pages. Developers and AI users are encouraged to evaluate comments based on their value to human collaborators rather than their relevance to AI agents.

## Sources and reporting notes

- [Hacker News](https://openstation.blog/2026/10/13/i-deleted-168000-lines-of-comments-my-ai-agent-didnt-notice/?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.