# safe_install_extra_recovery_command

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/update_check/safe_install_extra_recovery_command)

Return a manual recovery command, never raising.

Wraps `install_extra_recovery_command` so recovery-hint call sites never
let a second failure (validation, uv-receipt introspection, or unexpected
metadata errors) replace the original install/user error. On any failure
it logs and returns `fallback` so the hint is never empty.

## Signature

```python
safe_install_extra_recovery_command(
    extra: str,
    *,
    fallback: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `extra` | `str` | Yes | Extra name to add. |
| `fallback` | `str` | Yes | Command to return when the recovery command cannot be derived. |

## Returns

`str`

The recovery command, or `fallback` when it could not be determined.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/update_check.py#L3680)