Get Recovery Action • AI Agent SDK
get_recovery_action: Get recommended recovery action when doom loop detected.
get_recovery_action
Method
</div>
This is a method of the DoomLoopTracker class in the autonomy module.
Get recommended recovery action when doom loop detected.
Returns graduated recovery actions:
- “retry_different”: Try a different approach (1st detection)
- “escalate_model”: Escalate to stronger model (2nd detection)
- “request_help”: Request human intervention (3rd detection)
- “abort”: Stop execution (4th+ detection)
- “continue”: No doom loop, continue normally
Signature
def get_recovery_action() -> strReturns
ResponseField
strThe result of the operation.
Uses
is_doom_loop
Used By
Source
View on GitHubpraisonaiagents/agent/autonomy.py at line 481