Overview › 4Memory › b.Resuming
Resuming
Recover and resume rather than restart. 3 optimizations.
- i.
Filesystem-based agent state and checkpoints
Save the agent's state at each step boundary (the conversation, the workspace files, process state when it matters, and a ledger of external side effects) so a crashed or stuck run resumes or rolls back instead of starting over.
- ii.
Initializer-maintainer dual agent
Give the first session of a multi-session build a setup-only prompt (expand the spec into a JSON list of end-to-end tests, all failing, and write an init script, a progress file and a first commit) and every later session a maintainer prompt that reads that state, re-tests what passed, builds one failing item, verifies it end to end and commits.
- iii.
Keep plan, progress and results in files when work outlives one context window
When a task spans context resets (compaction, a truncation limit, a new session), have the agent keep what the next window needs in files and read them back at the start of each window: the plan and a progress list, decisions and open items, intermediate results too large to hold in context, and for coding a structured test list and an init script.