infinite-loop

Detect and mitigate infinite loop vulnerabilities in AI agent execution trajectories.

34|5|Updated May 19, 2026
One-click install
npx skills add https://github.com/antgroup/Agent3Sigma-Canary --skill infinite-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: infinite-loop
Source: https://github.com/antgroup/Agent3Sigma-Canary/tree/main/assets/skill_poison/skill_security_reviewer_benchmark_enhanced/resource-exhaustion/infinite-loop
Command: npx skills add https://github.com/antgroup/Agent3Sigma-Canary --skill infinite-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the critical risk of AI agents entering infinite execution loops, which can lead to resource exhaustion, excessive API costs, and system instability.

Core Features & Use Cases

  • Loop Pattern Detection: Identifies self-referential tasks, recursive file operations, and agent spawning loops.
  • Resource Monitoring: Tracks recursion depth and circuit breaker triggers to halt runaway processes.
  • Use Case: Use this tool during the testing phase of a new agent workflow to ensure that complex task dependencies or recursive file scanning logic do not trigger an endless execution cycle.

Quick Start

Run the infinite-loop detector on the current agent task configuration to identify potential recursion vulnerabilities.

Frequently Asked Questions about infinite-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect and prevent infinite loops in AI agent execution trajectories?

To detect and prevent infinite loops in AI agent execution trajectories, you can run a loop detector on your agent task configuration to identify self-referential tasks, recursive file operations, and agent spawning vulnerabilities before deployment.

What causes recursive file operations and multi-agent coordination to trigger endless execution cycles?

Endless execution cycles in recursive file operations and multi-agent coordination are caused by self-referential task dependencies and uncontrolled agent spawning loops that lack proper recursion depth monitoring and circuit breaker triggers to halt runaway processes.

How do I stop AI agent workflows from exhausting resources due to runaway recursive task generation?

You stop AI agent workflows from exhausting resources by applying robust circuit breaking and resource consumption tracking to monitor recursion depth, which halts runaway processes and prevents excessive API costs and system instability.

Can I use loop pattern detection during the testing phase of a new automated agent workflow?

Yes, you can use loop pattern detection during the testing phase of a new automated agent workflow to ensure that complex task dependencies and recursive file scanning logic do not trigger an endless execution cycle or resource exhaustion.

What is the best way to monitor recursion depth and apply circuit breaking in AI workflows?

The best way to monitor recursion depth and apply circuit breaking in AI workflows is to use a dedicated safety tool that tracks resource consumption and automatically halts runaway processes when execution trajectories exceed safe operational limits.

Why does multi-agent coordination cause system instability and what are the limitations of not tracking resource consumption?

Multi-agent coordination causes system instability when unmonitored agent spawning loops lead to resource exhaustion and excessive API costs. Without resource consumption tracking and circuit breaking, recursive task generation runs indefinitely without operational limits.