Reliability EngineeringdebuggingIntermediate

The agent loops forever: Search → Analyze → Search → Analyze

Symptoms

  • A research agent alternates the same two steps — Search, then Analyze — dozens of times without ever answering.
  • Each Search call uses a near-identical query and returns the same top results.
  • The run only stops when it hits the API spend cap, not because it finished.
step 14  tool=search_web  args={"q":"latest node lts version"}  -> [same 3 results as step 12]
step 15  tool=analyze     args={"note":"still unsure, searching again"}
step 16  tool=search_web  args={"q":"latest node lts version 2024"}  -> [same 3 results]
step 17  tool=analyze     args={"note":"still unsure, searching again"}
... (loop continues to step 61, killed by budget guard)

Investigate

Inspect areas in any order (0/5 inspected). When you think you know the root cause, commit to it.

Termination criteria
Tool result parsing
Step limit
Prompt
Memory