Skip to main content
Choose a message boundary and resume from there. For a COMPLETED run this auto-forks into a new sibling run, preserving the “1 run = 1 model loop” contract. The source run stays intact.
continue_from.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run the example

Save the code above as continue_from.py, then run:
Full source: cookbook/02_agents/20_time_travel/01_continue_from.py