Failure modes and retries
Goal: recognize common agent failures and retry without making things worse.
Best for: when the agent loops, invents success, or keeps breaking the same step.
Agents fail in boring ways: wrong file, tool error, invented “done,” endless retry. Your job is to name the failure and change the plan—not spam “try again.”
Retries without a new hypothesis create duplicate side effects. Classify the failure, change one variable, cap attempts.
Why beginners skip this
Mash-retry feels productive until the same failure burns three attempts and you widen permissions out of frustration. Classify the failure first; change one constraint; never auto-retry a write or send.
Habit this week (Asia/Shanghai): on one failed run, name the failure type, change one constraint, log the retry—date the line.
Step 1 — Name the failure type
Pick one: tool error, wrong target, incomplete evidence, scope creep, or hallucinated success.
Here is what happened:
[paste agent output / error]
Classify failure type (one).
Explain in plain words.
Propose the smallest next experiment.
Example
Filled prompt
Last run error: "403 insufficient scopes" while agent tried to label inbox mail, then auto-retried twice.
Classify failure mode in one word. Propose next attempt as a smaller step (read-only list 5 threads) with one check.
Ban retry of any write/send until I re-read the payload.
What good output looks like
- Done boxes for “Failure modes and retries” are explicit and checkable
- Allow-list tools only; never-do lines honored
- Stops before send/delete without human gate
- Pass/fail: Plan→Act one→Check visible for agents-failure-modes-and-retries
- Pass/fail dated (Asia/Shanghai) sits next to the artifact
Step 2 — Retry with a narrower act
Retries should shrink scope: one file, one query, one tool call.
Retry policy: do NOT repeat the same step unchanged.
Narrow to: [constraint]
Show plan for one retry only, then stop.
Example
Filled prompt
Last run: agent reported "done" after drafting 40 emails but send tool returned 429; it retried send 6 times.
Classify failure mode. Next attempt: draft-only batch of 5, human send.
Ban auto-retry on send. One log row.
What good output looks like
- Allow-list tools only; never-do lines honored
- Stops before send/delete without human gate
- Pass/fail: Plan→Act one→Check visible for agents-failure-modes-and-retries
- Done boxes for “Failure modes and retries” are explicit and checkable
Step 3 — Know when to stop the agent
Stop if: two failures same way, touching red-lines, or you cannot verify. Switch to chat mode and finish manually.
Write a beginner stop-card (≤8 bullets): when to halt an agent and finish by hand.
Example
Filled prompt
≤8 bullets: when to halt an agent and finish manually.
Context: live job for agents-failure-modes-and-retries — “recognize common agent failures and retry wit.” Keep never-invent / draft-only.
What good output looks like
- Names one failure mode word first
- Next step is smaller than the failed call
- Explicit ban on retrying write/send
- Log line you could paste into your table
Save this card
Card: classify failure → change one constraint → retry · never auto-retry write/send.
1. What I shipped: ___ 2. What I refused: ___ 3. What I will never-do again: ___ (date: Asia/Shanghai)
- [ ] Tools/writes paused
- [ ] Refuse-line dated
- [ ] Artifact path saved
- [ ] Next link chosen (or stop)
Before you start
Write Done (checkboxes) and the human gate on paper before any run for “recognize common agent failures and retry.” Allow-list tools; leave send/delete off. Guide: agents-failure-modes-and-retries. If you only have a blank practice box, stop and fetch the real job first.
- Goal in one line: ___
- Allowed tools: ___
- Forbidden: ___
- Human approve needed for: ___
How to use this week
When the next tool error hits, label it in one word (auth, scope, timeout, bad-input, hallucinated-success). If it was a send/write, do not retry until a human re-reads the payload. on a live artifact—not a blank demo. Write one refuse-line and date the note (Asia/Shanghai). If you only skimmed agents-failure-modes-and-retries, put 25 minutes on the calendar and redo once.
Close the week by quoting aloud the refuse line you actually used once. If you cannot, rerun Practice now and date the pass/fail (Asia/Shanghai).
No blind send retry
Classify first. Cap read-only retries at two. Writes need a human.
Red flag
Mash-retry on the same failure; widening permissions on retry; no stop condition after two fails—treat as an incident.
Pitfalls
| Pitfall | Fix |
|---|---|
| Treating every error as “model dumb” | Check permissions and tool target first |
| Retrying forever without a budget | Cap retries (e.g. 2) then human |
| Identical retries | Change one variable |
| Ignoring tool errors in the log | Read the error text |
| Letting loops burn quota overnight | Cap steps/time |
Example
Filled prompt
Temptation: skip the habit for agents-failure-modes-and-retries to “save five minutes.”
Job still: recognize common agent failures and retry
Do the smallest correct pass: Done visible · one checkable artifact · Unknowns labeled [?].
Boundaries: draft only; no silent send; no invented metrics.
Return: the artifact + the refuse-line you said aloud.
What good output looks like
- Names the shortcut you refused (specific to agents-failure-modes-and-retries)
- Still delivers a checkable artifact for “recognize common agent failures and retry”
- Unknowns labeled; draft-only respected
- Pass/fail: refuse-line written and dated (agents-failure-modes-and-retries #4)
Practice now
Live card: pick one past agent fail; map to mode (tool/loop/permission) + one retry rule you will actually use (Asia/Shanghai).
Today on a real failure: name the type (permission / hallucination / timeout / unclear goal), retry once with a narrower action, then stop if it still fails. Write pass/fail + never-do (date: Asia/Shanghai).
Three-line failure card (copy): 1. Failure type: ___ (permission / hallucination / timeout / unclear goal / wrong tool) 2. First retry: narrowed how? ___ · still failed? Y/N 3. Stop rule used: ___ · refuse-line dated: ___
If you cannot name the type in one word, do not retry—ask a human or open a debug note first.
- [ ] Artifact path written
- [ ] Refuse example would say "yes"
- [ ] Dated Asia/Shanghai
One sentence takeaway
Classify the failure, change one constraint, never auto-retry write/send. This week: one dated classify→retry log line (Asia/Shanghai).
Next
Plan → act → check · Human-in-the-loop checkpoints · Debug broken tool calls · Logging what matters · Define done and permissions
Pair with today: open the first Next link (agents-plan-act-check-loop) only after you dated a refuse-line for this guide (Asia/Shanghai).
失败模式与重试
目标: 认出常见智能体失败,重试时别把事情弄得更糟。
适合: 智能体打转、假装成功、或同一半步反复翻车时。
智能体失败往往很无聊:找错文件、工具报错、编造「好了」、无限重试。你的工作是给失败命名并改计划——而不是狂按「再试一次」。
没有新假设的重试会制造重复副作用。先分类失败,只改一个变量,并限制次数。
为什么新手跳过
盲目连点重试像在干活,同一失败却烧掉三次,最后还因烦躁放宽权限。先给失败分类,只改一处再试;写/发绝不自动重试。
本周习惯(Asia/Shanghai):对一次失败运行写出失败类型、改动的那一处约束、重试结果——并写上日期。
步骤 1——给失败类型命名
选一个:工具错误、目标错误、证据不足、范围膨胀、或幻觉式成功。
发生了这些:
[粘贴智能体输出/报错]
判定失败类型(只选一个)。
用白话解释。
提出最小的下一步实验。
实例
填好的提示词
上次错误:"403 insufficient scopes",agent 试图给收件箱贴标签,然后自动重试两次。
用一个词标失败类型。下一步改成更小动作(只读列出 5 封线程)+一个检查。
在我重读载荷前,禁止重试任何写入/发送。
像样的输出大概长这样
- 已分类
- 不盲目重试发送
- 有下一步
- 贴合填例里的约束
- 不编造事实、负责人或指标
- 新手能看懂;可直接交给同事
步骤 2——用更窄的行动重试
重试要缩小范围:一个文件、一次查询、一次工具调用。
重试策略:禁止原样重复同一步。
收窄到:[约束]
只展示一次重试计划,然后停止。
实例
填好的提示词
上次:agent 声称「完成」并起草了 40 封邮件,但发送工具返回 429;它重试发送 6 次。
标失败类型。下一次:只草稿 5 封,人来发送。
禁止对发送自动重试。记一行日志。
像样的输出大概长这样
- 上限 2
- 升级清楚
- 有日志字段
- 贴合填例里的约束
- 不编造事实、负责人或指标
- 新手能看懂;可直接交给同事
步骤 3——知道何时停掉智能体
若:同样失败两次、碰到红线、或你无法核实——停。改回对话模式,手工收尾。
写一张初学者停机卡(≤8 条):何时停掉智能体并改手工完成。
实例
填好的提示词
场景:真实工作(打开活材料)。
用≤8 条写:何时停掉 agent 改手工收尾。
背景:本周真实工作。一定要有:写入/发送失败后禁止狂点重试。
约束:不编造事实;发送/删除前停下;未知处标「未知」。
像样的输出大概长这样
- 触发条件具体
- 包含核实失败
- 停下来不可耻
- 贴合这个填例——不是空泛打气
- 相关则拒绝编造事实或静默发送
保存这张卡
卡片:先分类失败 → 只改一处再试 · 写/发绝不自动重试。
开始前
打开你真正会用的账号/项目。准备好与「失败模式与重试」相关的真实材料(不要空白练习框)。
默认姿态:在人确认发送/写入之前只出草稿。授予新工具前,先写一条带日期的拒做句(Asia/Shanghai)。
- 一句话目标:___
- 允许的工具:___
- 禁止:___
- 需要人批准:___
本周怎么用
本周遇失败:命名类型 → 收窄重试 → 两次仍失败则停并升级人工。把类型名记进一行日志备查。把过/不过写进笔记并注明日期(Asia/Shanghai)。
周中代价检查:若明天丢掉这个习惯,24 小时内会坏在哪?写一行(Asia/Shanghai)。
不盲目重试发送
先分类。只读重试最多两次。写入需要人。
红旗
同一失败盲目连点重试;重试时放大权限。停机条件未写——补上再跑。卡上写不清就不继续——先补检查项再跑。
常见坑
| 坑 | 改法 |
|---|---|
| 把每个错误都当成「模型笨」 | 先查权限和工具目标 |
| 无限重试没有预算 | 设上限(如 2 次)再交人 |
| 完全相同的重试 | 每次只改一个变量 |
| 忽略日志里的工具错误 | 读报错原文 |
| 让循环通宵烧掉额度 | 限制步数/时间 |
实例
填好的提示词
任务:recognize common agent failures and
场景要点:Agent 运行前 Done/门闸写好;练习编号 4/4。
边界:仅草稿;未知 [?];禁止悄悄发送;禁止编造指标。
返回:可检查产出 + 过/不过理由一行。
像样的输出大概长这样
- 约束贴着「失败模式与重试」与 agents-failure-modes-and-retries
- 未知标 [?];不编造负责人/数字
- 不可逆动作前停下
- 一分钟内能打过/不过(agents-failure-modes-and-retries #4)
现在就练一次
实卡:选一次智能体失败;归类模式(工具/环/权限)+一条真会用的重试规则(Asia/Shanghai)。
今天对一次真实失败写类型名与更窄重试方案。过/不过与永不做注明日期(Asia/Shanghai)。只收藏标题算失败。
今日卡片(可复制)— agents-failure-modes-and-retries: 1. 我要产出的成品:___ 2. 通过/失败标准:___ 3. 若想跳过核验/发送的拒做句:___(日期:Asia/Shanghai) 4. 本篇一条永不做:___
- [ ] 成品路径已写
- [ ] 拒做例句会说「可以」
- [ ] 已标注 Asia/Shanghai 日期
一句话带走
先分类失败,只改一处再试;写/发不自动重试。本周留下一条分类→重试日志并注明日期。
下一步
今日搭配:先为本篇写上拒做句日期(Asia/Shanghai),再打开下一步里的第一篇(agents-plan-act-check-loop)。
← Back to home · Learn · Tools · Compare · Start