# require_thread_workspace

> **Function** in `deepagents_code`

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

Validate run context against the durable workspace binding.

## Signature

```python
require_thread_workspace(
    thread_id: str,
    payload: object,
    workspace_config: object | None = None,
    *,
    config_fingerprint: str | None = None,
) -> WorkspaceBinding
```

## Returns

`WorkspaceBinding`

The server-authoritative binding and persisted resource policy.

---

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