LocalAgent

checkpoints()

agent.checkpoints() → Promise<Point[]>

Where you can go back to, oldest first — with what each point holds and what going back to it would not undo.

freeneeds a session20 at most
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

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}]
ninteger

The message number. rewind(n) takes this.

atstring

When the snapshot was taken.

textstring

The message it precedes.

filesinteger

How many files the point records.

partialboolean

The 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

Warn before, not after

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

WhyThen
No sessionrewind() answers session_required
checkpoints: falsecheckpoints_disabled
A subagentIt keeps none
Compaction removed the messagesPoints 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.