Delete, Write, Delete, Write
- Admitted
- 2026-09-16
- Source dataset
- BugReAct (When Agents Fail)
- Failure mode
- Infinite loop
- Agent system
- Autonomous loop
- Tool access
- Write access
- Industry
- Software development
Presenting Behaviour
An autonomous agent tried to update an existing file and got an error saying the file had already been updated. Rather than switching to the correct append operation, it entered a sustained loop alternating between deleting the file and rewriting it from scratch, repeating the same failing cycle well past the point where it could plausibly have worked.
Case Replay
A reconstruction, not a simulation. This sequence is reconstructed from the public incident record and summarised in our own words. It is a static record of what was reported, and nothing here can be run or replayed live.
4 steps
- Update fails. The agent gets an error that the file was already updated.
- Wrong alternation. It alternates between deleting and rewriting the file. This is where the agent derailed.
- Never uses append. It does not switch to the correct operation.
- Cycle persists. The loop continues well past any chance of working.
Differential Diagnosis
A transient error that should have cleared on its own, considered and ruled out; the error was a consistent, repeatable response to the update attempt, not an intermittent glitch that random retries might eventually clear.
No viable alternative action existed, considered and ruled out; a separate append operation existed in the agent's own available toolset and would have avoided the conflict entirely.
Perseveration (most consistent with the evidence: after hitting the same "already updated" error, the agent alternated between two actions) delete, then rewrite, neither of which addressed the actual cause, cycling between them instead of trying the append path that was available the whole time.
Working Diagnosis
Perseveration: the agent responded to a repeated update conflict by cycling between two ineffective actions rather than recognizing and using the correct available alternative.
Discussion
This is an early, well-documented instance of a failure pattern that has kept recurring in agent frameworks since: an error message contains the information needed to recover, and the agent's retry logic never reads it. The fix hasn't changed either, parse the specific error before retrying, and cap identical-action retries at a small, fixed number.
Mitigation Strategy
Parse the specific error before retrying, and cap identical-action retries.
Governance Guardrails
Error-aware retry logic; fixed retry caps; alternative-operation hints.
Typical Presentation in Human Patients
General clinical background, included for context. Not medical advice, and not a diagnosis of any individual.
Perseveration is the inappropriate repetition of a word, gesture, or action well past the point where it's still relevant or useful. It's a well-documented sign of frontal lobe dysfunction, and also appears in some forms of dementia and obsessive-compulsive disorder.
Source Note
GitHub, Significant-Gravitas/AutoGPT
https://github.com/Significant-Gravitas/AutoGPT/issues/2782