The five that leave the machine
| Tool | What stays done |
|---|---|
send_mail | The message is delivered. |
deploy | The site is online. |
write_storage | The database or bucket is changed. |
workflow | A workflow was created, changed or run. |
bash | A command may have pushed, published or called anything. |
Each one used after a point is recorded, and rewind() returns them as kept. The listing from checkpoints() carries the same thing per point as outside, so an interface can warn before the rewind rather than report after it.
const points = await agent.checkpoints();
const target = points.find((p) => p.n === 2);
if (target.outside.length) {
console.warn("Going back will not undo:", target.outside.join(", "));
}points = agent.checkpoints()
target = next(p for p in points if p["n"] == 2)
if target["partial"]:
print("Some files could not be copied: going back will not restore them.")
# What went out (a sent message, a deploy) is never undone by a rewind.Credits are not refunded
credits.spent says what the removed turns cost and credits.refunded is 0. The work was done and billed; a rewind is a change of mind, not a cancellation.
Compaction closes the door behind it
Compaction replaces the older part with a summary, so points before the first surviving message are forgotten rather than offered. Rewinding to one answers checkpoint_compacted and names what is still available.
The refusals
| Code | Status | When |
|---|---|---|
| session_required | 400 | The agent has no session — memory: true is needed. |
| agent_running | 409 | It is answering. stop() first. |
| invalid_checkpoint | 400 | n is not a whole number of at least 1. |
| checkpoints_disabled | 400 | checkpoints: false. |
| checkpoint_compacted | 404 | That message was summarised away. The message names what is left. |
| checkpoint_not_found | 404 | No such message in this session. |
And some files simply cannot go back
- A file over 25 MB was recorded, not copied —
skippedsays so. - A workspace over 5 000 files makes the point
partial. - A heavy folder that existed is left as it is, with whatever is now in it.
- A file that cannot be written — locked, in use — is reported rather than retried.
All four land in files.skipped with a reason. A rewind that skipped nothing restored everything; one that skipped something says exactly what.