# save_thread_sort_order

> **Function** in `deepagents_cli`

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

Save the sort order preference for the thread selector.

## Signature

```python
save_thread_sort_order(
    sort_order: str,
    config_path: Path | None = None,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `sort_order` | `str` | Yes | `"updated_at"` or `"created_at"`. |
| `config_path` | `Path \| None` | No | Path to config file. (default: `None`) |

## Returns

`bool`

True if save succeeded, False on I/O error.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/3bcc51a95da80094cfc8bc4bcaf25dc1e2ad8f44/libs/cli/deepagents_cli/model_config.py#L1648)