Earlier quoted context omitted.
One of the most annoying quirks of LLMs for me is the insistence on, after being corrected, loudly noting what wasn't done. After getting it to change something stupid in code, it will leave a comment in the code boasting about how it doesn't do the stupid thing, which to future readers reads like an 'asbestos free!' label on a cereal box.
One of the reasons this is there is the "psychology" of the LLM performs better with these kinds of affirmations. If you've made a mistake once you're likely to make it again, so leave a note. This indeed pollutes the code with a bunch of nonsense. One of the things I have it maintain instead is a "findings" document with lessons learned and such.
In my experience the comments behave as a form of prompt injection. The llm makes a conceptual mistake, writes it in a comment, and now subsequent agents make the same mistake!