When instructed to read and edit code or documentation using a read_file tool, the AI interprets the single pipe character (|) as a double pipe (||).
The AI then attempts to “fix” the perceived error by changing the double pipe (||) back to a single pipe (|).
However, since the single pipe (|) is already the correct character, the documentation is not truly modified, yet the AI continues to read it as the incorrect double pipe (||) in the subsequent step.
This repeated misinterpretation and attempted correction results in the AI entering an infinite loop.
This issue has corrupted the context several times.
It appears to be potentially reproducible in my environment when requesting a code modification where the pipe symbol (|) is correctly used in the code.
Regarding step 2 of “Steps to Reproduce,” which is “Read the file using the read_file tool,” I should have specified the premise “when the AI is instructed to perform this action.”