# ResumeStateMiddleware

> **Class** in `deepagents_code`

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

Persists per-checkpoint resume facts after each model call.

See the module docstring for why this rides the model node's checkpoint
instead of a separate `aupdate_state` (avoids a standalone `UpdateState`
run in LangSmith and works identically against remote graphs).

## Signature

```python
ResumeStateMiddleware()
```

## Extends

- `AgentMiddleware[ResumeState, ContextT]`

## Properties

- `state_schema`

## Methods

- [`after_model()`](https://reference.langchain.com/python/deepagents-code/resume_state/ResumeStateMiddleware/after_model)

---

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