# managed_reload_block

> **Function** in `deepagents_code`

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

Return the managed-policy block notice a reload reported, if any.

## Signature

```python
managed_reload_block(
    changes: Sequence[str],
) -> str | None
```

## Description

Scans the whole list rather than only its first entry. The notice is
prepended today, so position would work -- but a caller that reads a
blocked reload as success mounts "Restart complete." on the previous policy
generation, and one future entry prepended ahead of the notice would cause
that at all four call sites at once. Scanning cannot regress that way, and
only this module produces the prefix.

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `changes` | `Sequence[str]` | Yes | The list `reload_from_environment` or `preview_reload` returned. |

## Returns

`str | None`

The notice, or `None` when managed policy did not block the reload.

---

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