Skip to main content

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

  1. Trace repeated tool name and normalized arguments.
  2. Check whether tool failures are being mistaken for useful progress.
  3. 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 action

Code walkthrough

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?

Official reference · Related technical guide