# refresh_thread_activity

> **Function** in `deepagents_code`

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

Advance local discovery metadata after reading remote model activity.

Only the latest root checkpoint is updated, preserving historical metadata
and any newer timestamp already written by a shared server checkpointer.
Preserve its original timestamp separately so a lone discovery seed keeps
its creation time as remote activity advances.

## Signature

```python
refresh_thread_activity(
    thread_id: str,
    updated_at: datetime,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `thread_id` | `str` | Yes | Thread whose remote state was read. |
| `updated_at` | `datetime` | Yes | Verified model-request time from the remote checkpoint. |

---

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