Skip to content
be-human.ai
← Back to the journal

Harness fundamentals

Long-Running AI Agents: Checkpoints That Let Work Resume

How checkpoints let a multi-day AI agent job resume after a failure: saved state, safe retries and approvals that carry over, with no repeated steps.

Be Human typographic cover with the title: Long-Running AI Agents: Checkpoints That Let Work Resume
Conceptual illustration created with AI · Be Human

A long-running AI agent task can resume after a failure when the harness saves a checkpoint after each verified step and restarts from the last valid checkpoint instead of the first step. The checkpoint records what finished, what evidence confirmed it, and which approvals still cover the next action. Resume is only safe when every action that touches an outside system is recorded as intent before it is sent, so a restarted run can tell whether that action already happened.

Key takeaways

  • A checkpoint is a structured record of verified progress, not a copy of the chat history.
  • Save state after each step that changes something outside the agent, and check the result before saving it.
  • Record intent before every external action so a resumed run can tell "not sent" apart from "sent, but confirmation was lost".
  • Store approvals with the checkpoint, including their scope and expiry, so a resumed run neither asks twice nor assumes too much.
  • Rehearse the failure on purpose by stopping a test run at each step boundary before you trust resume with real work.

Why multi-day agent jobs fail in the middle

A job that runs for days meets conditions a single chat never does. A provider times out, a rate limit holds for a while, a login token expires, a tool returns an error the agent misreads, or a server restarts during a deployment. Each of these is ordinary, and a well-built system expects them. The harm comes from restarting without knowing what already happened. Repeating a search costs little. Repeating a payment, sending a second message to a customer, or creating a duplicate invoice record is a different matter, and it can be hard to notice until someone downstream asks why there are two.

The problem is not only failure itself but partial completion. A step can change a record and then fail before the agent writes down that the change happened. Anthropic's engineering guidance on long-running harnesses makes the underlying point: progress has to live in durable artifacts outside the model's context, so each new session starts from known state rather than from a summary the model reconstructs. A checkpoint is the operational version of that idea, written in a form your team can audit.

What a checkpoint should contain

A useful checkpoint is small, structured, and readable by a person. It should hold these fields:

  • The run identifier and the version of the goal the run was started under.
  • Completed steps, each with an identifier, a short output summary, and the record it changed.
  • The evidence for each completed step, such as a record reference returned by the system or the result of a check.
  • The pending step and its intent status: not started, sending, or confirmed.
  • The approvals granted for the pending step, with their scope, the person who granted them, and an expiry time.
  • The versions of the model, prompt, and tool definitions in use when each step began.
  • The budget used so far in steps, tool calls, and elapsed time, measured against the limits you set.

Leave the full transcript out. It is large, mostly unverified, and it invites the next session to re-argue decisions that were already settled. A structured checkpoint can be validated by the harness before the agent reads it, which is the same principle behind structured outputs the harness can check. If the checkpoint fails validation, the run should stop, not improvise.

The resume procedure, step by step

Use the same order every time a run restarts. Each item is a gate. If one fails, the run halts and escalates with the checkpoint attached instead of continuing.

  • Load the latest checkpoint and reject it if its schema check fails or its run identifier does not match the job.
  • Confirm that the tool and prompt versions recorded in the checkpoint still exist. If a definition changed, send the run to review rather than silently adopting the new version.
  • Read the live state of every system the pending step touches. Use the system's own record, not the agent's memory of it.
  • If the pending step is marked sending, look up whether the action already happened using the reference written at intent time.
  • Check that the approval for the pending step still exists, falls within its scope, and has not expired.
  • Send the action with its idempotency key, or run the lookup-based retry if the system offers no key.
  • Verify the result against the success check, then write the next checkpoint before taking any other action.

The order matters. Reading live state before retrying prevents the agent from acting on a stale picture, and checking approvals before sending keeps a resume from quietly extending permission that was granted for an earlier batch.

Idempotency is what prevents double work

An idempotency key is a unique value attached to a request so the receiving system can recognize a repeat and return the original result instead of performing the action again. Stripe's documentation on idempotent requests is a clear public example of the pattern, and the same logic applies to internal systems your agent writes to. When the system supports keys, the harness should generate one per action and store it in the checkpoint before the call is made.

Not every business system offers keys, so the harness needs a fallback. Before sending, the agent writes an intent entry containing a reference it generated itself, such as a client-side message identifier, a draft record number, or a unique memo field. After a failure, a pending intent with no confirmation triggers a search for that reference in the target system. The agent retries only when the search finds nothing. The rule is simple to state and easy to skip under deadline pressure: a written intent costs seconds, while untangling a duplicate after it has been sent can cost a day of someone's attention.

Illustrative scenario: a three-day invoice matching run

Illustrative scenario, not a client case: an operations lead asks an agent to match supplier invoices to purchase orders over three days and to send a summary of exceptions to the finance team at the end of each day. On the second day, the run fails after the exception summary is sent but before the confirmation is recorded. The checkpoint shows that send as sending.

On resume, the harness searches the outbound mail log for the reference written at intent time, finds the message, and marks the step confirmed. It skips the send and continues matching the remaining invoices. The approval for exception summaries covered only the second day's batch, so when the run reaches the third day's send, the harness pauses and asks for a fresh approval, as the boundary requires. The finance team receives one summary per day, and the operations lead can see in the checkpoint history exactly where the run resumed and why it paused.

How Be Human runs checkpoints in managed operations

In Be Human's managed approach, the first engagement names the one role the agent fills, the memory and tools it needs, the approval boundaries, and an observable success criterion. The checkpoint format is written into that definition rather than left for later, so the team knows which fields exist and who can read them. Ongoing operations then cover the parts that change over time: monitoring of resume events and failed lookups, permission review when a tool or account changes, incident response when a resume escalates, and controlled changes to the checkpoint schema, each recorded so the team can see what changed and why. The service is remote and available in English and Portuguese.

Rehearse the failure before you trust it

Test resume the way you would test a backup. In a test environment, stop a run at each step boundary, restart it, and compare the final state with a clean run that never failed. Count duplicates in the target systems, not only whether the agent reports success, because an agent can describe a clean run while a second message sits in an outbox. Repeat the exercise after every change to tool definitions or to the checkpoint schema.

Pair these tests with clear stop conditions, so a run that resumes into an unexpected state halts instead of looping. The stop conditions for agent loops article covers when to halt and escalate. Steps that still fail after their retry limit should move to a holding area with the checkpoint attached, not back into the queue, as described in dead-letter queues for agent tasks. If you are not yet sure which of your processes is the first worth handing to an agent, the free Be Human AI diagnostic can help you find that first task.

Frequently asked questions

Does a checkpoint replace the agent's memory? No. Memory holds durable facts and preferences that apply across jobs, while a checkpoint holds the state of one run. Keep them separate so that a change to memory cannot silently alter how a finished step is recorded.

What happens if a checkpoint is damaged? The harness should reject it when the schema check fails and stop rather than guess. Writes should be versioned and append-only, so the previous valid checkpoint is still available, and the resume should start from that one and reconcile against live systems before continuing.

Can a resumed run use a newer model or tool version? Only after the harness checks the change. A newer model can interpret a pending step differently, so the resume procedure should compare recorded versions with current ones and send any change to review, ideally after it has passed a canary release on lower-risk work.

Who should approve a resume after a failure that touched money or customers? The approval should come from the owner of that boundary, not automatically from the person who started the run. The approval should state what it covers after the resume, and an expired approval should make the run pause until someone renews it.

Your next step

See where an AI agent fits in your company first.

Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.

Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.

Less busywork. More room for you.

Bring us the work you wish you had time for.

Book a call to try a personalized AI agent free for 7 days ↗Or take the free AI diagnostic →