# require_healthy_managed_config

> **Function** in `deepagents_code`

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

Fail startup when present managed policy cannot be parsed or enforced.

Propagates from `get_healthy_managed_snapshot`: `ManagedConfigError` when
a managed file is present but unreadable, and `ManagedPolicyError` when it
parses but declares policy that cannot be enforced. Both fail startup at
every call site.

## Signature

```python
require_healthy_managed_config(
    *,
    refresh: bool = False,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `refresh` | `bool` | No | Re-read the managed file before checking it. (default: `False`) |

---

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