errors.md +34 −1
19将您在终端中看到的消息与下面的部分相匹配。19将您在终端中看到的消息与下面的部分相匹配。
20 20
21| 消息 | 部分 |21| 消息 | 部分 |
2222| :----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------- || :-------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------- |
23| `API Error: 500 ... Internal server error` | [服务器错误](#api-error-500-internal-server-error) |23| `API Error: 500 ... Internal server error` | [服务器错误](#api-error-500-internal-server-error) |
24| `API Error: Repeated 529 Overloaded errors` | [服务器错误](#api-error-repeated-529-overloaded-errors) |24| `API Error: Repeated 529 Overloaded errors` | [服务器错误](#api-error-repeated-529-overloaded-errors) |
25| `Request timed out` | [服务器错误](#request-timed-out),或如果消息提到您的互联网连接,则为[网络](#unable-to-connect-to-api) |25| `Request timed out` | [服务器错误](#request-timed-out),或如果消息提到您的互联网连接,则为[网络](#unable-to-connect-to-api) |
50| `thinking.type.enabled is not supported for this model` | [请求错误](#thinking-type-enabled-is-not-supported-for-this-model) |50| `thinking.type.enabled is not supported for this model` | [请求错误](#thinking-type-enabled-is-not-supported-for-this-model) |
51| `max_tokens must be greater than thinking.budget_tokens` | [请求错误](#thinking-budget-exceeds-output-limit) |51| `max_tokens must be greater than thinking.budget_tokens` | [请求错误](#thinking-budget-exceeds-output-limit) |
52| `API Error: 400 due to tool use concurrency issues` | [请求错误](#tool-use-or-thinking-block-mismatch) |52| `API Error: 400 due to tool use concurrency issues` | [请求错误](#tool-use-or-thinking-block-mismatch) |
53| `Claude Code is unable to respond to this request, which appears to violate our Usage Policy` | [请求错误](#usage-policy-refusal) |
53| 响应质量似乎低于平常 | [响应质量](#responses-seem-lower-quality-than-usual) |54| 响应质量似乎低于平常 | [响应质量](#responses-seem-lower-quality-than-usual) |
54 55
55## 自动重试56## 自动重试
283* 之后运行 `/status` 以确认活跃凭证是您的订阅284* 之后运行 `/status` 以确认活跃凭证是您的订阅
284* 如果未设置环境变量且错误仍然存在,则禁用的组织是与您的 `/login` 相关联的组织。联系支持或使用不同的帐户登录。285* 如果未设置环境变量且错误仍然存在,则禁用的组织是与您的 `/login` 相关联的组织。联系支持或使用不同的帐户登录。
285 286
287### Your organization has disabled Claude subscription access
288
289您的 Claude 组织不允许使用订阅登录登录到 Claude Code。使用同一帐户再次运行 `/login` 会返回相同的错误。
290
291```text theme={null}
292Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access
293```
294
295这是一个服务器端组织设置,因此无法从本地设置、环境变量或 CLI 标志覆盖。Agent SDK 和 `-p` 非交互模式将其显示为 `oauth_org_not_allowed` 错误代码。
296
297**要做什么:**
298
299* 要求您的管理员为您的组织启用 Claude Code 访问权限
300* 改用 Console API 密钥进行身份验证,而不是您的订阅。有关设置,请参阅 [Claude Console 身份验证](/zh-CN/authentication#claude-console-authentication)。
301* 如果您是管理员且看不到启用访问权限的选项,请联系 [Anthropic 支持](https://support.claude.com)
302
286### Routines are disabled by your organization's policy303### Routines are disabled by your organization's policy
287 304
288您的团队或企业管理员已在组织级别关闭了例程。当您尝试创建或运行例程时会出现该错误,包括从 `/schedule` 和 claude.ai/code 上的 [Routines](/zh-CN/routines) UI。305您的团队或企业管理员已在组织级别关闭了例程。当您尝试创建或运行例程时会出现该错误,包括从 `/schedule` 和 claude.ai/code 上的 [Routines](/zh-CN/routines) UI。
573 590
574* 运行 `/rewind`,或按 Esc 两次,回退到损坏轮次之前的检查点并从那里继续。有关如何创建和恢复检查点的信息,请参阅[检查点](/zh-CN/checkpointing)。591* 运行 `/rewind`,或按 Esc 两次,回退到损坏轮次之前的检查点并从那里继续。有关如何创建和恢复检查点的信息,请参阅[检查点](/zh-CN/checkpointing)。
575 592
593### Usage Policy refusal
594
595API 拒绝响应,因为对话中的内容触发了[使用政策](https://www.anthropic.com/legal/aup)检查。该消息包含一个请求 ID,如果您认为拒绝不正确,可以向支持部门引用。
596
597```text theme={null}
598API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
599```
600
601该检查评估整个对话,而不仅仅是您的最新提示,因此在同一会话中发送新消息通常会重新触发相同的拒绝。使用 `--continue` 或 `--resume` 退出并重新打开会话后也是如此,因为磁盘上的记录仍然包含触发内容。
602
603**要做什么:**
604
605* 按 Esc 两次或运行 `/rewind` 以回退到触发拒绝的轮次之前的检查点,然后重新表述或采取不同的方法。有关检查点的信息,请参阅[检查点](/zh-CN/checkpointing)。
606* 如果您无法识别哪个轮次导致了它,请运行 `/clear` 以在同一项目中启动新的对话。您之前的对话已保存在磁盘上,并且在 `/resume` 中仍然可用。
607* 在[非交互模式](/zh-CN/headless)(`-p`)中,其中 rewind 不可用,使用重新表述的提示重试或启动新会话而不使用 `--continue`。
608
576## 响应质量似乎低于平常609## 响应质量似乎低于平常
577 610
578如果 Claude 的答案似乎不如您期望的那样有能力,但没有显示错误,原因通常是对话状态而不是模型本身。Claude Code 不会默默更改模型版本。它可以在特定情况下切换到后备模型,例如达到 Opus 配额或 Bedrock 或 Vertex AI 区域缺少您的模型;下面的模型选择检查会捕获两者,[模型配置](/zh-CN/model-config)解释了何时应用后备。611如果 Claude 的答案似乎不如您期望的那样有能力,但没有显示错误,原因通常是对话状态而不是模型本身。Claude Code 不会默默更改模型版本。它可以在特定情况下切换到后备模型,例如达到 Opus 配额或 Bedrock 或 Vertex AI 区域缺少您的模型;下面的模型选择检查会捕获两者,[模型配置](/zh-CN/model-config)解释了何时应用后备。