Your AI Agent Needs a Recovery Plan Before You Let It Work Overnight
Your AI Agent Needs a Recovery Plan Before You Let It Work Overnight
You give your agent a big task before bed.
Then you wake up to something useless.
Maybe the agent got interrupted and restarted from the wrong place. Maybe it repeated work. Maybe it made a risky assumption because you were asleep. Maybe it says “done” but does not explain what changed, what failed, or what still needs your attention.
That is not an autonomy problem. That is a recovery problem.
Agent tools are moving toward longer background work. OpenClaw’s 2026.6.1 pre-release notes mention recovery from interrupted tool calls, steadier delivery, and retry bounds (source). Claude Code is adding automatic mode and plugin behavior (source). Codex releases are improving diagnostics (source).
Good. But tooling cannot guess your risk tolerance. If you want useful overnight work, give your agent a plain-English recovery plan before you let it run.
Define done before you leave
The first recovery rule is knowing what “done” means.
Without a finish line, an agent can keep researching, polishing, or looping. That is how overnight work becomes a foggy status update.
Tell your agent: “For this task, done means I wake up to a short summary, the final recommended answer, anything you changed, anything you could not finish, and the next decision you need from me.”
This tells the agent when to stop. It is how you avoid waking up to a pile of almost-finished work.
Use checkpoints
A checkpoint is a planned pause where the agent records progress.
Long tasks break. Pages time out. Apps disconnect. Checkpoints let the agent resume instead of starting over or guessing.
Tell your agent: “Work in checkpoints. After each major step, write down what you completed, what you learned, what is still open, and what you plan to do next. If you are interrupted, resume from the latest checkpoint instead of starting over.”
Give interruption and retry rules
Interruption is normal in background AI agent work. The question is not whether it happens. The question is what your agent does next.
Give your agent a restart rule.
Tell your agent: “If you are interrupted, do not guess where you left off. First reconstruct the task goal, the latest checkpoint, completed work, and remaining work. Then continue only from the next unfinished step.”
Then limit retries. Retrying once or twice is useful. Retrying forever is how agents burn the night.
Tell your agent: “If a tool, page, or source fails twice, stop trying that route. Use the best alternative if it is low risk. If there is no good alternative, mark that step blocked and move on to other useful work.”
The goal is to keep it from confusing motion with progress.
Define blocked and permission
Agents often get stuck in the middle: not fully blocked, but not making real progress either.
Define blocked in human terms.
Tell your agent: “You are blocked when you need a decision only I can make, when an action could affect customers or money, when a source is unavailable after two tries, or when continuing would require guessing.”
If blocked, it should finish low-risk work, explain the options, and ask the smallest question that would let it continue.
You also need approval rules. Your agent must know the difference between drafting and doing.
Tell your agent: “You may research, summarize, draft, organize, and prepare recommendations without asking me. Ask before sending messages, publishing anything, deleting anything, spending money, changing customer-facing work, or making a commitment on my behalf.”
For overnight work, the rule is simple: while you are unavailable, the agent should choose reversible actions only. Anything public, financial, destructive, or hard to undo waits for approval.
Require a handoff report
The morning report is part of the work. Do not accept “done” as a final answer.
A good handoff report tells you what happened, what changed, what failed, and where to pick up.
Tell your agent: “When you finish or stop, give me a handoff report with five sections: completed, changed, blocked, risks, and next decisions. Keep it short enough that I can read it before coffee.”
That turns each overnight run into a better next run.
Use this overnight prompt
Here is the whole thing in one reusable prompt:
Tell your agent: “I want you to work on this while I am away. Before you start, create a simple recovery plan in plain English. Define what done means, what checkpoints you will use, what you will do if interrupted, how many times you will retry failed steps, what counts as blocked, what requires my approval, and what your final handoff report will include. While I am unavailable, only take low-risk reversible actions. If you are unsure, stop at the latest useful checkpoint and leave me a clear decision.”
That is not technical. It is management.
As agents get better at background work, the user’s job changes. You do not need to learn developer setup or supervise every click. You need to give the agent operating rules before the room goes quiet.
Autonomy without recovery instructions becomes cleanup. Autonomy with recovery instructions becomes leverage.
Start small. Give your agent one overnight task with a clear finish line, checkpoints, approval rules, and a final handoff. Then improve the recovery plan based on what you wake up to.