三个 Harness Bug:Anthropic 为 Claude Code 两个月的质量下滑写了一份教科书级 postmortem
模型本身没有变差,但 harness 的三个工程 bug 叠加,制造了持续两个月的体验退化——这是 2026 年迄今最值得工程团队细读的 postmortem。
三个 Harness Bug:Anthropic 为 Claude Code 两个月的质量下滑写了一份教科书级 postmortem
如果你在过去两个月里觉得 Claude Code 变笨了、更健忘、更啰嗦——你的感觉是对的,但原因不是模型。
4 月 23 日,Anthropic 发布了一份详细的 postmortem,罕见地承认了三个相互独立的工程问题,并一一解释了根因。这不是公关声明,是真正意义上的工程复盘,非常值得所有构建 agentic 系统的人精读。
三个 Bug,一次叠加的灾难
Bug 1:默认推理等级悄悄降级(3 月 4 日 → 4 月 7 日)
Opus 4.6 在 high thinking 模式下,部分用户会遇到 UI 像冻结一样的极端长延迟。Anthropic 的解法是把默认推理等级从 high 降到 medium——内部 eval 认为”智能略降但延迟大幅改善”是值得的取舍。
结果用户完全不买账。大多数人甚至不知道这个变化,就是感觉”Claude 变笨了”。
Anthropic 在 4 月 7 日撤回了这个改动。现在 Opus 4.7 默认是 xhigh,其他模型默认是 high。
“We rolled out a change making medium the default effort, and explained the rationale via in-product dialog. Soon after rolling out, users began reporting that Claude Code felt less intelligent.” — Anthropic Engineering Blog
Bug 2:Thinking Section 被每轮清空(3 月 26 日 → 4 月 10 日)
这是三个 bug 里技术上最复杂、影响最深的。
背景:Claude Code 会把每轮的 thinking(扩展思考内容)保留在对话历史里,让 Claude 下一轮能”记住自己为什么这么做”。但 prompt cache 有时效——超过约 1 小时的空闲 session,缓存会失效,重新发请求时所有 token 都要重新写入缓存,对 Pro 用户来说会一次性消耗大量用量配额。
Anthropic 尝试优化:对空闲超 1 小时的 session,用 clear_thinking_20251015 header + keep:1 把旧 thinking section 清掉,只保留最新的一块,从而减少重入缓存的 token 量。
但实现出了 bug:清空操作不是只执行一次,而是在那个 session 的每一轮都持续执行。也就是说,用户每发一条消息,Claude 能看到的 thinking 历史都只剩最新的一块。如果你在 Claude 用工具的中途发了消息,就连当前轮的 thinking 也会丢失。
“Claude would continue executing, but increasingly without memory of why it had chosen to do what it was doing. This surfaced as the forgetfulness, repetition, and odd tool choices people reported.”
更糟的是:由于 thinking section 不断丢失,每轮都会产生 cache miss,反而加速消耗用量配额——正是 Anthropic 想节省的东西。
Bug 3:减少啰嗦的 system prompt 改动(4 月 16 日 → 4 月 20 日)
Anthropic 加了一条指令让模型减少 verbosity。单独看没问题,但和已有的 prompt 叠加,损害了代码生成质量。4 天后撤回。
为什么难以发现
这三个 bug 各自影响不同的流量切片、在不同时间窗口发生,叠加后看起来像”随机、广泛的质量波动”,而不是某个特定改动的直接后果。
更要命的是:Bug 2 专门在空闲超 1 小时的 session 里触发,但内部测试和 dogfooding 大多用新 session,所以没有复现。Anthropic 工程师在 HN 评论区解释:
“Two unrelated experiments made it challenging for us to reproduce the issue at first: an internal-only server-side experiment related to message queuing; and an orthogonal change in how we display thinking suppressed this bug in most CLI sessions.”
这个 bug 通过了多轮人工和自动代码审查、单元测试、端到端测试、自动验证和 dogfooding——前后花了超过一周才找到根因。
对构建 Agentic 系统的启示
Simon Willison 直接点出了这份 postmortem 最重要的工程教训:
“If you’re building agentic systems it’s worth reading this article in detail - the kinds of bugs that affect harnesses are deeply complicated, even if you put aside the inherent non-deterministic nature of the models themselves.”
几个可以直接借鉴的教训:
-
长期空闲 session 是特殊的测试场景。agentic harness 必须专门测试”用户离开一小时再回来”的行为,而不只测新 session。
-
Thinking section 是 stateful 的,不能被当作可随意丢弃的 context 压缩目标。清除 thinking history 的代价比想象中大得多,因为后续的工具调用和推理决策都依赖它。
-
多个优化叠加时,需要隔离测试。三个 bug 独立看都是”合理的工程取舍”,但叠加后制造了系统性的质量退化,且极难用 eval 捕捉。
-
用户对”变笨”的感知极其敏感。即使 eval 没有显著变化,用户对 subjective quality 的感知会在几天内反馈出来。
Anthropic 最后重置了所有订阅用户的用量配额作为补偿——这在他们历史上还是头一次。
模型能力在 2026 年继续快速提升,但 harness 工程的复杂度也在同步增长。这次 postmortem 提醒我们:当你觉得”模型变了”,有时候真正变的是包裹它的那层工程代码。