AgentFails · 智能体翻车库 · 38 条翻车模式
你的编程智能体会怎么翻车,这里都有,还附修复。
一个可搜索、由社区共建的翻车模式数据库,覆盖 Claude Code、Cursor、Codex 和 Copilot 智能体。每条都附带可以直接粘贴进 CLAUDE.md、AGENTS.md、.cursor/rules 的规则,以及钩子或 /verify 技能。
- 做错了功能
“全部迁移完了”(其实没有)
"Fully migrated" (it wasn't)
智能体声称一次全局改动(重命名、迁移、换 API)已经全部完成,实际上只改了它碰巧看到的那些地方。
Claude CodeCursorCodexCopilot agent - 做错了功能
一个猜测,回来时变成了事实
A guess that came back as a fact
一个假设(它自己的或子智能体的)进来时还标着“猜测”,出去时在总结里变成了“已验证的事实”,功能就建在它上面。
Claude CodeCursorCodexCopilot agent - 做错了功能
你已经取消的需求又回来了
A requirement you cancelled comes back
你在会话中途改了方向,旧的指令却在后面的代码或输出里又冒了出来。
Claude CodeCursorCodexCopilot agent - 做错了功能
桩代码冒充“已完成”
A stub shipped as "done"
智能体说功能做完了,但某个函数体其实是 `pass`、`return null` 或 `throw new Error("not implemented")`。
Claude CodeCursorCodexCopilot agent - 做错了功能
按自己的理解做了,不是你要的那个
Built what it understood, not what you meant
智能体交付了一个自洽的功能,但回答的是需求的另一种读法。所有检查都通过了,因为检查测的也是它自己的理解。
Claude CodeCursorCodexCopilot agent - 做错了功能
改了废弃的“双胞胎”文件,线上那个没动
Fixed the deprecated twin, not the live file
两个文件同名(v1 副本、legacy 目录)。智能体改了没在用的那个,你关心的 bug 依然存在。
Claude CodeCursorCodexCopilot agent - 做错了功能
新模块写好了,却没接上
New module written, never wired in
智能体写了实现功能的文件,却没导入、没注册、没加路由,所以对用户来说这个功能并不存在。
Claude CodeCursorCodexCopilot agent - 做错了功能
换成了自己的方案,被指出后立刻说“你说得完全对”
Swapped in its own approach, then "You're absolutely right"
你点名了想要的方案,智能体却提出或实现了另一种;你一指出,它马上附和,既不解释也不重新核对。
Claude CodeCursorCodexCopilot agent - 有 Bug
“测试全部通过”(其实一个都没跑)
"All tests pass" (nothing was run)
智能体说已经完成或测试通过,但根本没有执行能证明这一点的检查。
Claude CodeCursorCodexCopilot agent - 有 Bug
名为“重构”,实则改了行为
A "refactor" that changed behavior
看起来只是清理的代码,改变了可观察的行为(默认值、错误信息、状态码、日志级别),测试却没发现。
Claude CodeCursorCodexCopilot agent - 有 Bug
修了一个从没复现过的崩溃
A fix for a crash it never reproduced
智能体为一个自己从没触发过的故障加了守卫或分支,说是“防止”它发生;没人知道这个修复是否对准了真正原因,审查者也没注意到描述里的这句坦白。
Claude CodeCursorCodexCopilot agent - 有 Bug
智能体审查说“可以合并”(却漏掉了问题)
Agent review said "good to go" (and missed it)
多轮智能体审查都批准了一个改动,结果人一看就发现它有问题、多余或架构不对。同类模型多审几遍,并不等于多了几次独立检查。
Claude CodeCursorCodexCopilot agent - 有 Bug
把 API 密钥直接写进代码
API key pasted into the code
智能体把凭据(来自示例、测试,或你在聊天里贴的内容)直接写进源码,然后被提交了。
Claude CodeCursorCodexCopilot agent - 有 Bug
调用了不存在的方法
Called a method that doesn't exist
智能体用了某个方法、选项、配置项或命令行参数,它存在于别的语言或别的版本里,但不在你的项目里。
Claude CodeCursorCodexCopilot agent - 有 Bug
漏了一个 await
Dropped an await
重构之后,一个异步调用返回的 promise 被丢弃了,导致写入顺序错乱,或者错误变成了无人处理的 rejection。
Claude CodeCursorCodexCopilot agent - 有 Bug
把错误吞掉,让它“能跑”
Errors swallowed to make it "work"
智能体用一个什么都不做(或只打日志)的 catch 包住出错的代码,错误消失了,“出问题了”的信号也跟着消失了。
Claude CodeCursorCodexCopilot agent - 有 Bug
补丁摞补丁
Fix on top of fix on top of fix
智能体一层层叠加未经验证的修复,每次都在修上一次修复带来的症状,从不回头找根因。
Claude CodeCursorCodexCopilot agent - 有 Bug
引入了一个根本不存在的包
Imported a package that doesn't exist
智能体导入或安装了一个名字很像真的包,它不在你的依赖清单里,甚至根本不存在。如果这个名字被人抢注,就成了供应链风险。
Claude CodeCursorCodexCopilot agent - 有 Bug
为了让测试通过,把测试改弱了
Made the test pass by weakening the test
失败的检查变绿了,不是因为代码对了,而是智能体跳过、删除、放宽了测试,或者把被测单元 mock 掉了。
Claude CodeCursorCodexCopilot agent - 有 Bug
永远不会失败的测试
Tests that can't fail
智能体加的测试调用了代码,却什么都不断言(或断言一个必然为真的东西),覆盖率涨了,保护力没涨。
Claude CodeCursorCodexCopilot agent - 有 Bug
示例能跑,边界就崩
Works on the example, breaks on the edges
智能体实现到示例能通过就停了。空输入、null、边界值和失败路径都没处理。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
对二十个功能共用的工具函数做了“小清理”
"Small cleanup" of a helper twenty features use
智能体在改某个功能时,顺着 import 进了共享工具文件并重构了它,所有调用方的行为都跟着变了。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
只让改个前端样式,它动了后端逻辑
Asked for a UI tweak, it changed backend logic
一个小小的前端需求(“按钮改成‘保存’”“隐藏这个字段”)回来时,API 处理、校验逻辑或数据库查询也被改了。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
只让修一处,它改了一堆无关文件
Asked for one fix, it changed unrelated files
你只要求改一处;diff 里却顺手“清理”了没人提过的其他函数、文件和配置。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
给没有用户的代码做向后兼容
Backwards compatibility for code that has no users
在全新项目里,或者对昨天才写的代码,智能体保留旧名字、回退逻辑和迁移垫片,说是“为了兼容”,但根本没有东西依赖旧行为。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
“顺手”升级了依赖或改了配置
Bumped a dependency or config "along the way"
为了绕过一个无关的警告或错误,智能体升级了某个包、改了 lockfile,或改了配置默认值。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
改了你没要求改的公共 API
Changed a public API you didn't ask to change
智能体改了导出函数的签名、公共类型或 API 返回结构,破坏了 diff 之外的调用方。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
不打招呼就建分支并推送
Created and pushed branches without asking
智能体自作主张地建分支并推送到共享远端,于是半成品在你决定分享之前就出现在团队面前(还会触发 CI 和各种机器人)。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
为没有用户会遇到的情况加固代码
Hardened the code against cases no user will hit
智能体(或它的审查者)为真实用户根本到不了的状态堆上分支、守卫和测试,同一个 diff 里明显的问题却没人发现。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
没人调用的辅助函数、类型和包装层
Helpers, types and wrappers nobody calls
智能体加了投机性的辅助函数、没用到的类型、只有一行的包装层,以及注释掉的“参考”代码。能用,但要读的、要维护的东西变多了。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
无视 CLAUDE.md 里写好的约定
Ignored the conventions in CLAUDE.md
代码能跑,但不遵守项目规则文件里写明的、或周围代码里明摆着的约定;规则要求的步骤(比如跑某些测试)也被当成“没必要”而跳过。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
从不提出更简单的做法
Never proposed the simpler way
智能体交出一个能用、但过度复杂又啰嗦的方案。它很少会说“改小一点就够了”“这个不需要”或者“这个改动根本不该做”。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
发现了旁边的真 bug,却谁也没告诉
Noticed the real bug next door and told no one
智能体在任务附近看到了一个真问题,既没修,也没报告。只有范围规则、却没有上报渠道时,这种情况会更严重。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
一个类型错误演变成了架构改动
One type error became an architecture change
为了修一个类型错误,智能体改了接口,接着改了所有实现类,一个只涉及单文件的需求变成了多文件的重新设计。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
没问一声就跑了不可逆命令
Ran an irreversible command without asking
智能体为了摆脱卡住的状态,执行了强推、`rm -rf`、`git reset --hard` 或删表,工作成果或数据就没了。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
重新造了一个早已存在的轮子
Rebuilt something that already existed
智能体没去找已有的函数、组件或服务,而是又写了一个,从此要同步维护两份。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
只是打开看看的文件,也被它格式化了
Reformatted files it only opened to read
智能体对与任务无关的文件做了格式化、换行或风格调整,真正的改动淹没在空白噪音里。
Claude CodeCursorCodexCopilot agent - 越界 / 不理想
交付了一个你从没要过的功能
Shipped a feature you never asked for
一个修 bug 的 PR,顺带加了监控中间件、功能开关客户端、设置页或命令行选项。
Claude CodeCursorCodexCopilot agent
三个问题,三类翻车
每条模式都只属于其中一类。 分类方式来自 @liushiyumath 的 X 帖子。