# trust_project_hooks

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/hooks/trust/trust_project_hooks)

Persist project-hook trust for a workspace root.

## Signature

```python
trust_project_hooks(
    project_root: Path | str,
    *,
    store_path: Path | None = None,
) -> bool
```

## Description

**Note:**

Failures (unreadable store, lock timeout, I/O errors) return `False`
without mutating the on-disk store. Callers must treat `False` as a
real persistence failure, not as an implicit session grant.

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_root` | `Path \| str` | Yes | Workspace root to trust. |
| `store_path` | `Path \| None` | No | Alternate trust store path for tests. (default: `None`) |

## Returns

`bool`

`True` when trust was saved.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/hooks/trust.py#L273)