> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Recovery Action • AI Agent SDK

> get_recovery_action: Get recommended recovery action when doom loop detected.

# get\_recovery\_action

Method

> This is a method of the [**DoomLoopTracker**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/DoomLoopTracker.md) class in the [**autonomy**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/autonomy.md) 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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_recovery_action() -> str
```

### Returns

**Returns** `str`

The result of the operation.

## Uses

* `is_doom_loop`

## Used By

* [`EscalationPipeline.execute_at_stage`](../functions/EscalationPipeline-execute_at_stage)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/autonomy.py#L481)
>
> `praisonaiagents/agent/autonomy.py` at line 481


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.