# save_thread_seed

> **Function** in `deepagents_code`

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

Index a remote handoff locally with its initial summary and resume metadata.

Only seed an absent thread; never replace shared server checkpoints. Thread
history still loads from the connected agent, so subsequent remote turns
take precedence over this discovery snapshot. Reserve the local thread for
the save when this process does not already own it.

## Signature

```python
save_thread_seed(
    thread_id: str,
    values: Mapping[str, object],
    *,
    agent_name: str,
    cwd: str,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `thread_id` | `str` | Yes | Newly seeded remote thread identifier. |
| `values` | `Mapping[str, object]` | Yes | Initial message and model state saved on the server. |
| `agent_name` | `str` | Yes | Agent that owns the new thread. |
| `cwd` | `str` | Yes | Workspace directory used for thread discovery. |

---

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