Agent 审批疲劳与人在回路:为什么“点批准”管不住编码 Agent
Approval Fatigue and the Human in the Loop: why clicking “approve” does not contain coding agents
基于 Scale X 审批游戏数据(2026-08-05)、Anthropic 官方材料与 Cloudflare OS 设计整理。读完你会知道:人为什么会漏放威胁、有哪些替代方案、人应该放在哪一步。
Based on Scale X’s approval-game data (2026-08-05), Anthropic’s own material and the Cloudflare OS design. You will learn why people let threats through, what the alternatives are, and where the human belongs.
130 秒速览
1The 30-second version
一句话:让人逐条点“批准”来管住编码 Agent,在数据上并不可靠——一个 40,000 局的审批游戏里,人平均漏放三分之一的威胁,同时又误拦大量正常命令。更好的做法是把“人”放到最后一道、只审少数真正不可逆的动作,前面用沙箱、规则和分类器把大部分风险挡掉。
In one sentence: asking a human to click “approve” on every agent command is not a reliable control: in a 40,000-run approval game people let through about a third of the threats while also blocking many harmless commands. A better design puts the human last, reviewing only the few truly irreversible actions, with sandboxes, rules and classifiers absorbing most of the risk before that.
先说名词:人在回路(Human-in-the-loop,HITL)指 Agent 执行某些动作前要先问人;审批疲劳指提示太多、绝大多数又是无害的,于是人开始不看就点。
Vocabulary first: human-in-the-loop (HITL) means the agent asks a person before certain actions; approval fatigue is what happens when there are so many prompts, almost all harmless, that people start clicking without reading.
2背景:数据从哪来
2Background: where the data comes from
Scale X 的 Alex Wauters 做了一个浏览器游戏:玩家扮演编码 Agent 的审批者,在时间压力下对一串命令点“批准”或“拒绝”。命令里有日常操作(如 git status、npm test),也有会泄露密钥或破坏系统的威胁(如 cat ~/.aws/credentials),共 37 个威胁场景、分 4 类,威胁约占 34%。
Alex Wauters of Scale X built a browser game: players act as the approver for a coding agent and approve or deny a stream of commands under time pressure. The stream mixes routine operations (e.g. git status, npm test) with threats that leak secrets or damage the system (e.g. cat ~/.aws/credentials): 37 threat scenarios in 4 categories, about 34% of all commands.
约每 3 个威胁漏 1 个
漏放 + 误拦得不偿失
的玩家
误拦不超过 1/5 的玩家
~1 in 3 threats missed
misses + over-blocks
every prompt
blocking ≤1 in 5 safe ones
数据:Scale X(2026-08-05),40,000+ 局、409,000 次决策;文章未公布独立玩家人数。35.2% 的玩家抓到了全部威胁,但其中不少是靠“几乎全拦”做到的。
Data: Scale X (2026-08-05), 40,000+ runs and 409,000 decisions; the number of unique players is not given. 35.2% of players caught every threat, but many did it by blocking almost everything.
这和一线产品数据对得上:Anthropic 在 2026-03-25 的工程博客里说,Claude Code 用户实际批准了 93% 的权限提示;它在 2026-02-18 的研究里还发现,新用户约 20% 的会话开着全自动批准,到第 750 个会话时升到 40% 以上。也就是说,人一旦信任了 Agent,审批很快就变成走过场。
This matches product data. Anthropic’s engineering blog (2026-03-25) says Claude Code users accept 93% of permission prompts; its research post of 2026-02-18 found that about 20% of new users’ sessions use full auto-approve, rising past 40% by the 750th session. Once people trust the agent, approval quickly becomes a formality.
这不是 AI 才有的新问题。2013 年 Google 与 UC Berkeley 的“Alice in Warningland”研究分析了 2,500 多万次浏览器警告:Chrome 的 SSL 警告有 70.2% 被用户点过去,而 Firefox 的恶意软件/钓鱼警告只有约 10%——警告长什么样、出现得多频繁,会显著改变人的行为。
This is not new with AI. The 2013 “Alice in Warningland” study by Google and UC Berkeley looked at more than 25 million browser warnings: users clicked through 70.2% of Chrome’s SSL warnings but only about 10% of Firefox’s malware/phishing warnings. How a warning looks and how often it appears changes behaviour significantly.
3核心概念
3Core concepts
- 漏判(false negative)/ 误拦(false positive)
- 漏判是把坏动作放过去;误拦是把正常动作拦下来。两者此消彼长:想一个不漏,通常就得多拦。
- 基础比率(base rate)
- 真实威胁在所有提示里占多少。真实世界里威胁极少,人看到的几乎全是无害提示,于是形成“点批准”的肌肉记忆。
- 上下文缺失
- 审批者看到的只是一行命令,看不到它背后实际做什么(例如
npm run执行的是 package.json 里的脚本)。 - 确定性控制 / 概率性控制
- 沙箱、网络白名单、deny 规则每次结果一样,是确定性的;模型分类器和人的判断有随机性,是概率性的。
- Capability(能力绑定)
- 不把密钥交给 Agent,而是给它一个只能做特定事情的接口,例如“只能读某个仓库的 issue”。
- 凭据遮罩(masking)
- Agent 和它运行的命令只看到占位值,真实密钥只在出站请求里由代理替换,命令输出和日志都拿不到。
- False negative / false positive
- A false negative lets a bad action through; a false positive blocks a good one. They trade off: missing nothing usually means blocking more.
- Base rate
- The share of prompts that are real threats. In real life threats are rare, so people see mostly harmless prompts and build a “just approve” habit.
- Missing context
- The approver sees one line of command, not what it actually does (e.g.
npm runruns whatever script package.json defines). - Deterministic vs probabilistic controls
- Sandboxes, egress allowlists and deny rules give the same answer every time; model classifiers and human judgment are probabilistic.
- Capability
- Instead of handing the agent a key, give it an interface that can do only specific things, such as “read issues in one repository”.
- Credential masking
- The agent and its commands see only a placeholder; a proxy swaps in the real secret on outbound requests, so command output and logs never hold it.
4机制:逐条审批为什么会失效
4Mechanism: why per-action approval fails
把 Scale X 的数据和上面的来源放在一起,可以归纳出四个原因(归纳为作者整理,数字均来自原文):
Putting the Scale X data next to the other sources gives four causes (the grouping is the author’s; all numbers come from the sources):
- “看起来无害”的威胁最容易漏:明显破坏性命令漏判率 11.7%,而读凭据的越权命令是 35.0%,约 3 倍。人对“删东西”警觉,对“看一眼文件”不警觉,可后者恰恰是泄密路径。
- 审批者看不到真正执行的内容:
npm run analyze被批准了 64.7%,是 37 个场景里漏得最多的;三个npm run类威胁合计漏判 52.5%,其它外传类是 28.4%。恶意载荷其实就写在 Agent 的历史日志里,大约三分之二的人没去看。 - 疲劳与时间压力:漏判率在一局开始的几条命令后先下降,临近结束又回升;作者推测与时间压力、想多做几条有关。
- 误拦反过来训练人“别认真”:安全的
npm config set registry …被拦 59%,rm -rf dist/被拦 45%。拦得多会拖慢 Agent,也会让人不再仔细看。cat ~/.zshrc是争议最大的命令(45.9% 批准),因为它危不危险取决于文件里有没有密钥,而审批者也不知道。
- Threats that “look harmless” slip through most: obviously destructive commands are missed 11.7% of the time, credential-reading scope violations 35.0%, about 3×. People are alert to “delete” and relaxed about “just read a file”, yet reading is the leak path.
- The approver cannot see what really runs:
npm run analyzewas approved 64.7% of the time, the most-missed of 37 scenarios; the threenpm runthreats were missed 52.5% pooled versus 28.4% for other exfiltration. The payload was visible in the agent’s history log, and about two thirds of players did not read it. - Fatigue and time pressure: the miss rate fell over the first few commands, then climbed again near the end of a session; the author links this to time pressure and wanting to fit in more commands.
- Over-blocking teaches people not to care: a safe
npm config set registry …was blocked 59% of the time andrm -rf dist/45%. Heavy blocking slows the agent and trains people to stop reading.cat ~/.zshrcwas the most divisive command (45.9% approved), because its risk depends on whether the file holds secrets, which the approver cannot know either.
5方案对比:除了逐条点批准还能怎样
5Options compared: alternatives to clicking approve
| 方案 | 怎么做 | 公开数据 | 主要短板 |
|---|---|---|---|
| 逐条人工审批 | 每个敏感动作弹框 | 游戏中平均准确率 66.3%;真实使用中 93% 的提示被批准 | 疲劳、上下文缺失、误拦 |
| 全部放行 | 跳过权限检查 | 游戏中 7% 的玩家实际上就是这么做的 | 零防护 |
| 模型分类器(Claude Code auto mode) | 两阶段分类器在执行前审查每个动作,只看用户消息和工具调用 | 真实流量误拦 0.4%;真实“越权”动作漏判 17%;合成外传漏判 5.7%(Anthropic 自报) | 概率性;17% 是官方承认的“诚实数字” |
| 沙箱 + 凭据遮罩 | 操作系统限制文件与网络;命令只见占位符 | 确定性,无误判率概念 | 只覆盖 shell 命令;配置成本 |
| 默认零权限 + capability(Cloudflare OS) | Agent 初始无权限;拿到的是类型化接口而非密钥;外部副作用经 Gatekeeper | 未公布量化数据 | 需要为每个外部服务写 Gatekeeper |
| Option | How | Public numbers | Main weakness |
|---|---|---|---|
| Per-action human approval | A dialog for every sensitive action | 66.3% mean accuracy in the game; 93% of prompts approved in real use | Fatigue, missing context, over-blocking |
| Approve everything | Skip permission checks | 7% of game players effectively did this | No protection |
| Model classifier (Claude Code auto mode) | A two-stage classifier reviews each action before it runs, seeing only user messages and tool calls | 0.4% false positives on real traffic; 17% misses on real overeager actions; 5.7% on synthetic exfiltration (Anthropic-reported) | Probabilistic; 17% is what Anthropic calls “the honest number” |
| Sandbox + credential masking | The OS limits files and network; commands see placeholders | Deterministic, no error rate in the same sense | Covers shell commands only; setup cost |
| No access by default + capabilities (Cloudflare OS) | Agents start with nothing; they get typed interfaces, not keys; external side effects go through a Gatekeeper | No quantitative data published | A Gatekeeper per external service |
Anthropic 的 auto mode 设计说明里有两个值得借鉴的细节:一是分类器故意看不到 Agent 自己的文字和工具输出,避免 Agent“说服”分类器、也降低提示注入风险;二是被拒的动作带着理由退回给 Agent,连续 3 次或累计 20 次被拒才升级给人——人被放在了异常路径上,而不是每一步。Anthropic 也明确说它“不能直接替代对高风险基础设施的仔细人工审查”。
Two details of Anthropic’s auto mode design are worth borrowing. The classifier deliberately cannot see the agent’s own text or tool outputs, so the agent cannot talk it round and prompt injection has less to work with. And a denied action goes back to the agent with a reason; only after 3 consecutive or 20 total denials does it escalate to a human. The human sits on the exception path, not on every step. Anthropic also says plainly that it is “not a drop-in replacement for careful human review on high-stakes infrastructure”.
6怎么用:给编码 Agent 搭门控的清单
6In practice: a gating checklist for coding agents
下面以 Claude Code 为例,把图 2 的四层落到配置上(配置项来自官方文档;取舍为作者建议):
Using Claude Code as the example, here is how the four layers of Figure 2 map to configuration (settings from the official docs; the trade-offs are the author’s suggestions):
- 第 1 层 · 沙箱与凭据:开启 Bash 沙箱,用
sandbox.credentials对~/.aws/credentials等文件设deny,对必须使用的 token 设mask(需要network.tlsTerminate)。这一层直接消掉了游戏里漏判率最高的“越权读凭据”。 - 第 2 层 · 规则:把
~/.zshrc这类“取决于内容”的文件直接禁读——Scale X 作者也建议 Agent 不应直接读它;只读命令放进 allow 列表,减少无意义的弹框。 - 第 3 层 · 分类器:用 auto mode 代替
--dangerously-skip-permissions;先用claude auto-mode defaults看默认规则,再把你信任的内部基础设施加进环境说明。 - 第 4 层 · 人:把人的审查留给结果和不可逆动作:审 diff、审 PR 合并、审部署,而不是审
npm test。 - 专治
npm run盲区:在 CLAUDE.md 里要求 Agent 运行npm run <x>前先展示 package.json 里对应脚本的内容;或用 hooks 在执行前打印脚本正文。
- Layer 1 · Sandbox and credentials: turn on the Bash sandbox, set
denyundersandbox.credentialsfor files like~/.aws/credentials, andmasktokens the work genuinely needs (requiresnetwork.tlsTerminate). This removes the game’s most-missed category, scope violations, outright. - Layer 2 · Rules: deny reads of files whose risk depends on content, such as
~/.zshrc(the Scale X author also says agents should not read it directly); put read-only commands on the allow list to cut pointless prompts. - Layer 3 · Classifier: use auto mode instead of
--dangerously-skip-permissions; runclaude auto-mode defaultsto see the baseline, then describe your trusted internal infrastructure in the environment slot. - Layer 4 · Humans: spend human review on results and irreversible actions: diffs, PR merges, deploys, not
npm test. - Closing the
npm runblind spot: tell the agent in CLAUDE.md to show the package.json script body before runningnpm run <x>, or use a hook that prints the script before execution.
// ~/.claude/settings.json(示意:第 1 层)
{
"sandbox": {
"enabled": true,
"network": { "tlsTerminate": {}, "allowedDomains": ["*.github.com", "registry.npmjs.org"] },
"credentials": {
"files": [ { "path": "~/.aws/credentials", "mode": "deny" } ],
"envVars": [ { "name": "GH_TOKEN", "mode": "mask", "injectHosts": ["api.github.com"] } ]
}
}
}
// ~/.claude/settings.json (sketch: layer 1)
{
"sandbox": {
"enabled": true,
"network": { "tlsTerminate": {}, "allowedDomains": ["*.github.com", "registry.npmjs.org"] },
"credentials": {
"files": [ { "path": "~/.aws/credentials", "mode": "deny" } ],
"envVars": [ { "name": "GH_TOKEN", "mode": "mask", "injectHosts": ["api.github.com"] } ]
}
}
}
注意:遮罩相关设置只在用户级、托管设置或 --settings 中生效,写在仓库的 .claude/settings.json 里会被忽略;沙箱只覆盖 shell 命令,Claude 的文件工具、MCP server 和 hooks 在沙箱之外。
Note: masking settings are honoured only from user settings, managed settings or --settings, and ignored in a repository’s .claude/settings.json; the sandbox covers shell commands only, while Claude’s file tools, MCP servers and hooks run outside it.
7坑与未解问题
7Pitfalls and open questions
8资源与来源
8Resources and sources
- Humans missed 1 in 3 threats approving AI agent commands across 40,000 plays — Scale X,Alex Wauters,2026-08-05 · 一手数据(厂商自有游戏)
- Claude Code auto mode — Anthropic Engineering,2026-03-25 · 93% 批准率与分类器误判率(官方自报)
- Measuring AI agent autonomy in practice — Anthropic,2026-02-18 · 自动批准比例随经验上升
- Alice in Warningland — Akhawe & Felt,USENIX Security 2013 · 浏览器警告点击穿透率
- Cloudflare OS — Cloudflare,2026-08-05 · 默认零权限与 Gatekeeper
- Configure the sandboxed Bash tool — Claude Code 官方文档 · 凭据 deny / mask
- Claude Code v2.1.223 — 2026-08-06 · 审批框绕过修复
- The human-in-the-loop illusion — Resilient Cyber,Chris Hughes,2026-03-30 · 评论文章(社区观点)
- Developers Digest 08-07 — 当日聚合,含 HN 讨论热度
- Humans missed 1 in 3 threats approving AI agent commands across 40,000 plays — Scale X, Alex Wauters, 2026-08-05 · primary data (the vendor’s own game)
- Claude Code auto mode — Anthropic Engineering, 2026-03-25 · 93% approval rate and classifier error rates (vendor-reported)
- Measuring AI agent autonomy in practice — Anthropic, 2026-02-18 · auto-approve share rises with experience
- Alice in Warningland — Akhawe & Felt, USENIX Security 2013 · browser warning click-through rates
- Cloudflare OS — Cloudflare, 2026-08-05 · no access by default and Gatekeepers
- Configure the sandboxed Bash tool — Claude Code docs · credential deny / mask
- Claude Code v2.1.223 — 2026-08-06 · approval-dialog bypass fixes
- The human-in-the-loop illusion — Resilient Cyber, Chris Hughes, 2026-03-30 · opinion piece (community view)
- Developers Digest 08-07 — daily roundup, incl. HN discussion
主页