state-preserve
State-Preserve Skill
Goal
Guarantee zero progress loss across interruptions. An agent can be cut off at any moment — token budget exhausted, wall-time/turn limit reached, network drop, or a crash — often with no chance for a graceful shutdown. So state must be saved continuously and incrementally, not only at the end of a session. At every moment there must be enough persisted information that a fresh agent (via session-resume.skill) can pick up exactly where this one left off, with no knowledge loss.
Treat every step as if it might be your last: after each meaningful action, the durable record on disk must already reflect it.
The resume pointer (always current)
Maintain a single, cheap, always-up-to-date pointer so any future session knows the exact next move. Keep it at agents/memory/RESUME_POINTER.md (create if absent):