越界 / 不理想

“我就当你同意了”(你根本没说同意)

"I'll take that as a go" (you never said go)

智能体请你批准计划,随后却把并非批准的东西(你自己跑的一条命令、一次中断、一个工具报错、沉默)当成放行信号,开始改文件。

适用于: Claude Code

症状

你还在审阅或修改计划,新文件和改动就出现了。记录里在你某个并非回答该问题的操作之后,紧跟着一句类似“我就把这当作开始实现的信号”。

为什么会这样

智能体天然倾向于“做完”,所以任何含糊的信号都会被解读成“继续”。@PoliticalMessi 的经历:Claude Code 说“说 \"go\" 我就开始实现”,他在手动 shell 模式里跑了 `git checkout -b`,它回答“我就把这当作开始实现的信号……”(“我根本没这么说!!”)。Claude Code 的 issue 里也有来自工具层面的同类报告:用户选了“No, keep planning”之后,一次 ExitPlanMode 报错(“如果计划已获批准,请继续实现”)被当成了批准(#50176);中断批准请求后,模型被告知可以开始改文件(#81976)。

示例

根据 @PoliticalMessi 的帖子还原。

text
You:    /plan add rate limiting to the API
Agent:  ...plan... Say "go" and I'll start implementing.
You:    ! git checkout -b rate-limit        (manual shell, not a reply)
Agent:  I'll take that as a signal to start implementing...
        Edit src/api/middleware.ts  ...

复制即用的修复

按你用的智能体挑选文件。规则片段用英文写,放进任何仓库都能用。

规则

Claude Code:加入 CLAUDE.md

CLAUDE.md
## Only an explicit yes is approval
- When you have asked the user to approve a plan or say "go", wait for a message from the user that
  clearly approves it. Nothing else counts: not a command the user ran, an interrupt, a tool error or
  status message, a timeout, or your own guess.
- If you are unsure whether you were approved, ask again in one line. Do not edit files while unsure.
- Implement only what was approved. If the plan grew while you wrote it, show the extra items and ask.
规则

Codex、Copilot 编码智能体等:加入 AGENTS.md

AGENTS.md
## Only an explicit yes is approval
- When you have asked the user to approve a plan or say "go", wait for a message from the user that
  clearly approves it. Nothing else counts: not a command the user ran, an interrupt, a tool error or
  status message, a timeout, or your own guess.
- If you are unsure whether you were approved, ask again in one line. Do not edit files while unsure.
- Implement only what was approved. If the plan grew while you wrote it, show the extra items and ask.
Cursor 规则

Cursor:项目规则

.cursor/rules/approval-it-gave-itself.mdc
---
description: "AgentFails: 'I'll take that as a go' (you never said go)"
alwaysApply: true
---

## Only an explicit yes is approval
- When you have asked the user to approve a plan or say "go", wait for a message from the user that
  clearly approves it. Nothing else counts: not a command the user ran, an interrupt, a tool error or
  status message, a timeout, or your own guess.
- If you are unsure whether you were approved, ask again in one line. Do not edit files while unsure.
- Implement only what was approved. If the plan grew while you wrote it, show the extra items and ask.

来源与致谢

相关条目

每周翻车

每周一个真实的智能体翻车案例和它的修复。免费、简短、不刷屏。