# get_healthy_managed_snapshot

> **Function** in `deepagents_code`

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

Return managed policy only when it can be enforced.

A file that parses is not necessarily enforceable: a privilege-affecting
key can carry a value the manifest rejects, or a known section can be a
scalar instead of a table. Both can otherwise resolve in the user's favor
or erase a user subtree, so they stop the launch here rather than at each
consumer.

## Signature

```python
get_healthy_managed_snapshot(
    *,
    refresh: bool = False,
) -> TomlSnapshot
```

## Returns

`TomlSnapshot`

The exact managed snapshot that passed validation.

---

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