Back to the ward
Case 0464MinorPerseveration

Eight Hours of Trying the Same Thing

Admitted
2026-09-14
Source dataset
Other / sample
Source
GitHub, aws-samples/generative-ai-use-cases issue #1308
Failure mode
Infinite loop
Agent system
Autonomous loop
Tool access
System admin
Industry
Software development

Presenting Behaviour

A developer using Amazon Bedrock AgentCore Runtime with the Nova Pro model reported that a CodeInterpreter tool call entered an infinite retry loop: Nova Pro failed to properly acquire the CodeInterpreter session, then kept retrying the same acquisition indefinitely rather than surfacing the failure. Because no API existed to halt the runtime once it started, the reporter warned the loop could run for up to eight hours unattended, and the only way to stop it was to forcibly revoke the underlying IAM permissions out from under the agent. The problem was isolated to Nova models specifically when prompt and tool caching were both enabled; disabling those caching settings resolved it.

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

  1. Session acquisition fails. Nova Pro cannot acquire the CodeInterpreter session.
  2. Retries forever. It keeps retrying instead of surfacing the failure. This is where the agent derailed.
  3. No stop API. There is no way to halt the runtime.
  4. Permissions revoked. The reporter must revoke IAM permissions to end it.

Differential Diagnosis

Apraxia, plausible at first glance, since the failure centers on a tool (CodeInterpreter) not being used correctly. Ruled out because apraxia describes a single botched attempt at using a tool; here the problem wasn't the attempt itself but what happened after it failed, an unbounded, unmodified repetition of the exact same failing call.

Concrete Thinking, considered, since the underlying trigger was a caching setting interacting badly with session acquisition. Ruled out because there was no ambiguous instruction being followed too literally; this was a retry mechanism with no exit condition, not a misreading of what was asked.

Perseveration, most consistent: once the session-acquisition call failed, the agent (and the surrounding runtime) repeated the identical failing action without adapting, escalating, or stopping, for as long as eight hours, with the only real off-switch being to cut its credentials.

Working Diagnosis

Perseveration: a failed CodeInterpreter session acquisition, under a specific caching configuration, produced an unbounded retry loop with no error-parsing or stop condition, requiring the operator to revoke the agent's permissions to end it.

Discussion

A retry loop with no ceiling is a small bug with an unbounded cost, the difference between a two-second hiccup and an eight-hour runaway job is often just a missing iteration cap or timeout, not a deeper reasoning failure. Any agent given the ability to retry a failed action should also be given a hard limit on how many times it's allowed to do so, and a way for a human to cut it off that doesn't require touching IAM policy.

Mitigation Strategy

Set a hard limit on retries and give humans a way to stop the run without touching IAM policy.

Governance Guardrails

Iteration caps; timeouts; operator stop API for runtimes.

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, aws-samples/generative-ai-use-cases issue #1308

https://github.com/aws-samples/generative-ai-use-cases/issues/1308