SARAVANA KUMAR · TECHNICAL KNOWLEDGE · Intermediate
An agent repeats work without making progress
Latency and cost increase while the final answer never arrives.
Illustrative lab: a planner repeatedly requests the same search. This is a learning case, not a reported customer incident.
Observable symptoms
Latency and cost increase while the final answer never arrives.
Likely cause
The workflow lacks a bounded execution budget or a rule for recognizing repeated state.
Diagnosis steps
- Trace repeated tool name and normalized arguments.
- Check whether tool failures are being mistaken for useful progress.
- Inspect terminal conditions and escalation paths.
Example
const seen = new Set();
const proposals = ['search:sql','search:sql','search:other'];
for (const proposal of proposals.slice(0, 5)) {
if (seen.has(proposal)) { console.log('escalate: repeated action'); break; }
seen.add(proposal);
console.log('execute: ' + proposal);
}Expected result
execute: search:sql
escalate: repeated actionCode walkthrough
- The Set records actions already proposed in this demonstration.
- The loop limits the number of candidate actions considered.
- A duplicate produces an explicit escalation instead of another execution. This is local policy code, not a complete agent framework.
Solution and boundaries
Bound steps, cost and wall-clock time, then define a useful stop outcome. A repeated identical call may sometimes be legitimate; combine duplicate detection with the tool contract rather than globally banning all repeats.
Prevention and monitoring
Evaluate stalled-tool and repeated-state cases; monitor budget exhaustion as a quality signal.
Interview question
What should an agent return when it runs out of budget?