Heisenbug
A bug that goes away or changes when you try to look at it, because looking changes the timing or the conditions. The name is a joke on Heisenberg's uncertainty principle.
Logs and debuggers change timing, so "I added a log and now it works" is a finding, not a fix. An agent can easily report that run as a success. Look for something that depends on timing, which usually means two things sharing state.
Say it to your agent
“The test passes with the log and fails without it, so this is timing. Don't keep the log. Find which two things run at once and share balance, write a test that forces the bad order, and then fix it.”