const points = await agent.checkpoints();
// [{ n: 1, at: "2026-10-07T09:12:44.000Z", text: "Rename every component…",
// files: 184, partial: false, outside: [] },
// { n: 2, at: "…", text: "Now update the imports.",
// files: 184, partial: false, outside: ["write_storage"] }]points = agent.checkpoints()
# [{"n": 1, "at": "2026-10-07T09:12:44Z", "text": "Rename every component…",
# "files": 184, "partial": False},
# {"n": 2, "at": "…", "text": "Now update the imports.",
# "files": 184, "partial": False}]nintegerThe message number. rewind(n) takes this.
atstringWhen the snapshot was taken.
textstringThe message it precedes.
filesintegerHow many files the point records.
partialbooleanThe workspace was larger than the snapshot could hold.
outsidestring[]What left the machine after this point — a rewind will not undo it.
outside is what to show before offering a rewind
If outside is not empty, something happened that going back does not reverse — a message sent, a site published, a storage written, a command run. Saying so before the click is the difference between a choice and a surprise.
const target = points.find((p) => p.n === 2);
if (target.outside.length) {
console.warn("Going back will not undo:", target.outside.join(", "));
}target = next(p for p in points if p["n"] == 2)
if target["partial"]:
print("Some files were not copied: going back will not restore them.")An empty list
| Why | Then |
|---|---|
| No session | rewind() answers session_required |
checkpoints: false | checkpoints_disabled |
| A subagent | It keeps none |
| Compaction removed the messages | Points below the surviving conversation are forgotten |
Twenty
The last twenty messages of a session stay replayable. Older points are dropped, and their stored content is collected once nothing refers to it.