# bind_thread_workspace

> **Function** in `deepagents_code`

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

Atomically create or verify a thread workspace binding.

## Signature

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

## Returns

`WorkspaceBinding`

The immutable binding for the thread.

---

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