# _replay

URL: /milo-cli/api/milo/testing/_replay/
Section: testing
Description: Action log replay (time-travel).

---

> For a complete page index, fetch /milo-cli/llms.txt.

Open LLM text
(/milo-cli/api/milo/testing/_replay/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Ftesting%2F_replay%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Ftesting%2F_replay%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Ftesting%2F_replay%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Ftesting%2F_replay%2Findex.txt)

Module

#
`testing._replay`

Action log replay (time-travel).

1Function

## Functions

`replay`

6

`Any`

▼

Replay a recorded session through a reducer.

Returns final state. Optionally a…

`def replay(recording: SessionRecording | str | Path, reducer: Callable, *, speed: float = 1.0, step: bool = False, on_state: Callable | None = None, assert_hashes: bool = False) -> Any`

Replay a recorded session through a reducer.

Returns final state. Optionally asserts state_hash matches
at each step to detect reducer regressions.

##### Parameters

Name
Type
Description

`recording`
`SessionRecording | str | Path`

`reducer`
`Callable`

`speed`
`float`

Default:`1.0`

`step`
`bool`

Default:`False`

`on_state`
`Callable | None`

Default:`None`

`assert_hashes`
`bool`

Default:`False`

##### Returns

`Any`
