Claude Code 质量风波复盘:三个独立事故、两次回退、一个缓存 bug
Anthropic 官方回应近一个月“Claude 变笨”的集中反馈,确认 API 和推理层未受影响,问题全部出在 Claude Code 产品链路,并拆成三个独立事故:3 月 4 日将 Claude Code 默认推理强度从 high 调成 medium,以缓解高努力模式下 UI 卡死般的延迟,但这被证明是错误的取舍,4 月 7 日回退,Opus 4.7 现默认 xhigh;3 月 26 日引入的 clear_thinking_20251015 缓存优化有 bug,会话空闲超过一小时后本应只清一次旧思考,实际每轮清空,导致 Claude 失忆、重复、工具调用错乱,并因连续 cache miss 让用量限额异常消耗,4 月 10 日修复;4 月 16 日为 Opus 4.7 准备的 system prompt 限长指令(工具调用间 ≤25 词、最终回复 ≤100 词)与其它改动叠加,消融实验显示带来约 3% 的评估下降,4 月 20 日回退。文章附有明确日期、版本号和内部验证过程,并承诺对 system prompt 变更增加逐模型评估、浸泡期与灰度。适合 Claude Code 深度用户及关心 agent 工程可观测性与回滚机制的人。
Over the past month, we’ve been looking into reports that Claude’s responses have worsened for some users. We’ve traced these reports to three separate changes that affected Claude Code, the Claude Agent SDK, and Claude Cowork. The API was not impacted.
All three issues have now been resolved as of April 20 (v2.1.116).
In this post, we explain what we found, what we fixed, and what we’ll do differently to ensure similar issues are much less likely to happen again.
过去一个月里,我们一直在排查“部分用户的 Claude 回复质量变差”的报告。最终将这些报告追溯到三个相互独立的变更,它们分别影响了 Claude Code、Claude Agent SDK 和 Claude Cowork。API 未受影响。
这三处问题都已在 4 月 20 日(v2.1.116)起全部解决。
在本文中,我们会说明调查发现、修复内容,以及为了大幅降低类似问题再次发生的概率,我们今后会采取哪些不同做法。
We take reports about degradation very seriously. We never intentionally degrade our models, and we were able to immediately confirm that our API and inference layer were unaffected.
After investigation, we identified three different issues:
- On March 4, we changed Claude Code's default reasoning effort from high to medium to reduce the very long latency—enough to make the UI appear frozen—some users were seeing in high mode. This was the wrong tradeoff. We reverted this change on April 7 after users told us they'd prefer to default to higher intelligence and opt into lower effort for simple tasks. This impacted Sonnet 4.6 and Opus 4.6.
- On March 26, we shipped a change to clear Claude's older thinking from sessions that had been idle for over an hour, to reduce latency when users resumed those sessions. A bug caused this to keep happening every turn for the rest of the session instead of just once, which made Claude seem forgetful and repetitive. We fixed it on April 10. This affected Sonnet 4.6 and Opus 4.6.
- On April 16, we added a system prompt instruction to reduce verbosity. In combination with other prompt changes, it hurt coding quality and was reverted on April 20. This impacted Sonnet 4.6, Opus 4.6, and Opus 4.7.
我们非常认真地对待任何关于质量退化的报告。我们从未有意让模型退化,而且能够立即确认 API 与推理层未受影响。
调查之后,我们定位到三个不同的问题:
- 3 月 4 日,我们把 Claude Code 的默认思考力度从 high 改为 medium,目的是降低部分用户在 high 模式下看到的极长延迟——那足以让界面看起来像卡死。这是一个错误的取舍。4 月 7 日,用户告诉我们他们更希望默认使用更高智能、并在简单任务中自行选择更低力度,我们便撤销了这一变更。受影响的是 Sonnet 4.6 与 Opus 4.6。
- 3 月 26 日,我们上线了一个变更:清除空闲超过一小时的会话中 Claude 较早的思考内容,以降低用户恢复会话时的延迟。但一个 bug 导致这个清理在会话剩余时间里每一轮都会发生,而不是只发生一次,让 Claude 显得健忘和重复。我们于 4 月 10 日修复。受影响的是 Sonnet 4.6 与 Opus 4.6。
- 4 月 16 日,我们在系统提示词中加入了一条降低冗长程度的指令。与其他提示词变更叠加后,它损害了编码质量,并于 4 月 20 日被回滚。受影响的是 Sonnet 4.6、Opus 4.6 与 Opus 4.7。
Because each change affected a different slice of traffic on a different schedule, the aggregate effect looked like broad, inconsistent degradation. While we began investigating reports in early March, they were challenging to distinguish from normal variation in user feedback at first, and neither our internal usage nor evals initially reproduced the issues identified.
由于每一项变更影响的是不同时间、不同比例的流量,叠加起来的效应看起来就像广泛且不规则的退化。虽然我们 3 月初就开始调查相关报告,但起初很难把它们与用户反馈的正常波动区分开,而且内部使用情况和评估都没有第一时间复现这些问题。
This isn’t the experience users should expect from Claude Code. As of April 23, we’re resetting usage limits for all subscribers.
这不该是用户对 Claude Code 应有的体验。自 4 月 23 日起,我们将重置所有订阅者的用量上限。
When we released Opus 4.6 in Claude Code in February, we set the default reasoning effort to high.
Soon after, we received user feedback that Claude Opus 4.6 in high effort mode would occasionally think for too long, causing the UI to appear frozen and leading to disproportionate latency and token usage for those users.
In general, the longer the model thinks, the better the output. Effort levels are how Claude Code lets users set that tradeoff—more thinking versus lower latency and fewer usage limit hits. As we calibrate effort levels for our models, we take this tradeoff into account in order to pick points along the test-time-compute curve that give people the best range of options. In the product layer, we then choose which point along this curve we set as our default, and that is the value we send to the Messages API as the effort parameter; we then make the other options available via /effort.
2 月我们在 Claude Code 中发布 Opus 4.6 时,将默认思考力度设为 high。
不久后,我们收到用户反馈:Claude Opus 4.6 在 high 模式下有时会思考过久,导致界面看起来像卡死,并给这些用户带来不成比例的延迟和 token 消耗。
一般来说,模型思考越久,输出越好。思考力度正是 Claude Code 让用户设置这一取舍的方式——是想要更多思考,还是更低的延迟和更少触碰用量上限。在为我们的大模型校准思考力度时,我们会把这一取舍纳入考量,以便在测试时计算曲线上选出能给用户最好选项范围的点。到了产品层,我们会选择把这条曲线上的哪个点设为默认值,并将其作为 effort 参数发送给 Messages API;其他选项则通过 /effort 提供。


In our internal evals and testing, medium effort achieved slightly lower intelligence with significantly less latency for the majority of tasks. It also didn’t suffer from the same issues with occasional very long tail latencies for thinking, and it helped maximize users’ usage limits. As a result, we rolled out a change making medium the default effort, and explained the rationale via in-product dialog.
在我们的内部评估与测试中,对大多数任务而言,medium 力度只需要明显更少的延迟,智能水平只略低一点。它也没有同样的偶发超长思考延迟问题,还能帮助用户最大化用量上限。因此,我们上线了把默认力度改为 medium 的变更,并通过产品内对话框说明了原因。


Soon after rolling out, users began reporting that Claude Code felt less intelligent. We shipped a number of design iterations to make the current effort setting clearer in order to alert people they could change the default (notices on startup, an inline effort selector, and bringing back ultrathink), but most users retained the medium effort default.
After hearing feedback from more customers, we reversed this decision on April 7. All users now default to xhigh effort for Opus 4.7, and high effort for all other models.
上线后不久,用户开始反馈 Claude Code 感觉变笨了。我们发布了多轮设计迭代,让当前的思考力度设置更清晰,以便提醒人们可以更改默认值(启动时通知、内联力度选择器,以及带回 ultrathink),但大多数用户仍然保留 medium 默认值。
在听取更多客户反馈后,我们于 4 月 7 日撤销了这一决定。现在所有用户默认:Opus 4.7 使用 xhigh 力度,其他所有模型使用 high 力度。
When Claude reasons through a task, that reasoning is normally kept in the conversation history so that on every subsequent turn, Claude can see why it made the edits and tool calls it did.
On March 26, we shipped what was meant to be an efficiency improvement to this feature. We use prompt caching to make back-to-back API calls cheaper and faster for users. Claude writes the input tokens to the cache when it makes an API request, then after a period of inactivity the prompt is evicted from cache, making room for other prompts. Cache utilization is something we manage carefully (more on our approach).
The design should have been simple: if a session has been idle for more than an hour, we could reduce users’ cost of resuming that session by clearing old thinking sections. Since the request would be a cache miss anyway, we could prune unnecessary messages from the request to reduce the number of uncached tokens sent to the API. We’d then resume sending full reasoning history. To do this we used the clear_thinking_20251015 API header along with keep:1.
当 Claude 推理一个任务时,这些推理过程通常会保留在对话历史里,这样在后续每一轮中,Claude 都能看到自己当初为什么做那些编辑和工具调用。
3 月 26 日,我们为这一功能上线了一个本意为效率优化的变更。我们使用 prompt caching 让用户连续调用 API 更便宜、更快。Claude 在发出 API 请求时会把输入 token 写入缓存;一段时间不活动后,该 prompt 会从缓存中逐出,为其他 prompt 腾出空间。缓存利用率是我们会精细管理的一项指标(更多关于我们的方法)。
设计本应很简单:如果会话空闲超过一小时,我们可以通过清除较早的思考内容来降低用户恢复会话的成本。由于该请求反正会缓存未命中,我们可以从请求中剪掉不必要的消息,减少发送给 API 的未缓存 token 数量,然后再恢复发送完整推理历史。为此我们使用了 clear_thinking_20251015 API header 和 keep:1。
The implementation had a bug. Instead of clearing thinking history once, it cleared it on every turn for the rest of the session. After a session crossed the idle threshold once, each request for the rest of that process told the API to keep only the most recent block of reasoning and discard everything before it. This compounded: if you sent a follow-up message while Claude was in the middle of a tool use, that started a new turn under the broken flag, so even the reasoning from the current turn was dropped. 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.
Because this would continuously drop thinking blocks from subsequent requests, those requests also resulted in cache misses. We believe this is what drove the separate reports of usage limits draining faster than expected.
实现上有一个 bug:它并不是只清理一次思考历史,而是在该会话剩余时间里每一轮都清理。一旦某个会话跨过空闲阈值,此后该进程的每个请求都会告诉 API 只保留最近一个推理块,并丢弃之前所有内容。这个问题还会叠加:如果你在 Claude 执行工具调用的中途发送了一条后续消息,就会在损坏标志下开启新一轮,连当前这一轮的推理也会被丢掉。Claude 会继续执行,但越来越不记得自己当初为什么选择做正在做的事。这就表现为用户报告中的健忘、重复和奇怪的工具选择。
由于这会持续从后续请求中丢弃思考块,这些请求也会缓存未命中。我们认为这正是另一批“用量上限消耗比预期更快”报告的来源。


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, so we didn’t catch it even when testing external builds.
This bug was at the intersection of Claude Code’s context management, the Anthropic API, and extended thinking. The changes it introduced made it past multiple human and automated code reviews, as well as unit tests, end-to-end tests, automated verification, and dogfooding. Combined with this only happening in a corner case (stale sessions) and the difficulty of reproducing the issue, it took us over a week to discover and confirm the root cause.
两个互不相关的实验让我们一开始很难复现该问题:一个仅内部使用的、与消息排队有关的服务端实验;以及一个关于思考展示方式的独立变更,它在大多数 CLI 会话中压住了这个 bug,导致我们即使测试外部构建也没有发现。
这个 bug 正处于 Claude Code 的上下文管理、Anthropic API 和扩展思考的交汇处。它引入的改动通过了多个人工与自动化代码审查,以及单元测试、端到端测试、自动化验证和 dogfooding。再加上它只发生在角落里(过期会话)且难以复现,我们花了一周多时间才发现并确认根因。
As part of the investigation, we back-tested Code Review against the offending pull requests using Opus 4.7. When provided the code repositories necessary to gather complete context, Opus 4.7 found the bug, while Opus 4.6 didn't. To prevent this from happening again, we are now landing support for additional repositories as context for code reviews.
We fixed this bug on April 10 in v2.1.101.
在调查过程中,我们用 Opus 4.7 对有问题的 pull request 回测了 Code Review。在提供了收集完整上下文所需的代码仓库后,Opus 4.7 找到了 bug,而 Opus 4.6 没有。为了防止类似问题再次发生,我们现在正在加入对更多仓库作为代码评审上下文的支持。
我们已于 4 月 10 日在 v2.1.101 中修复了这个 bug。
Our latest model, Claude Opus 4.7, has a notable behavioral quirk relative to its predecessor: as we wrote about at launch, it tends to be quite verbose. This makes it smarter on hard problems, but it also produces more output tokens.
A few weeks before we released Opus 4.7, we started tuning Claude Code in preparation. Each model behaves slightly differently, and we spend time before each release optimizing the harness and product for it.
We have a number of tools to reduce verbosity: model training, prompting, and improving thinking UX in the product. Ultimately we used all of these, but one addition to the system prompt caused an outsized effect on intelligence in Claude Code:
“Length limits: keep text between tool calls to ≤25 words. Keep final responses to ≤100 words unless the task requires more detail.”
我们最新的模型 Claude Opus 4.7 相对前代有一个显著的行为特性:正如我们在发布时写到的,它倾向于相当啰嗦。这让它在难题上更聪明,但也会产生更多输出 token。
在发布 Opus 4.7 的前几周,我们就开始对 Claude Code 进行调优准备。每个模型的行为都略有不同,我们会在每次发布前花时间针对它优化 harness 和产品。
我们有不少降低冗长程度的手段:模型训练、提示词,以及改进产品中的思考体验。最终这些我们都用了,但有一处系统提示词的追加内容对 Claude Code 的智能水平产生了过大影响:
“Length limits: keep text between tool calls to ≤25 words. Keep final responses to ≤100 words unless the task requires more detail.”
After multiple weeks of internal testing and no regressions in the set of evaluations we ran, we felt confident about the change and shipped it alongside Opus 4.7 on April 16.
经过数周内部测试,在我们运行的那组评估中没有出现回退,我们对这一变更感到有信心,于是 4 月 16 日随 Opus 4.7 一起上线。
As part of this investigation, we ran more ablations (removing lines from the system prompt to understand the impact of each line) using a broader set of evaluations. One of these evaluations showed a 3% drop for both Opus 4.6 and 4.7. We immediately reverted the prompt as part of the April 20 release.
在这次调查中,我们使用更广泛的评估集做了更多消融实验(从系统提示词中逐行删除,以理解每一行的影响)。其中一项评估显示 Opus 4.6 和 4.7 都出现了 3% 的下降。我们随 4 月 20 日的发布立即回滚了该提示词。
We are going to do several things differently to avoid these issues: we’ll ensure that a larger share of internal staff use the exact public build of Claude Code (as opposed to the version we use to test new features); and we'll make improvements to our Code Review tool that we use internally, and ship this improved version to customers.
为了避免这些问题,我们接下来会有几项不同的做法:我们会确保更多内部员工使用与公开版本完全一致的 Claude Code 构建(而不是我们用来测试新功能的版本);同时我们会改进内部使用的 Code Review 工具,并把这个改进版交付给客户。
We’re also adding tighter controls on system prompt changes. We will run a broad suite of per-model evals for every system prompt change to Claude Code, continuing ablations to understand the impact of each line, and we have built new tooling to make prompt changes easier to review and audit. We've additionally added guidance to our CLAUDE.md to ensure model-specific changes are gated to the specific model they're targeting. For any change that could trade off against intelligence, we'll add soak periods, a broader eval suite, and gradual rollouts so we catch issues earlier.
我们同时会对系统提示词变更加上更严格的控制。今后 Claude Code 的每一条系统提示词变更,我们都会运行一套广泛的按模型评估,继续用消融实验理解每一行的影响,并且已经构建了新工具,让提示词变更更容易审查与审计。此外,我们在 CLAUDE.md 中增加了指引,确保针对特定模型的变更只作用于目标模型。对于任何可能以智能为代价的变更,我们会增加稳定观察期、更广的评估套件和渐进式发布,以便更早发现问题。
We recently created @ClaudeDevs on X to give us the room to explain product decisions and the reasoning behind them in depth. We'll share the same updates in centralized threads on GitHub.
Finally, we’d like to thank our users: the people who used the /feedback command to share their issues with us (or who posted specific, reproducible examples online) are the ones who ultimately allowed us to identify and fix these problems. Today we are resetting usage limits for all subscribers.
We’re immensely grateful for your feedback and for your patience.
我们最近在 X 上创建了 @ClaudeDevs,以便有空间深入解释产品决策及其背后的理由。我们也会在 GitHub 上的集中讨论串中分享同样的更新。
最后,我们要感谢用户:正是那些使用 /feedback 命令向我们反馈问题的人(或是在网上发布具体、可复现示例的人),最终帮助我们识别并修复了这些问题。今天,我们将重置所有订阅者的用量上限。
我们非常感激你们的反馈和耐心。