Skip to content

[Bug] Nested agent tool storm — prevent model failover cascade and credit burn #52

Description

@Piboonsak

Mirror of: Piboonsak/Openclaw#191

Problem

When nested agents call tools in a loop, a tool storm can cascade into model failover attempts, burning API credits rapidly.

Requirements

  1. Detect tool call loops/storms (e.g. same tool called N times in succession)
  2. Apply circuit-breaker: abort agent run after threshold
  3. Log storm event with tool call trace for debugging
  4. Return graceful error message to user

Files to modify

  • src/agents/ — add loop detection / circuit breaker logic
  • Tests for the detection and abort scenario

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions