# managed_refresh_failure

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/configuration/service/managed_refresh_failure)

Return the status of the last refresh that produced no policy.

A failed refresh does not change what the process enforces: the last
enforceable generation keeps resolving, which is what fail-closed requires.
That makes the failure invisible to every surface that reads the served
snapshot, so it is reported from here instead.

## Signature

```python
managed_refresh_failure() -> ProviderStatus | None
```

## Returns

`ProviderStatus | None`

The failed status, or `None` when the current generation is fresh.

---

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