# union_paths_under

> **Function** in `deepagents_code`

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

Return `UNION_PATHS` rebased onto a subtree rooted at `prefix`.

`merge_toml_tables` matches paths relative to where it starts. A merge of
one option's own subtree therefore never matches an absolute deny-list
path. Passing `UNION_PATHS` to such a merge does nothing at all. The merge
then replaces a nested deny list instead of unioning it, which is a
fail-open.

## Signature

```python
union_paths_under(
    prefix: tuple[str, ...],
) -> frozenset[tuple[str, ...]]
```

## Returns

`frozenset[tuple[str, ...]]`

The union paths that fall under `prefix`, relative to it.

---

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