# load_thread_config

> **Function** in `deepagents_code`

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

Load all thread-selector settings from one config file read.

Returns a cached result when reading the default config path. The
prewarm worker calls this at startup so subsequent opens of the
`/threads` modal avoid disk I/O entirely.

## Signature

```python
load_thread_config(
    config_path: Path | None = None,
) -> ThreadConfig
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `Path \| None` | No | Path to config file. (default: `None`) |

## Returns

`ThreadConfig`

Coalesced thread configuration.

---

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