Overview
When you enable autonomy on an Agent, doom loop detection is automatically included. The agent monitors action history for patterns that indicate stuck states:- Repeated identical actions
- Repeated similar actions
- Consecutive failures
- No meaningful progress
Quick Start
How It Works
When autonomy is enabled, the agent tracks every action it takes. If the same action is repeated too many times (default: 3), the agent detects a doom loop and takes corrective action.Configuration Options
Configure doom loop detection through the autonomy parameter:Manual Checking
You can manually check for doom loops during custom execution flows:Best Practices
- Use Agent(autonomy=True) - Doom loop detection is automatic
- Adjust threshold - Set
doom_loop_thresholdbased on your use case - Reset between tasks - Call
_reset_doom_loop()when starting new tasks - Let the agent handle it - The agent automatically breaks loops during normal execution

