How to Make an AI Coding Agent Resume Work After It Stops
Description and use
Persist each agent step as a hashed receipt keyed to a session ID. On restart, the agent loads the receipt trail and resumes without redoing completed steps.
Problem
An AI coding agent loses its progress when it crashes or the session ends, forcing it to repeat all prior steps and waste time.
Outcome
The agent’s work persists independently of the agent process. Subsequent invocations inherit the entire trail, eliminating redundant work and ensuring continuity across models and machines.
Workflow
- 1. Start the job with a unique session ID and a tool call that records the first step.
- 2. The tool returns a receipt containing a UUID, timestamp, SHA‑256 hash of the output, and an audit URL.
- 3. If the agent stops, kill the process and start a new one.
- 4. Resume the job by invoking the same tool with the same session ID; the system loads the existing trail and skips completed steps.
- 5. Continue with subsequent steps, each generating its own receipt.
- 6. Verify results by checking receipt audit URLs if needed.
Evidence
The new invocation inherited the whole trail — every prior call, its result, its verification status — keyed only by the session id.
Three things make this work as a pattern, not a trick. First, the session id is a plain string you keep in your run script — not a key tied to one provider, so any model can hold it.
- Record date: 2026-09-22T07:45:30.884Z