‹ back to writing
Nov 11, 2026·7 min read
agentsreliability

What should an AI agent do when it gets stuck?

A stuck agent has two bad options: keep retrying, or go quiet. The good one is boring. Stop, write down why in the place people actually check, name the one thing a human has to do, and resume only after that's confirmed. A pause without a reason is just a silent failure with better manners.

On 9 November one of my routines stopped working. It checks replies on a social account and sends follow-ups on a schedule. That day the platform logged the account out of the browser the agent uses. No login, no inbox, no follow-ups.

The routine did the right first thing. It got paused. Then it did the wrong second thing. Nobody wrote down why.

That night, my review job found a paused routine and no reason anywhere. It did what a careful reviewer should do with a mystery: it marked the job paused in the records and moved on. The real reason, the logout, only reached the job's record the next night. The fix took me one sign-in. Finding out that a sign-in was the fix took a day.

the same pause, two nights in a row
9 Nov · platform logs the account out → routine paused
9 Nov · nightly review → 'paused, no reason logged'
10 Nov · human told to sign back in → one specific action, one person
10 Nov · nightly review → record now names the logout as the reason
// The pause was correct. The missing reason cost a day.

That is the whole essay. When an agent gets stuck, it should stop, say exactly why in the place people actually check, ask one named human for one specific action, and resume only after that action is confirmed. Retrying forever is noise. Going quiet is a silent failure. A pause without a reason is just a silent failure with better manners.

What does "stuck" mean for an AI agent?

An agent is stuck when the next step depends on something it can't fix itself.

Most of the time that is not a reasoning problem. It is the world: an expired login, a revoked token, a tool that keeps returning errors, a page that changed shape, a missing approval. More thinking won't get past any of those. A human has to do something, or the agent has to wait.

That distinction matters because the two kinds of failure need opposite responses. A mistake the agent can see and correct, like a bad parameter or a typo in a query, deserves a retry. A blocker outside its reach deserves a stop.

Should an AI agent keep retrying when something fails?

Only up to a limit you set in advance. After that, it should hand control back.

OpenAI's A practical guide to building agents names this directly. It lists two triggers for human intervention. The first is exceeding failure thresholds: "Set limits on agent retries or actions." The second is high-risk actions that are "sensitive, irreversible, or have high stakes." The same guide says a mechanism for human intervention "allows the agent to gracefully transfer control when it can't complete a task."

Anthropic's Building effective agents says much the same from the builder's side. Agents should get "ground truth" from the environment at each step, they "can then pause for human feedback at checkpoints or when encountering blockers," and it is common to add stopping conditions, such as a maximum number of iterations, "to maintain control."

Notice what neither guide says. Neither says "try harder." A login wall does not move because the agent tried a fortieth time. On a real account, the fortieth try can make things worse.

A stuck agent, done well0 / 5
HITLIMITWRITEASKRESUME
  1. HIT
    BlockerLogged out, token revoked, tool failing, approval missing
  2. LIMIT
    Stop retryingA retry limit set in advance, not a judgement made in the moment
  3. WRITE
    Record the reasonIn the job's own record, where the next reader will look first
  4. ASK
    One action, one person'Sign back in to this account' beats 'something went wrong'
  5. RESUME
    On confirmationOnly after the human says it's done, and only the lane that was blocked
// The step everyone skips is the third one.

Why does a pause need a written reason?

Because the next reader is usually not the one who paused it.

In a single chat, a stuck agent can just tell you. In production, the reader is a review job at 9:30 PM, a teammate tomorrow, another agent deciding whether to step in, or you in a week, wondering whether it's safe to switch the thing back on. None of them were there when it stopped.

Without a reason, every one of them has two bad choices. Leave it off, because maybe it was paused on purpose. Or switch it back on, and hit the same wall again. My review job chose the safe one, which was correct, and still the job sat idle for a day longer than it needed to.

A pause without a reason is a silent failure with better manners. The next reader can't tell "on purpose" from "broken."

I wrote about the louder version of this in The agent needs a heartbeat: agents rarely fail loudly, they go quiet. A paused job with no note is a quieter cousin. It looks deliberate, so nobody chases it.

How should an agent ask a human for help?

With one specific action, sent to one person, rarely.

Google's SRE book has the best rule I know for this, written about pagers long before agents. In Monitoring Distributed Systems, the authors say: "Every page should be actionable." And: "I can only react with a sense of urgency a few times a day before I become fatigued."

An agent asking for help is paging a human. The same rules apply:

Three parts of a good stuck message
01 / 03
  1. 01
    What stopped
    The blocker in plain words, with the time. 'Logged out of the account on 9 Nov' beats a stack trace.
    cause · time · scope
  2. 02
    What's paused
    Exactly which job or lane is off, and what is still running. People need to know what isn't happening.
    paused · still live
  3. 03
    What unblocks it
    One action by one person, and what the agent will do once it's confirmed.
    owner · action · resume rule
// If any one is missing, the next reader has to investigate instead of act.

When should a stuck agent resume?

When the human confirms the fix. Not when a timer runs out.

It is tempting to build agents that resume themselves: try again every hour, and carry on if it works. For read-only work, that's fine. For anything that acts on a real account, it skips the most useful signal you have, a human saying "done, it's safe."

It also keeps the resume narrow. Switch back on the lane that was blocked, check one run, then let it carry on. This is the same rule I wrote about in The agent needs an off switch: stops are global, restarts are one lane at a time.

So what's the rule?

Stop. Write why. Ask once. Resume on a yes.

None of that needs a smarter model. It needs a place where the reason goes, a habit of writing it, and a review that treats "paused, no reason" as a defect rather than a state.

Go look at your paused jobs today. If any of them can't tell you why they stopped, write the reason in.

Related essays
More essays

Owned, undistributed, and published only here — no newsletter, no funnel, no upsell.

All essays ›
‹ all essays

Let's build
something joyful.

Agents · Engineering · Talks · Podcasts · Interviews · Automations.