Mingyu's Library主页
AI Daily · 2026-08-07 · 深度学习AI Daily · 2026-08-07 · Deep dive

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.

人类审批者漏放的比例(越长越危险)明显破坏性rm -rf /、chmod -R 777 /11.7%持久化篡改crontab 注入、改 git config23.8%外传 / 代码执行curl 到陌生 API、仿冒包名33.4%越权读取凭据cat ~/.aws/credentials35.0%越“不像坏事”的命令越容易放过:读凭据的漏判率约为删库命令的 3 倍数据:Scale X 审批游戏,40,000+ 局、409,000 次决策(2026-08-05)
图 1 · 不同类型威胁的漏判率(数据来自 Scale X,作者重绘)
Share of threats human reviewers let through (longer = worse)Obviously destructiverm -rf /, chmod -R 777 /11.7%Persistent mutationcrontab injection, git config hijack23.8%Exfiltration / code execcurl to unknown API, typosquats33.4%Scope violationcat ~/.aws/credentials35.0%The less a command “looks bad”, the more it slips through: credential reads ~3× destructive onesData: Scale X approval game, 40,000+ runs, 409,000 decisions (2026-08-05)
Figure 1 · Miss rate by threat type (data from Scale X, redrawn by the author)
为什么今天值得读:同一周里,Scale X 发布了这组数据(08-05),Cloudflare OS 开源了“默认零权限、只在外部副作用处审批”的设计(08-05),Claude Code v2.1.223 刚修复“用 Tab 或不可见字符把命令藏过审批框”的漏洞(08-06)。三件事指向同一个问题:审批框本身不是安全边界。
Why read this today: in the same week Scale X published these numbers (08-05), Cloudflare open-sourced Cloudflare OS with “no access by default, approval only for external side effects” (08-05), and Claude Code v2.1.223 fixed a bug where tabs or invisible characters could hide part of a command from the approval dialog (08-06). All three point at one problem: the approval dialog itself is not a security boundary.

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.

66.3%平均准确率
约每 3 个威胁漏 1 个
32.9%以负分结束的局
漏放 + 误拦得不偿失
7%全部点“批准”
的玩家
20.8%抓到全部威胁且
误拦不超过 1/5 的玩家
66.3%mean accuracy
~1 in 3 threats missed
32.9%sessions ending negative
misses + over-blocks
7%players who approved
every prompt
20.8%caught every threat while
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 run runs 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):

  1. “看起来无害”的威胁最容易漏:明显破坏性命令漏判率 11.7%,而读凭据的越权命令是 35.0%,约 3 倍。人对“删东西”警觉,对“看一眼文件”不警觉,可后者恰恰是泄密路径。
  2. 审批者看不到真正执行的内容:npm run analyze 被批准了 64.7%,是 37 个场景里漏得最多的;三个 npm run 类威胁合计漏判 52.5%,其它外传类是 28.4%。恶意载荷其实就写在 Agent 的历史日志里,大约三分之二的人没去看。
  3. 疲劳与时间压力:漏判率在一局开始的几条命令后先下降,临近结束又回升;作者推测与时间压力、想多做几条有关。
  4. 误拦反过来训练人“别认真”:安全的 npm config set registry … 被拦 59%,rm -rf dist/ 被拦 45%。拦得多会拖慢 Agent,也会让人不再仔细看。cat ~/.zshrc 是争议最大的命令(45.9% 批准),因为它危不危险取决于文件里有没有密钥,而审批者也不知道。
  1. 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.
  2. The approver cannot see what really runs: npm run analyze was approved 64.7% of the time, the most-missed of 37 scenarios; the three npm run threats 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.
  3. 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.
  4. Over-blocking teaches people not to care: a safe npm config set registry … was blocked 59% of the time and rm -rf dist/ 45%. Heavy blocking slows the agent and trains people to stop reading. cat ~/.zshrc was the most divisive command (45.9% approved), because its risk depends on whether the file holds secrets, which the approver cannot know either.
核心洞察:审批者要在几秒内回答“这个动作在我的环境里安全吗”,而这需要他看不到的信息。与其要求人更认真,不如让系统把大多数问题在人看到之前就用确定性手段解决掉。
Key insight: the approver must answer “is this action safe in my environment?” within seconds, which needs information they cannot see. Rather than asking people to try harder, let the system settle most questions deterministically before a human ever sees them.
Agent 想执行一个动作① 确定性边界:沙箱 / 网络白名单 / 凭据遮罩不靠判断,操作系统直接拦;覆盖面最大② 静态规则:deny / allow 列表~/.aws、~/.zshrc 一律禁读;只读命令直接放行③ 模型分类器(如 auto mode)只看用户消息与工具调用,拦“超出授权”的动作④ 人工审批只留给不可逆、对外有副作用的少数动作越往下越少、越贵:人的注意力是最稀缺的那一层(作者据各来源整理的示意)
图 2 · 分层门控:人只处理最后剩下的少数动作(作者示意)
The agent wants to take an action① Deterministic boundary: sandbox / egress allowlist / maskingNo judgment needed, the OS blocks it; widest coverage② Static rules: deny / allow listsNever read ~/.aws or ~/.zshrc; read-only commands pass③ Model classifier (e.g. auto mode)Sees user messages and tool calls; blocks overreach④ Human approvalOnly the few irreversible, external actionsFewer and costlier as you go down: human attention is the scarcest layer (author’s sketch from the sources)
Figure 2 · Layered gating: humans handle only what is left at the end (author’s sketch)

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
OptionHowPublic numbersMain weakness
Per-action human approvalA dialog for every sensitive action66.3% mean accuracy in the game; 93% of prompts approved in real useFatigue, missing context, over-blocking
Approve everythingSkip permission checks7% of game players effectively did thisNo protection
Model classifier (Claude Code auto mode)A two-stage classifier reviews each action before it runs, seeing only user messages and tool calls0.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 maskingThe OS limits files and network; commands see placeholdersDeterministic, no error rate in the same senseCovers 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 GatekeeperNo quantitative data publishedA 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 deny under sandbox.credentials for files like ~/.aws/credentials, and mask tokens the work genuinely needs (requires network.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; run claude auto-mode defaults to 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 run blind spot: tell the agent in CLAUDE.md to show the package.json script body before running npm 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

数据本身的局限:游戏里威胁约占 34%,远高于真实环境;一局很短、时间压力是人为设置的;未公布玩家人数,也没有每次决策的耗时。作者认为时间压力与真实的赶工期相似,但这只是他的判断。所以“66.3%”应读作“在高压、高威胁密度下的表现”,不能直接换算成线上漏判率。
Limits of the data: threats were about 34% of commands, far above real life; sessions were short and the time pressure artificial; neither the number of players nor time per decision is reported. The author argues the pressure resembles real deadlines, but that is his judgment. Read “66.3%” as performance under high pressure and high threat density, not as a production miss rate.
分类器也会漏:Anthropic 自报 auto mode 对真实“越权”动作的漏判率是 17%,主要错在判断“用户之前的同意是否覆盖这个具体动作”。Resilient Cyber 的评论文章引用 Simon Willison 的观点:基于模型的防护是非确定性的,他更倾向操作系统级沙箱。分类器适合作为一层,而不是唯一一层。
Classifiers miss too: Anthropic reports a 17% miss rate for auto mode on real overeager actions, mostly from misjudging whether an earlier user approval covers the specific action. A Resilient Cyber opinion piece cites Simon Willison’s view that model-based protection is non-deterministic and that he prefers OS-level sandboxing. A classifier is one layer, not the only one.
审批框本身也会被攻击:Claude Code v2.1.223(08-06)修复了用 Tab 或不可见 Unicode 填充命令、把一部分藏过审批框的问题,以及另一处 Bash 权限检查绕过。Scale X 文中引用的 HN 评论也指出:批准某条命令名意义有限,因为 Agent 可以改掉这条命令实际调用的脚本或代码。
The dialog itself can be attacked: Claude Code v2.1.223 (08-06) fixed commands padded with tabs or invisible Unicode hiding part of themselves from the approval dialog, plus another Bash permission-check bypass. A Hacker News comment quoted by Scale X adds that approving a command name means little when the agent can change the script or code that command runs.
常见误解:“去掉逐条审批 = 不要人了”。Anthropic 在 2026-02 的研究里的说法是:有效的监督“不需要批准每个动作,而是在关键时刻有能力介入”。人仍然重要,只是要放在信息最充分、代价最高的那几步。
A common misreading: “dropping per-action approval means dropping humans”. Anthropic’s February 2026 research puts it this way: effective oversight “doesn’t require approving every action but being in a position to intervene when it matters”. Humans still matter; they belong at the few steps where they have the most information and the stakes are highest.

8资源与来源

8Resources and sources