83| `Your account does not have access to Claude. Please login again or contact your administrator.` | [身分驗證](#oauth-token-revoked-or-expired) |83| `Your account does not have access to Claude. Please login again or contact your administrator.` | [身分驗證](#oauth-token-revoked-or-expired) |
84| `API Error: 401 Invalid authentication credentials` | [身分驗證](#api-error-401-invalid-authentication-credentials) |84| `API Error: 401 Invalid authentication credentials` | [身分驗證](#api-error-401-invalid-authentication-credentials) |
85| `Login expired · Please run /login` | [身分驗證](#login-expired) |85| `Login expired · Please run /login` | [身分驗證](#login-expired) |
86| `The browser can't return the sign-in to Claude Code automatically` | [身分驗證](#couldnt-start-the-local-sign-in-listener) |
87| `Couldn't start the local listener that receives the browser sign-in. Try again.` | [身分驗證](#couldnt-start-the-local-sign-in-listener) |
86| `Failed to start OAuth callback server` | [身分驗證](#failed-to-start-oauth-callback-server) |88| `Failed to start OAuth callback server` | [身分驗證](#failed-to-start-oauth-callback-server) |
87| `Claude login not accepted · Run /login, then try again` | [身分驗證](#claude-login-not-accepted) |89| `Claude login not accepted · Run /login, then try again` | [身分驗證](#claude-login-not-accepted) |
88| `Artifacts need a claude.ai login` | [身分驗證](#artifacts-need-a-claude-ai-login) |90| `Artifacts need a claude.ai login` | [身分驗證](#artifacts-need-a-claude-ai-login) |
100| `claude.ai rejected the session token` / `session token rejected` | [身分驗證](#claude-ai-rejected-the-session-token) |102| `claude.ai rejected the session token` / `session token rejected` | [身分驗證](#claude-ai-rejected-the-session-token) |
101| `MCP server "<name>" needs you to sign in again (run /mcp to re-authenticate)` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |103| `MCP server "<name>" needs you to sign in again (run /mcp to re-authenticate)` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |
102| `rejected the credential from its headersHelper` / `rejected the Authorization header in its config` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |104| `rejected the credential from its headersHelper` / `rejected the Authorization header in its config` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |
105| `(check the helper, then start a new task or chat)` / `(update it, then start a new task or chat)` | [身分驗證](#mcp-credential-rejected-in-cowork) |
103| `MCP server "<name>" needs additional permissions (scope: "<scope>") — run /mcp to re-authenticate` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |106| `MCP server "<name>" needs additional permissions (scope: "<scope>") — run /mcp to re-authenticate` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |
104| `MCP server "<name>" requires re-authorization (token expired)` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |107| `MCP server "<name>" requires re-authorization (token expired)` | [身分驗證](#mcp-server-needs-you-to-sign-in-again) |
105| `This server's URL is missing or not a valid URL, so sign-in can't start` | [身分驗證](#mcp-server-url-is-missing-or-not-a-valid-url) |108| `This server's URL is missing or not a valid URL, so sign-in can't start` | [身分驗證](#mcp-server-url-is-missing-or-not-a-valid-url) |
200| `Installation was killed before it could finish (exit code 137)` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#installation-was-killed-before-it-could-finish) |203| `Installation was killed before it could finish (exit code 137)` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#installation-was-killed-before-it-could-finish) |
201| `The connection dropped while downloading the update` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |204| `The connection dropped while downloading the update` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |
202| `Download timed out: exceeded the total deadline` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |205| `Download timed out: exceeded the total deadline` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |
206| `Release verification failed for Claude Code <version> (<reason>). The update was not installed.` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#release-verification-failed) |
207| `Auto-update failed · Run claude doctor` | [疑難排解安裝和登入](/docs/zh-TW/troubleshoot-install#auto-update-failed) |
203| `--bg and --print conflict` | [命令列錯誤](#conflict-between-bg-and-print) |208| `--bg and --print conflict` | [命令列錯誤](#conflict-between-bg-and-print) |
204| `Couldn't tell whether --bg is a flag or text here, so nothing was started` | [命令列錯誤](#couldnt-tell-whether-bg-is-a-flag-or-text) |209| `Couldn't tell whether --bg is a flag or text here, so nothing was started` | [命令列錯誤](#couldnt-tell-whether-bg-is-a-flag-or-text) |
205| `Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.` | [命令列錯誤](#conflict-between-a-system-prompt-flag-and-its-file-form) |210| `Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.` | [命令列錯誤](#conflict-between-a-system-prompt-flag-and-its-file-form) |
270| `Custom output styles can't be selected over Remote Control or from a relayed message` | [命令列錯誤](#custom-output-styles-cant-be-selected-over-remote-control) |275| `Custom output styles can't be selected over Remote Control or from a relayed message` | [命令列錯誤](#custom-output-styles-cant-be-selected-over-remote-control) |
271| `Output styles are saved to local settings (.claude/settings.local.json), which this session doesn't load` | [命令列錯誤](#output-styles-are-saved-to-local-settings-which-this-session-doesnt-load) |276| `Output styles are saved to local settings (.claude/settings.local.json), which this session doesn't load` | [命令列錯誤](#output-styles-are-saved-to-local-settings-which-this-session-doesnt-load) |
272| `/recap only runs when you ask for it yourself in this session` | [命令列錯誤](#recap-only-runs-when-you-ask-for-it-yourself) |277| `/recap only runs when you ask for it yourself in this session` | [命令列錯誤](#recap-only-runs-when-you-ask-for-it-yourself) |
278| `/feedback is disabled by your organization's policy`,或 `/bug` 或 `/share` 的相同訊息 | [命令列錯誤](#feedback-is-disabled-by-your-organizations-policy) |
273| `` `plugin eval` is currently in early access `` / `` `plugin eval` is currently unavailable `` | [外掛錯誤](#plugin-eval-is-currently-in-early-access) |279| `` `plugin eval` is currently in early access `` / `` `plugin eval` is currently unavailable `` | [外掛錯誤](#plugin-eval-is-currently-in-early-access) |
274| `cannot be evaluated where sessions load it` | [使用 evals 測試外掛](/docs/zh-TW/plugin-evals#cannot-be-evaluated-where-sessions-load-it) |280| `cannot be evaluated where sessions load it` | [使用 evals 測試外掛](/docs/zh-TW/plugin-evals#cannot-be-evaluated-where-sessions-load-it) |
275| `Marketplace "<name>" is registered from an untrusted source` | [外掛錯誤](#marketplace-is-registered-from-an-untrusted-source) |281| `Marketplace "<name>" is registered from an untrusted source` | [外掛錯誤](#marketplace-is-registered-from-an-untrusted-source) |
289| `The packages it lists are not installed` / `The packages it lists were not installed, because` | [外掛疑難排解](/docs/zh-TW/plugins/troubleshooting#the-packages-it-lists-are-not-installed) |295| `The packages it lists are not installed` / `The packages it lists were not installed, because` | [外掛疑難排解](/docs/zh-TW/plugins/troubleshooting#the-packages-it-lists-are-not-installed) |
290| `does not load (...), so Claude Code ignores the whole file` | [外掛疑難排解](/docs/zh-TW/plugins/troubleshooting#does-not-load-so-claude-code-ignores-the-whole-file) |296| `does not load (...), so Claude Code ignores the whole file` | [外掛疑難排解](/docs/zh-TW/plugins/troubleshooting#does-not-load-so-claude-code-ignores-the-whole-file) |
291| `path escapes plugin directory` | [外掛錯誤](#path-escapes-plugin-directory) |297| `path escapes plugin directory` | [外掛錯誤](#path-escapes-plugin-directory) |
298| `Plugin not loaded: its manifest <path> was not read` | [外掛錯誤](#plugin-not-loaded-its-manifest-was-not-read) |
292| `path could not be checked` | [外掛錯誤](#path-could-not-be-checked) |299| `path could not be checked` | [外掛錯誤](#path-could-not-be-checked) |
293| `its marketplace entry path does not stay inside the marketplace directory` | [外掛錯誤](#marketplace-entry-path-does-not-stay-inside-the-marketplace-directory) |300| `its marketplace entry path does not stay inside the marketplace directory` | [外掛錯誤](#marketplace-entry-path-does-not-stay-inside-the-marketplace-directory) |
294| `Plugin source path refused` | [外掛錯誤](#marketplace-entry-path-does-not-stay-inside-the-marketplace-directory) |301| `Plugin source path refused` | [外掛錯誤](#marketplace-entry-path-does-not-stay-inside-the-marketplace-directory) |
304| `File is covered by a Read deny rule in your permission settings` | [工具錯誤](#file-is-covered-by-a-read-deny-rule) |311| `File is covered by a Read deny rule in your permission settings` | [工具錯誤](#file-is-covered-by-a-read-deny-rule) |
305| `cannot contain null bytes (\0)` | [工具錯誤](#path-cannot-contain-null-bytes) |312| `cannot contain null bytes (\0)` | [工具錯誤](#path-cannot-contain-null-bytes) |
306| `Path contains null bytes` | [工具錯誤](#path-cannot-contain-null-bytes) |313| `Path contains null bytes` | [工具錯誤](#path-cannot-contain-null-bytes) |
314| `File is too large to read as an image (the limit is 128MB)` | [工具錯誤](#file-is-too-large-to-read-as-an-image) |
315| `Cannot read this as an image: <path> is a pipe or a device` | [工具錯誤](#file-is-too-large-to-read-as-an-image) |
307| `subagent_type is required: the general-purpose agent is not available in this session` | [工具錯誤](#subagent-type-is-required) |316| `subagent_type is required: the general-purpose agent is not available in this session` | [工具錯誤](#subagent-type-is-required) |
308| `Error: this write left the memory index at MEMORY.md at ..., over its ... read limit` | [工具錯誤](#memory-index-is-over-its-read-limit) |317| `Error: this write left the memory index at MEMORY.md at ..., over its ... read limit` | [工具錯誤](#memory-index-is-over-its-read-limit) |
309| `pkill: refusing to run` | [工具錯誤](#pkill-pattern-matches-the-claude-code-process) |318| `pkill: refusing to run` | [工具錯誤](#pkill-pattern-matches-the-claude-code-process) |
310| `Failed to write to <name>'s inbox — nothing was sent` | [工具錯誤](#failed-to-write-to-a-teammate-inbox) |319| `Failed to write to <name>'s inbox — nothing was sent` | [工具錯誤](#failed-to-write-to-a-teammate-inbox) |
311| `Failed to write the plan approval request to the lead's inbox — plan not submitted` | [工具錯誤](#failed-to-write-to-a-teammate-inbox) |320| `Failed to write the plan approval request to the lead's inbox — plan not submitted` | [工具錯誤](#failed-to-write-to-a-teammate-inbox) |
312| `Its agent definition was not restored: the folder its definition file came from is not trusted` | [工具錯誤](#teammate-agent-definition-not-restored) |321| `Its agent definition was not restored: the folder its definition file came from is not trusted` | [工具錯誤](#teammate-agent-definition-not-restored) |
322| `Only a teammate can approve a shutdown request` | [工具錯誤](#only-a-teammate-can-approve-a-shutdown-request) |
313| `Message too large for cross-session delivery` | [工具錯誤](#message-too-large-for-cross-session-delivery) |323| `Message too large for cross-session delivery` | [工具錯誤](#message-too-large-for-cross-session-delivery) |
314| `Too many messages to this session just now` | [工具錯誤](#too-many-messages-to-this-session-just-now) |324| `Too many messages to this session just now` | [工具錯誤](#too-many-messages-to-this-session-just-now) |
315| `Cross-session message was dropped at the recipient session's inbox` | [工具錯誤](#cross-session-message-dropped-at-the-inbox) |325| `Cross-session message was dropped at the recipient session's inbox` | [工具錯誤](#cross-session-message-dropped-at-the-inbox) |
325| `Your disk quota is full on the filesystem with Claude Code's temp directory <dir> (EDQUOT)` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |335| `Your disk quota is full on the filesystem with Claude Code's temp directory <dir> (EDQUOT)` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |
326| `The filesystem with Claude Code's temp directory <dir>, or your disk quota on it, is full (ENOSPC)` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |336| `The filesystem with Claude Code's temp directory <dir>, or your disk quota on it, is full (ENOSPC)` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |
327| `Command output was lost: the temp filesystem at <dir> is full` / `is out of inodes` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |337| `Command output was lost: the temp filesystem at <dir> is full` / `is out of inodes` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |
338| `The command was not started: this computer's disk is full (ENOSPC)` / `(EDQUOT)` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |
328| `File is not valid UTF-8. It may use a legacy encoding such as Windows-1252, Shift-JIS or GBK, or be binary` | [工具錯誤](#file-is-not-valid-utf-8) |339| `File is not valid UTF-8. It may use a legacy encoding such as Windows-1252, Shift-JIS or GBK, or be binary` | [工具錯誤](#file-is-not-valid-utf-8) |
329| `the source file is not valid UTF-8 text` / `the source file is not valid UTF-16 text` | [工具錯誤](#the-source-file-is-not-valid-utf-8-text) |340| `the source file is not valid UTF-8 text` / `the source file is not valid UTF-16 text` | [工具錯誤](#the-source-file-is-not-valid-utf-8-text) |
330| `the source file has the replacement character U+FFFD` | [工具錯誤](#the-source-file-is-not-valid-utf-8-text) |341| `the source file has the replacement character U+FFFD` | [工具錯誤](#the-source-file-is-not-valid-utf-8-text) |
331| `Not published: that file is on a network share` | [工具錯誤](#not-published-that-file-is-on-a-network-share) |342| `Not published: that file is on a network share` | [工具錯誤](#not-published-that-file-is-on-a-network-share) |
343| `Not published: Claude sent the same content again after a newer version of the artifact turned it away` / `Not published: Claude sent its changes again over the same file after a newer version of the artifact turned them away` | [工具錯誤](#not-published-a-newer-version-of-the-artifact-turned-it-away) |
332| `Reading a local file from outside this session's connected folders, or through a link, needs the approval card` | [工具錯誤](#reading-a-local-file-from-outside-the-connected-folders) |344| `Reading a local file from outside this session's connected folders, or through a link, needs the approval card` | [工具錯誤](#reading-a-local-file-from-outside-the-connected-folders) |
333| `cannot read file_path (...) — the file could not be examined, and no one can answer the approval card` | [工具錯誤](#reading-a-local-file-from-outside-the-connected-folders) |345| `cannot read file_path (...) — the file could not be examined, and no one can answer the approval card` | [工具錯誤](#reading-a-local-file-from-outside-the-connected-folders) |
334| `WebFetch cannot fetch localhost or other hostnames without a dot` | [工具錯誤](#webfetch-cannot-fetch-localhost) |346| `WebFetch cannot fetch localhost or other hostnames without a dot` | [工具錯誤](#webfetch-cannot-fetch-localhost) |
345| `Can't open — this session is running in another terminal` | [背景工作階段錯誤](#this-session-is-running-in-another-terminal) |357| `Can't open — this session is running in another terminal` | [背景工作階段錯誤](#this-session-is-running-in-another-terminal) |
346| `This conversation is already open in another running Claude session` | [背景工作階段錯誤](#this-session-is-running-in-another-terminal) |358| `This conversation is already open in another running Claude session` | [背景工作階段錯誤](#this-session-is-running-in-another-terminal) |
347| `This session's saved conversation is no longer on disk` | [背景工作階段錯誤](#this-sessions-saved-conversation-is-no-longer-on-disk) |359| `This session's saved conversation is no longer on disk` | [背景工作階段錯誤](#this-sessions-saved-conversation-is-no-longer-on-disk) |
348| `Bypass permissions was requested at launch and ignored` | [使用 bypassPermissions 模式略過所有檢查](/docs/zh-TW/permission-modes#bypass-permissions-acceptance) |360| `Bypass permissions was requested at launch and ignored` | [在背景工作階段中 Bypass permissions 遭到忽略](/docs/zh-TW/permission-modes#bypass-permissions-ignored-in-a-background-session) |
349| `kept <id> — its worktree is still at <path>` | [背景工作階段錯誤](#worktree-has-commits-that-are-not-pushed-anywhere) |361| `kept <id> — its worktree is still at <path>` | [背景工作階段錯誤](#worktree-has-commits-that-are-not-pushed-anywhere) |
350| `kept <id> — <n> unpushed commits on <branch>` | [背景工作階段錯誤](#worktree-has-commits-that-are-not-pushed-anywhere) |362| `kept <id> — <n> unpushed commits on <branch>` | [背景工作階段錯誤](#worktree-has-commits-that-are-not-pushed-anywhere) |
351| `kept <id> — worktree has commits that are not pushed anywhere` | [背景工作階段錯誤](#worktree-has-commits-that-are-not-pushed-anywhere) |363| `kept <id> — worktree has commits that are not pushed anywhere` | [背景工作階段錯誤](#worktree-has-commits-that-are-not-pushed-anywhere) |
354| `Session <id> was stopped while the respawn was in flight` | [背景工作階段錯誤](#session-was-stopped-while-the-respawn-was-in-flight) |366| `Session <id> was stopped while the respawn was in flight` | [背景工作階段錯誤](#session-was-stopped-while-the-respawn-was-in-flight) |
355| `This session was running agent '<name>', which is no longer available` | [背景工作階段錯誤](#session-agent-no-longer-available) |367| `This session was running agent '<name>', which is no longer available` | [背景工作階段錯誤](#session-agent-no-longer-available) |
356| `This session restarted <time> after its next /loop wakeup was due, so that wakeup will not fire` | [背景工作階段錯誤](#restarted-after-its-next-loop-wakeup-was-due) |368| `This session restarted <time> after its next /loop wakeup was due, so that wakeup will not fire` | [背景工作階段錯誤](#restarted-after-its-next-loop-wakeup-was-due) |
369| `No LLM gateway: a gateway set in your shell isn't passed to a session opened from another folder` | [背景工作階段錯誤](#no-llm-gateway-opened-from-another-folder) |
370| `No LLM gateway: opened from another folder · respawn from <folder>` | [背景工作階段錯誤](#no-llm-gateway-opened-from-another-folder) |
357| `CLAUDE_CODE_PROCESS_WRAPPER: launcher ...` | [背景工作階段錯誤](#claude_code_process_wrapper-launcher-errors) |371| `CLAUDE_CODE_PROCESS_WRAPPER: launcher ...` | [背景工作階段錯誤](#claude_code_process_wrapper-launcher-errors) |
358| `EUNKNOWN: unknown error, uv_spawn` | [背景工作階段錯誤](#eunknown-when-starting-a-background-session) |372| `EUNKNOWN: unknown error, uv_spawn` | [背景工作階段錯誤](#eunknown-when-starting-a-background-session) |
359| `EACCES: permission denied, posix_spawn` | [背景工作階段錯誤](#eacces-when-starting-a-background-session) |373| `EACCES: permission denied, posix_spawn` | [背景工作階段錯誤](#eacces-when-starting-a-background-session) |
394| `API Error: ANTHROPIC_FOUNDRY_RESOURCE must be a Foundry resource name` | [設定警告](#anthropic-foundry-resource-must-be-a-foundry-resource-name) |408| `API Error: ANTHROPIC_FOUNDRY_RESOURCE must be a Foundry resource name` | [設定警告](#anthropic-foundry-resource-must-be-a-foundry-resource-name) |
395| `headersHelper not run — this workspace has no persisted trust` | [設定警告](#headershelper-not-run) |409| `headersHelper not run — this workspace has no persisted trust` | [設定警告](#headershelper-not-run) |
396| `Invalid permission rule "..." was skipped: Malformed Tool(content) rule` | [設定警告](#malformed-tool-content-rule) |410| `Invalid permission rule "..." was skipped: Malformed Tool(content) rule` | [設定警告](#malformed-tool-content-rule) |
411| `matches no tool · check for typos` / `matches no known tool — check for typos` | [設定警告](#matches-no-tool) |
397| `... is not matched by file permission checks` | [設定警告](#is-not-matched-by-file-permission-checks) |412| `... is not matched by file permission checks` | [設定警告](#is-not-matched-by-file-permission-checks) |
413| `Write(<path>) never matches · use Edit(<path>)` / `Glob(<path>) never matches · use Read(<path>)` | [設定警告](#is-not-matched-by-file-permission-checks) |
398| `... has a wildcard before the rest of the command` | [設定警告](#has-a-wildcard-before-the-rest-of-the-command) |414| `... has a wildcard before the rest of the command` | [設定警告](#has-a-wildcard-before-the-rest-of-the-command) |
415| `allows any option at its * · use an exact value` | [設定警告](#has-a-wildcard-before-the-rest-of-the-command) |
399| `Denying Bash also turns off the PowerShell tool, so Claude has neither` | [設定警告](#denying-bash-also-turns-off-the-powershell-tool) |416| `Denying Bash also turns off the PowerShell tool, so Claude has neither` | [設定警告](#denying-bash-also-turns-off-the-powershell-tool) |
400| `CLAUDE_CODE_DISABLE_1M_CONTEXT is set, but the 200K limit isn't enforced` | [設定警告](#the-200k-limit-isnt-enforced) |417| `CLAUDE_CODE_DISABLE_1M_CONTEXT is set, but the 200K limit isn't enforced` | [設定警告](#the-200k-limit-isnt-enforced) |
418| `CLAUDE_CODE_AUTO_COMPACT_WINDOW="<value>" reads as <N> tokens, so Claude Code treats it as the 100k minimum` | [`CLAUDE_CODE_AUTO_COMPACT_WINDOW` 的值與警告](/docs/zh-TW/model-config#claude_code_auto_compact_window-values) |
419| `CLAUDE_CODE_AUTO_COMPACT_WINDOW="<value>" is too large, so Claude Code treats it as the 1M maximum` | [`CLAUDE_CODE_AUTO_COMPACT_WINDOW` 的值與警告](/docs/zh-TW/model-config#claude_code_auto_compact_window-values) |
420| `CLAUDE_CODE_AUTO_COMPACT_WINDOW="<value>" isn't a usable size, so Claude Code ignores it` | [`CLAUDE_CODE_AUTO_COMPACT_WINDOW` 的值與警告](/docs/zh-TW/model-config#claude_code_auto_compact_window-values) |
401| `Model "<model>" isn't recognized · context assumed to be 200k tokens` | [修正閘道或自訂模型 ID 的上下文視窗](/docs/zh-TW/model-config#correct-the-window-for-a-gateway-or-custom-model-id) |421| `Model "<model>" isn't recognized · context assumed to be 200k tokens` | [修正閘道或自訂模型 ID 的上下文視窗](/docs/zh-TW/model-config#correct-the-window-for-a-gateway-or-custom-model-id) |
402| `Claude Code doesn't recognize the model "<model>", so it assumes a context window of 200k tokens` | [修正閘道或自訂模型 ID 的上下文視窗](/docs/zh-TW/model-config#correct-the-window-for-a-gateway-or-custom-model-id) |422| `Claude Code doesn't recognize the model "<model>", so it assumes a context window of 200k tokens` | [修正閘道或自訂模型 ID 的上下文視窗](/docs/zh-TW/model-config#correct-the-window-for-a-gateway-or-custom-model-id) |
403| `[claude-code:unrecognized_model]` | [設定警告](#unrecognized-model-id-on-a-request) |423| `[claude-code:unrecognized_model]` | [設定警告](#unrecognized-model-id-on-a-request) |
462| [`CLAUDE_CODE_MAX_RETRIES`](/docs/zh-TW/env-vars) | 10 | 重試嘗試次數。從 v2.1.186 開始上限為 15;從 v2.1.199 開始 `CLAUDE_CODE_RETRY_WATCHDOG` 會提高預設值並移除上限。降低它以在指令碼中更快地顯示故障。 |482| [`CLAUDE_CODE_MAX_RETRIES`](/docs/zh-TW/env-vars) | 10 | 重試嘗試次數。從 v2.1.186 開始上限為 15;從 v2.1.199 開始 `CLAUDE_CODE_RETRY_WATCHDOG` 會提高預設值並移除上限。降低它以在指令碼中更快地顯示故障。 |
463| [`CLAUDE_CODE_RETRY_WATCHDOG`](/docs/zh-TW/env-vars) | 未設定 | 在無人值守的工作階段(例如 CI 工作)中設定為 `1`,以無限期重試 `429` 和 `529` 容量錯誤,而不是在 `CLAUDE_CODE_MAX_RETRIES` 次嘗試後失敗。當標準速度的請求收到報告支出限制或用量點數耗盡的 `429` 時,Claude Code 會立即失敗,即使該 `429` 來自按排程重設的 [gateway spend cap](#spend-limit-reached)。在 v2.1.239 之前,看門狗會無限期重試這些錯誤。如需快速模式請求,請參閱 [Handle rate limits](/docs/zh-TW/fast-mode#handle-rate-limits)。在 v2.1.199 或更新版本上,它也會將其他暫時性錯誤(例如伺服器錯誤、逾時和連線中斷)的預設重試次數提高至 300,大約三小時的退避,並在您明確設定 `CLAUDE_CODE_MAX_RETRIES` 時移除其上限 15。 |483| [`CLAUDE_CODE_RETRY_WATCHDOG`](/docs/zh-TW/env-vars) | 未設定 | 在無人值守的工作階段(例如 CI 工作)中設定為 `1`,以無限期重試 `429` 和 `529` 容量錯誤,而不是在 `CLAUDE_CODE_MAX_RETRIES` 次嘗試後失敗。當標準速度的請求收到報告支出限制或用量點數耗盡的 `429` 時,Claude Code 會立即失敗,即使該 `429` 來自按排程重設的 [gateway spend cap](#spend-limit-reached)。在 v2.1.239 之前,看門狗會無限期重試這些錯誤。如需快速模式請求,請參閱 [Handle rate limits](/docs/zh-TW/fast-mode#handle-rate-limits)。在 v2.1.199 或更新版本上,它也會將其他暫時性錯誤(例如伺服器錯誤、逾時和連線中斷)的預設重試次數提高至 300,大約三小時的退避,並在您明確設定 `CLAUDE_CODE_MAX_RETRIES` 時移除其上限 15。 |
464| [`CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`](/docs/zh-TW/env-vars) | 未設定 | 設定 `CLAUDE_CODE_RETRY_WATCHDOG` 時,每個 API 請求等待 `429` 和 `529` 錯誤所花費的最長時間(毫秒)。未設定時,等待時間沒有限制。需要 Claude Code v2.1.295 或更新版本。 |484| [`CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`](/docs/zh-TW/env-vars) | 未設定 | 設定 `CLAUDE_CODE_RETRY_WATCHDOG` 時,每個 API 請求等待 `429` 和 `529` 錯誤所花費的最長時間(毫秒)。未設定時,等待時間沒有限制。需要 Claude Code v2.1.295 或更新版本。 |
485| [`CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS`](/docs/zh-TW/env-vars) | 未設定 | 設定 `CLAUDE_CODE_RETRY_WATCHDOG` 時,在請求等待[用量上限](#youve-hit-your-session-limit)重設期間,檢查該上限是否已解除的最短間隔(毫秒)。當檢查發現上限已解除時,請求會立即送出。請提供 `60000` 到 `10800000` 之間的純數字。未設定或超出該範圍時,不會進行任何檢查。關於 Claude Code 何時略過這些檢查,請參閱[環境變數參考](/docs/zh-TW/env-vars)。需要 Claude Code v2.1.305 或更新版本。 |
465| [`CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS`](/docs/zh-TW/env-vars) | 500 | API 以 `529` 過載錯誤拒絕的請求,其重試之間退避的起始延遲(毫秒)。當 API 容量已滿時,可提高此值(最高 32000),以將重試分散在較長的時間範圍內。當 `CLAUDE_CODE_RETRY_WATCHDOG` 設定為 `1`,或被拒絕的請求是以[快速模式](/docs/zh-TW/fast-mode#handle-rate-limits)發送時,此設定無效。需要 Claude Code v2.1.292 或更新版本。 |486| [`CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS`](/docs/zh-TW/env-vars) | 500 | API 以 `529` 過載錯誤拒絕的請求,其重試之間退避的起始延遲(毫秒)。當 API 容量已滿時,可提高此值(最高 32000),以將重試分散在較長的時間範圍內。當 `CLAUDE_CODE_RETRY_WATCHDOG` 設定為 `1`,或被拒絕的請求是以[快速模式](/docs/zh-TW/fast-mode#handle-rate-limits)發送時,此設定無效。需要 Claude Code v2.1.292 或更新版本。 |
466| [`CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS`](/docs/zh-TW/env-vars) | 32000 | API 以 `529` 過載錯誤拒絕的請求,其重試之間退避的上限(毫秒)。當 API 容量已滿時,可提高此值(最高 64000),讓後續的重試間隔持續拉長。當 `CLAUDE_CODE_RETRY_WATCHDOG` 設定為 `1`,或被拒絕的請求是以[快速模式](/docs/zh-TW/fast-mode#handle-rate-limits)發送時,此設定無效。需要 Claude Code v2.1.296 或更新版本。 |487| [`CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS`](/docs/zh-TW/env-vars) | 32000 | API 以 `529` 過載錯誤拒絕的請求,其重試之間退避的上限(毫秒)。當 API 容量已滿時,可提高此值(最高 64000),讓後續的重試間隔持續拉長。當 `CLAUDE_CODE_RETRY_WATCHDOG` 設定為 `1`,或被拒絕的請求是以[快速模式](/docs/zh-TW/fast-mode#handle-rate-limits)發送時,此設定無效。需要 Claude Code v2.1.296 或更新版本。 |
467| [`API_TIMEOUT_MS`](/docs/zh-TW/env-vars) | 600000 | 每次請求嘗試接收其回應標頭的可用時間(毫秒)。它不會限制串流回應在此之後持續執行的時間。在慢速網路或代理伺服器上請提高此值。關於它如何限制首位元組截止時間,請參閱 [No response from API](#no-response-from-api)。 |488| [`API_TIMEOUT_MS`](/docs/zh-TW/env-vars) | 600000 | 每次請求嘗試接收其回應標頭的可用時間(毫秒)。它不會限制串流回應在此之後持續執行的時間。在慢速網路或代理伺服器上請提高此值。關於它如何限制首位元組截止時間,請參閱 [No response from API](#no-response-from-api)。 |
490 511
491* 檢查 [status.claude.com](https://status.claude.com) 或訊息中指明的提供者狀態頁面,查看是否有活躍的事件512* 檢查 [status.claude.com](https://status.claude.com) 或訊息中指明的提供者狀態頁面,查看是否有活躍的事件
492* 等待一分鐘,然後再次傳送您的訊息。您的原始訊息仍在對話中,因此對於較長的提示詞,您可以輸入 `try again` 而不是貼上整個內容。513* 等待一分鐘,然後再次傳送您的訊息。您的原始訊息仍在對話中,因此對於較長的提示詞,您可以輸入 `try again` 而不是貼上整個內容。
514* 如果 [`ANTHROPIC_BASE_URL`](/docs/zh-TW/env-vars) 指向 [LLM 閘道](/docs/zh-TW/llm-gateway),且每個請求都以此方式失敗,請檢查您的閘道是否拒絕了 Claude Code 預設傳送的工具搜尋欄位。若要檢查,請依照[透過 LLM 閘道使用工具搜尋](/docs/zh-TW/mcp#tool-search-through-a-gateway)中的說明設定 `ENABLE_TOOL_SEARCH=false`,然後再試一次。在 v2.1.304 之前,除非您使用 `ENABLE_TOOL_SEARCH` 將其開啟,否則在閘道後方工具搜尋是關閉的。
493* 如果錯誤持續存在且沒有發佈的事件,請執行 `/feedback`,以便 Anthropic 可以使用您的請求詳細資訊進行調查。如果您的環境中無法使用 `/feedback`,請參閱[報告錯誤](#report-an-error)。515* 如果錯誤持續存在且沒有發佈的事件,請執行 `/feedback`,以便 Anthropic 可以使用您的請求詳細資訊進行調查。如果您的環境中無法使用 `/feedback`,請參閱[報告錯誤](#report-an-error)。
494 516
495### API Error: Repeated 529 Overloaded errors517### API Error: Repeated 529 Overloaded errors
520Request timed out542Request timed out
521```543```
522 544
523預設請求逾時為 10 分鐘。545預設請求逾時為 10 分鐘。如果您將 [`API_TIMEOUT_MS`](/docs/zh-TW/env-vars) 設定為 `0`,此請求逾時會關閉。設定 `0` 時,[第一個位元組的截止時間](#no-response-from-api)和正文閒置逾時不會關閉,因此串流請求仍會受到[適用於您連線的那些限制](/docs/zh-TW/network-config#streaming-idle-watchdogs)約束。非串流嘗試在本機工作階段中會保留其 300 秒的限制,仍可能以此訊息結束。
524 546
525**該怎麼做:**547**該怎麼做:**
526 548
549* 如果每個請求都以此訊息失敗,且您將 `API_TIMEOUT_MS` 設定為 `0`,請檢查 `claude --version`。若版本早於 v2.1.305,請更新 Claude Code 或設定正值。
527* 重試請求550* 重試請求
528* 如果緩慢的網路或代理伺服器是原因,請按照[自動重試](#automatic-retries)中的說明提高 `API_TIMEOUT_MS`551* 如果緩慢的網路或代理伺服器是原因,請按照[自動重試](#automatic-retries)中的說明提高 `API_TIMEOUT_MS`
529* 如果逾時頻繁且您的網路在其他方面狀況良好,請參閱下面的[網路和連線錯誤](#network-and-connection-errors)552* 如果逾時頻繁且您的網路在其他方面狀況良好,請參閱下面的[網路和連線錯誤](#network-and-connection-errors)
541* **第一次嘗試**:當您將其設定為 1 或更多時,[`CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`](/docs/zh-TW/env-vars),限制在 10 秒到 30 分鐘之間。否則 Claude Code 會使用[串流空閒監視程式](/docs/zh-TW/network-config#streaming-idle-watchdogs)中列出的位元組級監視程式逾時,因此改變該逾時的變數也會改變此等待。無論哪種方式,Claude Code 都會為請求正文的每 32KB 添加一秒。564* **第一次嘗試**:當您將其設定為 1 或更多時,[`CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`](/docs/zh-TW/env-vars),限制在 10 秒到 30 分鐘之間。否則 Claude Code 會使用[串流空閒監視程式](/docs/zh-TW/network-config#streaming-idle-watchdogs)中列出的位元組級監視程式逾時,因此改變該逾時的變數也會改變此等待。無論哪種方式,Claude Code 都會為請求正文的每 32KB 添加一秒。
542* **重試**:比 `API_TIMEOUT_MS` 少一秒,預設略低於 10 分鐘,以便重試可以超過保持回應直到生成完成的代理伺服器或閘道。在 Amazon Bedrock 上,重試使用與第一次嘗試相同的截止時間,訊息顯示一個持續時間而不是兩個。565* **重試**:比 `API_TIMEOUT_MS` 少一秒,預設略低於 10 分鐘,以便重試可以超過保持回應直到生成完成的代理伺服器或閘道。在 Amazon Bedrock 上,重試使用與第一次嘗試相同的截止時間,訊息顯示一個持續時間而不是兩個。
543 566
567 除 Amazon Bedrock 外,如果您將 `API_TIMEOUT_MS` 設定為 `0`,重試會等待 10 分鐘加上每 32KB 一秒,若第一次嘗試的等待時間更長,則等待與第一次嘗試相同的時間。
568
544兩個等待都不超過正 `API_TIMEOUT_MS` 少一秒,正 `API_TIMEOUT_MS` 在 11 秒以下會關閉截止時間。位元組級監視程式僅在回應標頭到達後才開始,因此在此之後停止傳送位元組的回應遵循[停滯串流規則](#automatic-retries)而不是此截止時間。569兩個等待都不超過正 `API_TIMEOUT_MS` 少一秒,正 `API_TIMEOUT_MS` 在 11 秒以下會關閉截止時間。位元組級監視程式僅在回應標頭到達後才開始,因此在此之後停止傳送位元組的回應遵循[停滯串流規則](#automatic-retries)而不是此截止時間。
545 570
546**該怎麼做:**571**該怎麼做:**
845* 執行 `/status` 並確認作用中的憑證是您預期的憑證。環境中殘留的 `ANTHROPIC_API_KEY` 可能會透過低階金鑰而不是您的訂閱路由請求。870* 執行 `/status` 並確認作用中的憑證是您預期的憑證。環境中殘留的 `ANTHROPIC_API_KEY` 可能會透過低階金鑰而不是您的訂閱路由請求。
846* 檢查您的提供者主控台以了解作用中的限制,並在需要時請求更高的層級871* 檢查您的提供者主控台以了解作用中的限制,並在需要時請求更高的層級
847* 對於 Anthropic API 金鑰,請參閱[速率限制參考](https://platform.claude.com/docs/en/api/rate-limits)以了解層級如何運作以及如何設定每個工作區的上限872* 對於 Anthropic API 金鑰,請參閱[速率限制參考](https://platform.claude.com/docs/en/api/rate-limits)以了解層級如何運作以及如何設定每個工作區的上限
848* 降低並行性:降低 [`CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY`](/docs/zh-TW/env-vars)、避免執行許多平行 subagent,或使用 `/model` 切換到較小的模型以進行高容量指令碼執行873* 降低並行性:避免執行許多平行 subagent,或使用 `/model` 切換到較小的模型以進行高容量指令碼執行
849 874
850### You've hit your monthly spend limit875### You've hit your monthly spend limit
851 876
1267* 如果 `/status` 只顯示您的登入,請執行一次 `/login`。如果憑證已被撤銷,新的登入會取代它。1292* 如果 `/status` 只顯示您的登入,請執行一次 `/login`。如果憑證已被撤銷,新的登入會取代它。
1268* 如果相同的登入帳戶再次出現相同訊息,表示該帳戶或組織已不再有效。請檢查 `/status` 所回報的帳戶與組織,並請您的組織管理員恢復存取權。1293* 如果相同的登入帳戶再次出現相同訊息,表示該帳戶或組織已不再有效。請檢查 `/status` 所回報的帳戶與組織,並請您的組織管理員恢復存取權。
1269* 如果 [`ANTHROPIC_BASE_URL`](/docs/zh-TW/env-vars) 指向 [LLM 閘道](/docs/zh-TW/llm-gateway),`401` 之後的文字是您閘道的訊息而非 Anthropic 的訊息,`/login` 無法改變它。請改為修正您閘道所預期的憑證。1294* 如果 [`ANTHROPIC_BASE_URL`](/docs/zh-TW/env-vars) 指向 [LLM 閘道](/docs/zh-TW/llm-gateway),`401` 之後的文字是您閘道的訊息而非 Anthropic 的訊息,`/login` 無法改變它。請改為修正您閘道所預期的憑證。
1295* 如果在閘道已取得所需憑證後每個請求仍以 `401` 失敗,請檢查閘道是否拒絕了 Claude Code 預設傳送的工具搜尋欄位。若要檢查,請依照[透過 LLM 閘道進行工具搜尋](/docs/zh-TW/mcp#tool-search-through-a-gateway)的說明設定 `ENABLE_TOOL_SEARCH=false`,然後再試一次。在 v2.1.304 之前,除非您以 `ENABLE_TOOL_SEARCH` 開啟,否則在閘道後方時工具搜尋是關閉的。
1270 1296
1271### 登入已過期1297### 登入已過期
1272 1298
1338* 在其他平台上,再次執行 `/login`1364* 在其他平台上,再次執行 `/login`
1339* 如果登入仍無法儲存,請參閱[未登入或 token 已過期](/docs/zh-TW/troubleshoot-install#not-logged-in-or-token-expired),了解鑰匙圈解鎖命令及其他憑證儲存復原步驟1365* 如果登入仍無法儲存,請參閱[未登入或 token 已過期](/docs/zh-TW/troubleshoot-install#not-logged-in-or-token-expired),了解鑰匙圈解鎖命令及其他憑證儲存復原步驟
1340 1366
1341### 無法啟動 OAuth 回呼伺服器1367### Couldn't start the local listener that receives the browser sign-in
1342 1368
1343當 `/login`、`claude auth login` 或 `claude setup-token` 透過瀏覽器為您登入時,Claude Code 會在 `127.0.0.1` 上開啟一個監聽埠,讓您的瀏覽器能將登入結果傳回給它。此訊息表示 Claude Code 無法開啟該埠,登入會在瀏覽器視窗或登入 URL 出現之前停止:1369來自 `/login`、`claude auth login` 或 `claude setup-token` 的這些訊息,都表示 Claude Code 無法開啟 `127.0.0.1` 上讓瀏覽器傳回登入結果的連接埠。
1344 1370
1345```text theme={null}1371若出現以 `The browser can't return the sign-in to Claude Code automatically` 開頭的通知,登入會在不使用該連接埠的情況下繼續進行。不會開啟瀏覽器,而通知會顯示在一個 URL 上方,請改從該 URL 登入:
1346Failed to start OAuth callback server: Failed to start server. Is port 0 in use?1372
1373```text wrap theme={null}
1374The browser can't return the sign-in to Claude Code automatically. After you sign in, paste the code shown.
1347```1375```
1348 1376
1349如果您的訊息以 `Is port 0 in use?` 結尾,表示在 IPv4 回送位址 `127.0.0.1` 上監聽的嘗試直接失敗了。由於失敗發生在登入 URL 產生之前,`Paste code here if prompted` 流程無法作為替代方案。1377若出現包含 `Couldn't start the local listener` 的訊息,表示登入已停止。例如,當您將輸入以管線傳入 `claude auth login` 時就會發生這種情況:
1378
1379```text theme={null}
1380Couldn't start the local listener that receives the browser sign-in. Try again.
1381```
1350 1382
1351**處理方式:**1383**處理方式:**
1352 1384
1353* 若要在不使用本機監聽器的情況下立即登入:如果您使用 claude.ai 訂閱,請在可以正常登入的機器上執行 [`claude setup-token`](/docs/zh-TW/authentication#generate-a-long-lived-token),並在這台機器上將其輸出的 token 設定為 `CLAUDE_CODE_OAUTH_TOKEN`。否則,請將 `ANTHROPIC_API_KEY` 設定為來自 [Claude Console](https://platform.claude.com/settings/keys) 的金鑰。[身分驗證優先順序](/docs/zh-TW/authentication#authentication-precedence)說明了 Claude Code 如何在多個憑證之間做選擇。1385* **`The browser can't return the sign-in to Claude Code automatically`**:您不需要先修正任何東西。在瀏覽器中開啟通知下方顯示的 URL 並登入。瀏覽器接著會顯示一組代碼:在 `Paste code here >` 提示字元處將其貼到 Claude Code 中,登入就會從那裡繼續。
1354* 若要改為在這台機器上使用瀏覽器登入,Claude Code 必須能夠在 `127.0.0.1` 上監聽。如果它在沙箱中執行,請確認沙箱的政策允許在本機埠上監聽,然後再次執行 `/login`。如果它理應可以監聽卻仍然失敗,請執行 `/feedback`,讓回報中包含您的環境詳細資訊。1386* **`Couldn't start the local listener that receives the browser sign-in`**:再次執行相同的命令。如果仍以相同方式停止,請改用 token 或 API 金鑰登入,而非透過瀏覽器。或者,如果您是以管線將輸入傳入 `claude auth login`,請在終端機中執行它,使其可以接受貼上的代碼。
1387* **改用 token 或 API 金鑰登入,而非透過瀏覽器**:如果您使用 claude.ai 訂閱,請在可以正常登入的機器上執行 [`claude setup-token`](/docs/zh-TW/authentication#generate-a-long-lived-token),然後在這台機器上將它輸出的 token 設定為 [`CLAUDE_CODE_OAUTH_TOKEN`](/docs/zh-TW/env-vars) 環境變數。否則,請將 `ANTHROPIC_API_KEY` 環境變數設定為來自 [Claude Console](https://platform.claude.com/settings/keys) 的金鑰。[身分驗證優先順序](/docs/zh-TW/authentication#authentication-precedence)說明了 Claude Code 如何在多個憑證之間做選擇。
1388* **恢復自動的瀏覽器回傳**:Claude Code 必須能夠在 `127.0.0.1` 上監聽。如果它在沙箱中執行,請確認沙箱的政策允許監聽本機連接埠,然後重新登入。如果在該環境中監聽應可正常運作而通知仍然出現,請執行 `/feedback`,讓回報內容包含您的環境詳細資訊。
1389
1390在 v2.1.305 之前,一旦無法開啟連接埠,登入就會立即停止,且不會顯示可供登入的 URL。訊息內容例如 `Failed to start OAuth callback server: Failed to start server. Is port 0 in use?`。在這些版本中,請更新 Claude Code 並重新登入,或改用 token 或 API 金鑰登入,而非透過瀏覽器。
1355 1391
1356### 不接受 Claude 登入1392### 不接受 Claude 登入
1357 1393
1513 1549
1514在設定該伺服器的位置更新標頭值,然後從 `/mcp` 重新連線。1550在設定該伺服器的位置更新標頭值,然後從 `/mcp` 重新連線。
1515 1551
1516在 v2.1.273 之前,登入過期、`headersHelper` 與 `Authorization` 標頭這幾種情況都會顯示 `MCP server "<name>" requires re-authorization (token expired)`。1552在您電腦上 Claude Desktop 應用程式中的 [Cowork](https://claude.com/docs/cowork/overview) 工作階段裡,這些訊息表示 MCP 伺服器拒絕了提供給它的憑證。請修正訊息所指出的那一項,然後在 Cowork 中開始新的任務或聊天:
1553
1554```text theme={null}
1555MCP server "<name>" rejected the credential from its headersHelper (check the helper, then start a new task or chat)
1556MCP server "<name>" rejected the Authorization header in its config (update it, then start a new task or chat)
1557```
1558
1559* **`headersHelper` 憑證遭拒絕**:確認 helper 傳回的是伺服器可接受的憑證,然後在 Cowork 中開始新的任務或聊天
1560* **`Authorization` 標頭遭拒絕**:更新該伺服器設定中 `headers` 底下的 `Authorization` 值,然後在 Cowork 中開始新的任務或聊天
1561
1562在 v2.1.302 之前,Cowork 工作階段會改為顯示 `run /mcp to reconnect` 結尾,儘管那裡無法使用 `/mcp`。如果您在 Cowork 中看到此類結尾,仍請檢查 helper 或更新標頭,然後開始新的任務或聊天。在 v2.1.273 之前,登入過期、`headersHelper` 和 `Authorization` 標頭的情況都會顯示 `MCP server "<name>" requires re-authorization (token expired)`。
1517 1563
1518伺服器也可能以 HTTP 403 `insufficient_scope` 拒絕工具呼叫,要求您授權某個範圍,有時是您的 token 已列出的範圍。訊息會指出該範圍:1564伺服器也可能以 HTTP 403 `insufficient_scope` 拒絕工具呼叫,要求您授權某個範圍,有時是您的 token 已列出的範圍。訊息會指出該範圍:
1519 1565
1812* 透過從同一個 shell 執行 `curl -I https://api.anthropic.com` 來確認您可以到達 API 主機。在 Windows PowerShell 上使用 `curl.exe -I https://api.anthropic.com`,以便不使用內建的 `Invoke-WebRequest` 別名。1858* 透過從同一個 shell 執行 `curl -I https://api.anthropic.com` 來確認您可以到達 API 主機。在 Windows PowerShell 上使用 `curl.exe -I https://api.anthropic.com`,以便不使用內建的 `Invoke-WebRequest` 別名。
1813* 如果您在公司代理伺服器後面,在啟動 Claude Code 之前設定 `HTTPS_PROXY` 並查看[網路設定](/docs/zh-TW/network-config)1859* 如果您在公司代理伺服器後面,在啟動 Claude Code 之前設定 `HTTPS_PROXY` 並查看[網路設定](/docs/zh-TW/network-config)
1814* 如果您透過 LLM 閘道或中繼路由,將 [`ANTHROPIC_BASE_URL`](/docs/zh-TW/env-vars) 設定為其位址。請參閱[將 Claude Code 連線到 LLM 閘道](/docs/zh-TW/llm-gateway-connect)以進行設定。1860* 如果您透過 LLM 閘道或中繼路由,將 [`ANTHROPIC_BASE_URL`](/docs/zh-TW/env-vars) 設定為其位址。請參閱[將 Claude Code 連線到 LLM 閘道](/docs/zh-TW/llm-gateway-connect)以進行設定。
1861* 如果 `ANTHROPIC_BASE_URL` 已指向您的閘道,且每個請求都以 `Connection dropped` 結束,請檢查您的閘道是否拒絕 Claude Code 預設傳送的工具搜尋欄位。若要檢查,請依照[透過 LLM 閘道進行工具搜尋](/docs/zh-TW/mcp#tool-search-through-a-gateway)所述設定 `ENABLE_TOOL_SEARCH=false`,然後再試一次。在 v2.1.304 之前,在閘道後面工具搜尋為關閉狀態,除非您使用 `ENABLE_TOOL_SEARCH` 將其開啟。
1815* 確保您的防火牆允許[網路存取要求](/docs/zh-TW/network-config#network-access-requirements)中列出的主機1862* 確保您的防火牆允許[網路存取要求](/docs/zh-TW/network-config#network-access-requirements)中列出的主機
1816* 間歇性故障會[自動重試](#automatic-retries);持續故障指向本機網路問題1863* 間歇性故障會[自動重試](#automatic-retries)
1817 1864
1818如果 `curl` 成功但 Claude Code 仍然失敗,原因通常是執行時和網路之間的某些東西,而不是網路本身:1865如果 `curl` 成功但 Claude Code 仍然失敗,原因通常是執行時和網路之間的某些東西,而不是網路本身:
1819 1866
2166* 修剪大型 `CLAUDE.md` 記憶檔案,或將指示移至[路徑範圍規則](/docs/zh-TW/memory#path-specific-rules),這些規則僅在相關時載入2213* 修剪大型 `CLAUDE.md` 記憶檔案,或將指示移至[路徑範圍規則](/docs/zh-TW/memory#path-specific-rules),這些規則僅在相關時載入
2167* 自動壓縮預設為開啟,通常可防止此錯誤。如果您在 `/config` 中或使用 [`DISABLE_AUTO_COMPACT`](/docs/zh-TW/env-vars) 關閉了它,請將其重新開啟。如果您保持關閉,請在視窗填滿之前自己執行 `/compact`。2214* 自動壓縮預設為開啟,通常可防止此錯誤。如果您在 `/config` 中或使用 [`DISABLE_AUTO_COMPACT`](/docs/zh-TW/env-vars) 關閉了它,請將其重新開啟。如果您保持關閉,請在視窗填滿之前自己執行 `/compact`。
2168* 若錯誤在接受更多 token 的模型上於接近 200K token 時出現,原因之一是 Claude Code 無法辨識的模型 ID。Claude Code 會為這類 ID 假設 200K 的視窗,因此若要在超過該點後繼續工作,請[提供模型的實際上下文視窗](/docs/zh-TW/model-config#correct-the-window-for-a-gateway-or-custom-model-id)。2215* 若錯誤在接受更多 token 的模型上於接近 200K token 時出現,原因之一是 Claude Code 無法辨識的模型 ID。Claude Code 會為這類 ID 假設 200K 的視窗,因此若要在超過該點後繼續工作,請[提供模型的實際上下文視窗](/docs/zh-TW/model-config#correct-the-window-for-a-gateway-or-custom-model-id)。
2216* 如果錯誤是在您於 Claude 壓縮對話期間停止它之後立即出現,您的對話並未變更,且仍大到需要壓縮。請執行 `/compact` 並再次送出您的訊息。若要避免此錯誤再次發生,請將 Claude Code [更新](/docs/zh-TW/setup#update-claude-code)至 v2.1.304 或更新版本。在 v2.1.304 之前,在那個時間點停止可能會使該回合以此錯誤結束。
2169 2217
2170請參閱[探索上下文視窗](/docs/zh-TW/context-window)以獲得上下文如何填滿的互動式檢視。2218請參閱[探索上下文視窗](/docs/zh-TW/context-window)以獲得上下文如何填滿的互動式檢視。
2171 2219
2298 2346
2299### Extra inputs are not permitted2347### Extra inputs are not permitted
2300 2348
2301Claude Code 和 API 之間的代理伺服器或 LLM 閘道去除了 `anthropic-beta` 請求標頭,因此 API 拒絕了依賴它的欄位。2349接收請求的端點將請求中的某個欄位視為其不接受的輸入而拒絕,且端點的訊息會指出該欄位。
2302 2350
2303```text theme={null}2351```text theme={null}
2304API Error: 400 ... Extra inputs are not permitted ... context_management2352API Error: 400 ... context_management: Extra inputs are not permitted
2305```2353```
2306 2354
2307Claude Code 會發送測試版專用欄位(例如 `context_management`),並附上啟用它們的 `anthropic-beta` 標頭。當閘道轉發本文但刪除標頭時,API 會看到它無法識別的欄位。2355Claude Code 會傳送僅限 beta 的欄位,例如 `context_management` 和工具搜尋的 `defer_loading`,並一同傳送啟用它們的 `anthropic-beta` 標頭。當閘道轉送主體但捨棄了標頭時,API 會看到它無法辨識的欄位。當閘道將 Anthropic 格式的主體轉送至具有不同 schema 的上游時,該上游會拒絕這類欄位。[Beta 標頭與主體欄位配對](/docs/zh-TW/llm-gateway-protocol#beta-header-and-body-field-pairs)涵蓋了這兩種情況。
2308 2356
2309**該怎麼辦:**2357**該怎麼辦:**
2310 2358
2311* 設定您的閘道以轉發 `anthropic-beta` 標頭。請參閱[功能傳遞](/docs/zh-TW/llm-gateway-protocol#feature-pass-through)以了解閘道必須轉發的內容。2359* 如果訊息包含 `context_management: Extra inputs are not permitted`,請[更新 Claude Code](/docs/zh-TW/setup#update-claude-code) 至 v2.1.304 或更新版本。更新後,Claude Code 會在遇到此拒絕時,不帶該欄位再傳送一次請求。在 v2.1.304 之前,Claude Code 不會針對此拒絕進行重試。
2360* 如果訊息提到 `defer_loading` 或 `tool_reference`,請更新 Claude Code 或關閉[工具搜尋](/docs/zh-TW/mcp#tool-search-through-a-gateway):
2361 * [更新 Claude Code](/docs/zh-TW/setup#update-claude-code) 至 v2.1.305 或更新版本。接著 Claude Code 會在遇到此拒絕時,不帶工具搜尋欄位再傳送一次請求。
2362 * 如果您無法更新,或更新後訊息仍然出現,請在您的 shell 或[設定 `env`](/docs/zh-TW/settings-reference#env) 中設定 `ENABLE_TOOL_SEARCH=false`。如果某個設定檔已設定此變數,請在該處變更,因為該值[可能會覆寫 shell 匯出](/docs/zh-TW/settings-reference#how-env-values-interact-with-your-shell)。接著 Claude Code 會預先載入 MCP 工具。
2363* 如果您的閘道捨棄了標頭,請將其設定為轉送 `anthropic-beta` 標頭。如需閘道必須轉送的內容,請參閱[功能傳遞](/docs/zh-TW/llm-gateway-protocol#feature-pass-through)。
2312* 作為備援,在啟動前設定 [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`](/docs/zh-TW/env-vars)。[禁用預發行功能](/docs/zh-TW/llm-gateway-protocol#disable-pre-release-capabilities)涵蓋確切範圍。2364* 作為備援,在啟動前設定 [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`](/docs/zh-TW/env-vars)。[禁用預發行功能](/docs/zh-TW/llm-gateway-protocol#disable-pre-release-capabilities)涵蓋確切範圍。
2313 2365
2366在 v2.1.302 之前,即使不涉及閘道,此錯誤也可能列出欄位 `diagnostics`。當已使用 Anthropic API 的工作階段在未重新啟動的情況下移至 Amazon Bedrock 或 Google Cloud's Agent Platform 時,就會出現此錯誤。例如,當您在另一個 Claude Code 視窗中執行 [`/setup-bedrock`](/docs/zh-TW/commands) 時,您保持開啟的工作階段會移至 Bedrock。在這些版本中,請在該工作階段中執行 `/clear` 或重新啟動它。
2367
2314### 工具輸入 schema 無效2368### 工具輸入 schema 無效
2315 2369
2316請求中的工具聲明了 `input_schema`,該 schema 未通過 API 的 JSON Schema 驗證,因此 API 拒絕了整個請求。`tools.` 後面的數字是失敗工具在請求的工具列表中的位置,而不是您可以查找的名稱。2370請求中的工具聲明了 `input_schema`,該 schema 未通過 API 的 JSON Schema 驗證,因此 API 拒絕了整個請求。`tools.` 後面的數字是失敗工具在請求的工具列表中的位置,而不是您可以查找的名稱。
2384* 使用別名(例如 `sonnet` 或 `opus`)而不是完整的版本化 ID。別名解析為維護的預設值,因此它們不會過時。請參閱[模型設定](/docs/zh-TW/model-config)。2438* 使用別名(例如 `sonnet` 或 `opus`)而不是完整的版本化 ID。別名解析為維護的預設值,因此它們不會過時。請參閱[模型設定](/docs/zh-TW/model-config)。
2385* 如果錯誤的模型在 CLI 中不斷出現,則某處設定了過時的 ID。按[優先順序](/docs/zh-TW/model-config#setting-your-model)檢查您可以設定模型的位置,並移除過時的值。2439* 如果錯誤的模型在 CLI 中不斷出現,則某處設定了過時的 ID。按[優先順序](/docs/zh-TW/model-config#setting-your-model)檢查您可以設定模型的位置,並移除過時的值。
2386* Claude Code 將過期的 claude.ai 登入報告為 [Login expired](#login-expired),而不是此錯誤。在 v2.1.206 之前,無法再刷新的過期登入對每個模型都失敗,並出現此錯誤;如果您在較舊版本上看到此錯誤,請執行 `/login`。2440* Claude Code 將過期的 claude.ai 登入報告為 [Login expired](#login-expired),而不是此錯誤。在 v2.1.206 之前,無法再刷新的過期登入對每個模型都失敗,並出現此錯誤;如果您在較舊版本上看到此錯誤,請執行 `/login`。
2441* 如果 [`ANTHROPIC_BASE_URL`](/docs/zh-TW/env-vars) 指向 [LLM 閘道](/docs/zh-TW/llm-gateway),且每個模型都以此方式失敗,請檢查您的閘道是否拒絕了 Claude Code 預設送出的工具搜尋欄位。若要檢查,請依[透過 LLM 閘道使用工具搜尋](/docs/zh-TW/mcp#tool-search-through-a-gateway)的說明設定 `ENABLE_TOOL_SEARCH=false`,然後再試一次。在 v2.1.304 之前,在閘道後方時工具搜尋預設為關閉,除非您使用 `ENABLE_TOOL_SEARCH` 開啟它。
2387* 對於 Google Cloud 的 Agent Platform 部署,請參閱 [Google Cloud 的 Agent Platform 疑難排解](/docs/zh-TW/google-vertex-ai#troubleshooting)。2442* 對於 Google Cloud 的 Agent Platform 部署,請參閱 [Google Cloud 的 Agent Platform 疑難排解](/docs/zh-TW/google-vertex-ai#troubleshooting)。
2388 2443
2389### Model is not a recognized model id2444### Model is not a recognized model id
2590其他訊息也會報告相同狀況:2645其他訊息也會報告相同狀況:
2591 2646
2592* 在互動式工作階段中,通知讀取 `Advisor will not activate on the main model (advisor is less capable); subagents may still use it and may use more tokens · /advisor`。2647* 在互動式工作階段中,通知讀取 `Advisor will not activate on the main model (advisor is less capable); subagents may still use it and may use more tokens · /advisor`。
2593* 使用 `--advisor` 旗標啟動時,警告讀取 `"<advisor>" cannot advise "<main model>" (the advisor must be at least as capable as the main model). The advisor will not be used for the main model.`,而工作階段仍會啟動。2648* 當您在[非互動模式](/docs/zh-TW/headless)中以 `--advisor` 旗標啟動,且該執行不是[背景工作階段](/docs/zh-TW/agent-view)時,警告會輸出至 stderr,而執行仍會開始。警告內容為 `"<advisor>" cannot advise "<main model>" (the advisor must be at least as capable as the main model). The advisor will not be used for the main model.`。互動式工作階段只會將該警告寫入[偵錯日誌](#configuration-warnings)。
2594 2649
2595**該怎麼辦:**2650**該怎麼辦:**
2596 2651
3361 3416
3362以下同類字串會在命令執行之前就觸發:3417以下同類字串會在命令執行之前就觸發:
3363 3418
3364* `Shell command permission check failed for pattern "..."`:該命令的權限檢查未允許它。[注入命令的權限檢查](/docs/zh-TW/skills#permission-checks-on-injected-commands)說明了在各權限模式下哪些結果會中止,以及如何以 `allowed-tools` 預先核准命令3419* `Shell command permission check failed for pattern "..."`:該命令的權限檢查不允許它執行。[注入命令的權限檢查](/docs/zh-TW/skills#permission-checks-on-injected-commands)說明了在每種權限模式下哪些結果會中止,以及如何使用 `allowed-tools` 預先核准命令
3365* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``:該 skill 的 frontmatter 要求在沒有 bash 的機器上使用 bash。請安裝 Git for Windows,或將 frontmatter 改為 `shell: powershell`。請參閱[注入命令的執行方式](/docs/zh-TW/skills#how-injected-commands-run)3420* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``:該 skill 的 frontmatter 要求在沒有 bash 的機器上使用 bash。請安裝 Git for Windows,或將 frontmatter 改為 `shell: powershell`。請參閱[注入命令的執行方式](/docs/zh-TW/skills#how-injected-commands-run)
3366* `No shell command in <name> was run`:該檔案的某個 `!` 命令包含了 tab 或換行以外的原始控制字元,因此這些命令都不會執行。請參閱[如何找出並移除該字元](#no-shell-command-was-run)3421* `No shell command in <name> was run`:該檔案的其中一個 `!` 命令包含 tab 或換行以外的原始控制字元,因此這些命令都不會執行。請參閱[如何找出並移除該字元](#no-shell-command-was-run)
3367 3422
3368**處理方式:**3423**處理方式:**
3369 3424
3464Claude Code 會建議選單在此工作階段中列出的最接近的命令名稱或別名。當沒有相近的名稱時,訊息會在名稱之後結束。原因通常是以下其中之一:3519Claude Code 會建議選單在此工作階段中列出的最接近的命令名稱或別名。當沒有相近的名稱時,訊息會在名稱之後結束。原因通常是以下其中之一:
3465 3520
3466* 打字錯誤,例如將 `/help` 打成 `/hepl`。[命令選單如何比對您輸入的內容](/docs/zh-TW/commands#how-the-command-menu-matches-what-you-type)說明了如何在提交前挑選相近的符合項目3521* 打字錯誤,例如將 `/help` 打成 `/hepl`。[命令選單如何比對您輸入的內容](/docs/zh-TW/commands#how-the-command-menu-matches-what-you-type)說明了如何在提交前挑選相近的符合項目
3467* 命令存在,但因為某項需求未滿足(例如您的平台、方案或身分驗證方式)而在此工作階段中無法使用。[`/web-setup`](/docs/zh-TW/web-quickstart#web-setup-shows-no-commands-match-or-unknown-command) 與 [`/schedule`](/docs/zh-TW/routines#schedule-returns-unknown-command) 的疑難排解項目說明了兩種常見情況。有些命令在被您組織的政策停用時,會以它們自己的訊息回應,例如 [`Cloud sessions are disabled by your organization's policy`](#cloud-sessions-are-disabled-by-your-organizations-policy)3522* 命令存在,但由於未滿足某項要求(例如您的平台、方案或身分驗證方式),在此工作階段中無法使用。請參閱 [`/web-setup`](/docs/zh-TW/web-quickstart#web-setup-shows-no-commands-match-or-unknown-command)、[`/schedule`](/docs/zh-TW/routines#schedule-returns-unknown-command) 或 [`/auto-mode-setup`](/docs/zh-TW/auto-mode-config#auto-mode-setup-returns-unknown-command) 的相關項目。某些命令在您組織的政策停用它們時,會以自己的訊息回應,例如 [`Cloud sessions are disabled by your organization's policy`](#cloud-sessions-are-disabled-by-your-organizations-policy)
3468* 來自[外掛](/docs/zh-TW/plugins/overview)或 [MCP 伺服器](/docs/zh-TW/mcp#use-mcp-prompts-as-commands)的命令,但該外掛或伺服器在此工作階段中未安裝或未連線3523* 來自[外掛](/docs/zh-TW/plugins/overview)或 [MCP 伺服器](/docs/zh-TW/mcp#use-mcp-prompts-as-commands)的命令,但該外掛或伺服器在此工作階段中未安裝或未連線
3469 3524
3470只有在互動式終端機工作階段中,Claude Code 才會以這種方式回應不相符的 `/` 名稱。在其他所有工作階段中,它會改將提示詞作為一般訊息傳送給 Claude,並附上一則說明該命令未執行的備註,以及 Claude 在該工作階段中可執行的命令清單。這些工作階段包括:3525只有在互動式終端機工作階段中,Claude Code 才會以這種方式回應不相符的 `/` 名稱。在其他所有工作階段中,它會改將提示詞作為一般訊息傳送給 Claude,並附上一則說明該命令未執行的備註,以及 Claude 在該工作階段中可執行的命令清單。這些工作階段包括:
3513 3568
3514* **您沒有傳入基底分支**:Claude Code 與儲存庫的預設分支進行比較,並建議您明確傳入基底分支,如上例所示3569* **您沒有傳入基底分支**:Claude Code 與儲存庫的預設分支進行比較,並建議您明確傳入基底分支,如上例所示
3515* **您傳入的基底分支已存在於您的複製中**:提示內容為 ``Make sure <branch> exists locally or on origin (try `git fetch origin <branch>`)``3570* **您傳入的基底分支已存在於您的複製中**:提示內容為 ``Make sure <branch> exists locally or on origin (try `git fetch origin <branch>`)``
3516* **您傳入的基準分支不在您的 clone 中**:Claude Code 在比較之前從 origin fetch 了它。提示為 ``<branch> was fetched from origin but shares no history with HEAD. If another branch is your real base, pass it explicitly (`/code-review ultra <branch>`)``;當 Claude Code 無法判斷您的 clone 是否為淺層 clone 時,它會改為建議 `git fetch --unshallow origin`。在 v2.1.221 之前,對於每個被 fetch 的基準分支,提示都會建議 `git fetch --unshallow origin`,而在完整的 clone 上,該命令會以 `fatal: --unshallow on a complete repository does not make sense` 失敗。3571* **您傳入的基礎分支不在您的 clone 中**:Claude Code 在比較之前已從 origin 擷取該分支。提示為 ``<branch> was fetched from origin but shares no history with HEAD. If another branch is your real base, pass it explicitly (`/code-review ultra <branch>`)``;當 Claude Code 無法判斷您的 clone 是否為淺層 clone 時,它會改為建議 `git fetch --unshallow origin`。在 v2.1.221 之前,對於每個擷取的基礎分支,提示都會建議 `git fetch --unshallow origin`,而在完整的 clone 上,該命令會以 `fatal: --unshallow on a complete repository does not make sense` 失敗。
3517 3572
3518**處理方式:**3573**處理方式:**
3519 3574
3856* 親自開啟該工作階段並在其中執行 `/recap`:在其終端機中、在 [Desktop 應用程式](/docs/zh-TW/desktop)或[行動應用程式](/docs/zh-TW/mobile)中、在 [claude.ai/code](https://claude.ai/code),或透過 [Remote Control](/docs/zh-TW/remote-control)3911* 親自開啟該工作階段並在其中執行 `/recap`:在其終端機中、在 [Desktop 應用程式](/docs/zh-TW/desktop)或[行動應用程式](/docs/zh-TW/mobile)中、在 [claude.ai/code](https://claude.ai/code),或透過 [Remote Control](/docs/zh-TW/remote-control)
3857* 如果是雲端排程任務或其他程式傳送的,請從該提示詞中移除 `/recap`3912* 如果是雲端排程任務或其他程式傳送的,請從該提示詞中移除 `/recap`
3858 3913
3914### /feedback is disabled by your organization's policy
3915
3916此訊息表示您組織的政策不允許從 Claude Code 提供產品意見回饋,因此 `/feedback`、`/bug` 與 `/share` 不會開啟意見回饋對話框。訊息會指出您在 Claude Code 提示字元輸入的命令:
3917
3918```text wrap theme={null}
3919/feedback is disabled by your organization's policy. To report a bug, open an issue at https://github.com/anthropics/claude-code/issues. Issues are public, so leave out anything confidential.
3920```
3921
3922訊息也可能只有第一句。
3923
3924**處理方式:**
3925
3926* 若要回報錯誤,請在 [github.com/anthropics/claude-code/issues](https://github.com/anthropics/claude-code/issues) 建立 issue。任何人都可以閱讀該處的 issue,因此請勿包含程式碼、逐字稿及任何其他機密內容。
3927
3928在 v2.1.302 之前,完整訊息為 `/feedback is disabled by your organization's policy. Contact your organization admin to enable it.`
3929
3859## Plugin 錯誤3930## Plugin 錯誤
3860 3931
3861這些錯誤來自 [plugin](/docs/zh-TW/plugins/overview) 和 [marketplace](/docs/zh-TW/plugins/overview) 設定。對於不會產生此頁面上其中一則訊息的 plugin 問題,例如無法載入的 marketplace URL 或已安裝但未出現的 plugin,請參閱 [Plugin 疑難排解](/docs/zh-TW/plugins/troubleshooting)。3932這些錯誤來自 [plugin](/docs/zh-TW/plugins/overview) 和 [marketplace](/docs/zh-TW/plugins/overview) 設定。對於不會產生此頁面上其中一則訊息的 plugin 問題,例如無法載入的 marketplace URL 或已安裝但未出現的 plugin,請參閱 [Plugin 疑難排解](/docs/zh-TW/plugins/troubleshooting)。
4001 4072
4002### 路徑逃逸 plugin 目錄4073### 路徑逃逸 plugin 目錄
4003 4074
4004Plugin 元件路徑(在 plugin 的 `plugin.json` 或其 [marketplace 項目](/docs/zh-TW/plugins/marketplace-reference#plugin-entries) 中宣告)解析到 plugin 自己的目錄之外。Claude Code 捨棄該路徑並載入 plugin 的其餘部分。訊息中的元件名稱(例如 `commands` 或 `hooks`)命名了宣告路徑的欄位。4075Plugin 的其中一個元件路徑導向 plugin 目錄之外,或無法確認其位於 plugin 目錄內,因此 Claude Code 捨棄該路徑並載入 plugin 的其餘部分。對於 plugin 在 `plugin.json` 或其 [marketplace 項目](/docs/zh-TW/plugins/marketplace-reference#plugin-entries) 中宣告的路徑,訊息中的元件名稱(例如 `commands` 或 `hooks`)命名了宣告該路徑的欄位。
4005 4076
4006```text theme={null}4077```text theme={null}
4007commands path escapes plugin directory: ./../shared.md4078commands path escapes plugin directory: ./../shared.md
4015commands path escapes plugin directory: ./commands/deploy.md — it resolves to /home/user/shared/deploy.md, outside the plugin directory4086commands path escapes plugin directory: ./commands/deploy.md — it resolves to /home/user/shared/deploy.md, outside the plugin directory
4016```4087```
4017 4088
4089如果訊息提供了 marketplace plugin 自身檔案之一(例如 `hooks/hooks.json`)的完整路徑,表示 Claude Code 略過了該檔案。當 Claude Code 無法確認該檔案位於 plugin 內,或者對於 [本機 marketplace](/docs/zh-TW/plugins/loading#in-place-and-copied-plugins) 中的 plugin,無法確認該檔案位於該 marketplace 內時,就會發生這種情況。訊息會以下列所示的元件名稱回報這些檔案:
4090
4091* `hooks/hooks.json`:`hooks`
4092* `monitors/monitors.json`:`monitors`
4093* `settings.json`:`settings`
4094* plugin 根目錄的 `SKILL.md`:`skills`
4095
4096例如,以下訊息針對的是解析到 plugin 及其本機 marketplace 兩者之外的 `hooks/hooks.json`:
4097
4098```text theme={null}
4099hooks path escapes plugin directory: /home/user/my-marketplace/my-plugin/hooks/hooks.json — it resolves to /home/user/dotfiles/hooks.json, outside the plugin directory and its marketplace directory
4100```
4101
4018在 macOS 和 Linux 上,Claude Code 也拒絕任何位置包含反斜線的元件路徑,即使路徑保持在 plugin 內。使用 Windows 風格分隔符的元件路徑的 plugin 在 Windows 上載入並在其他平台上觸發此拒絕:4102在 macOS 和 Linux 上,Claude Code 也拒絕任何位置包含反斜線的元件路徑,即使路徑保持在 plugin 內。使用 Windows 風格分隔符的元件路徑的 plugin 在 Windows 上載入並在其他平台上觸發此拒絕:
4019 4103
4020```text theme={null}4104```text theme={null}
4023 4107
4024在 v2.1.251 之前,Claude Code 載入在 marketplace 項目中宣告的 `commands` 路徑,即使它指向 plugin 目錄外。4108在 v2.1.251 之前,Claude Code 載入在 marketplace 項目中宣告的 `commands` 路徑,即使它指向 plugin 目錄外。
4025 4109
4026在 v2.1.257 之前,檢查只查看路徑的拼寫,而不是符號連結導向的位置。4110在 v2.1.257 之前,對 plugin 宣告之路徑的檢查只查看路徑的拼寫,而不是符號連結導向的位置。
4027 4111
4028**該怎麼做:**4112**該怎麼做:**
4029 4113
4030* 將參考的檔案移到 plugin 目錄內,並使用 `./` 相對路徑指向它4114* 如果您安裝了該 plugin 但並未維護它,請將訊息回報給其作者
4031* 如果路徑是指向 plugin 外部檔案的符號連結,請用檔案副本替換符號連結4115* 對於 plugin 宣告的路徑,將參考的檔案移到 plugin 目錄內,並使用 `./` 相對路徑指向它
4032* 如果訊息說路徑包含反斜線,請使用正斜線寫入路徑,例如 `./commands/deploy.md`4116* 如果該路徑,或 plugin 內位於其上層的資料夾,是導向 plugin 外部的符號連結,請用其所指向內容的副本替換該符號連結
4117* 如果訊息說 plugin 宣告的路徑包含反斜線,請使用正斜線寫入路徑,例如 `./commands/deploy.md`
4118* 如果訊息以 `EACCES` 結尾,請恢復您在通往該路徑所指檔案或資料夾的每個目錄上的執行權限。檢查該路徑上方的目錄,然後追蹤您遇到的每個符號連結,並檢查通往其指向位置的目錄。對於任何其他錯誤代碼,請在 [無法檢查之路徑的原因與步驟](#path-could-not-be-checked) 中查詢。
4033* 若要與同一 marketplace 中的其他 plugin 共享檔案,請使用 plugin 目錄內的符號連結連結它們,遵循 [符號連結規則](/docs/zh-TW/plugins/host-marketplace#share-files-within-a-marketplace-with-symlinks)4119* 若要與同一 marketplace 中的其他 plugin 共享檔案,請使用 plugin 目錄內的符號連結連結它們,遵循 [符號連結規則](/docs/zh-TW/plugins/host-marketplace#share-files-within-a-marketplace-with-symlinks)
4034 4120
4121### Plugin 未載入:未讀取其 manifest
4122
4123Claude Code 無法確認 marketplace plugin 位於 `.claude-plugin/plugin.json` 的 [manifest](/docs/zh-TW/plugins/manifest-reference) 在 plugin 內,因此不會從該 plugin 載入任何內容。對於 [本機 marketplace](/docs/zh-TW/plugins/loading#in-place-and-copied-plugins) 中的 plugin,Claude Code 也無法確認該 manifest 位於該 marketplace 內。此訊息會出現在 `/plugin` **錯誤** 標籤中,而訊息結尾的原因說明了 Claude Code 發現的情況。
4124
4125例如,以下訊息針對的是本機 marketplace 中的 plugin,其 `.claude-plugin` 資料夾是導向 marketplace 外部的符號連結:
4126
4127```text theme={null}
4128Plugin not loaded: its manifest /home/user/my-marketplace/my-plugin/.claude-plugin/plugin.json was not read, because it resolves to /home/user/dotfiles/my-plugin/.claude-plugin/plugin.json, outside the plugin directory and its marketplace directory
4129```
4130
4131**該怎麼做:**
4132
4133* 如果原因以 `EACCES` 結尾,請恢復您在通往 manifest 的每個目錄上的執行權限。檢查 manifest 上方的目錄,然後追蹤您遇到的每個符號連結,並檢查通往其指向位置的目錄。對於任何其他錯誤代碼,請在 [無法檢查之路徑的原因與步驟](#path-could-not-be-checked) 中查詢。
4134* 如果您維護該 plugin,且原因說明了 manifest 解析到的位置,表示 `.claude-plugin` 資料夾或 `plugin.json` 本身是導向該處的符號連結。請用其所指向內容的副本替換該連結。
4135* 如果您安裝了該 plugin 但並未維護它,請將訊息回報給其作者
4136
4035### 無法檢查路徑4137### 無法檢查路徑
4036 4138
4037Claude Code 詢問作業系統 plugin 路徑是否存在,並收到除「找不到」以外的錯誤,因此它不會載入路徑命名的內容。plugin 的多少部分載入取決於哪個路徑失敗:4139Claude Code 詢問作業系統 plugin 路徑是否存在,並收到除「找不到」以外的錯誤,因此它不會載入路徑命名的內容。plugin 的多少部分載入取決於哪個路徑失敗:
4226 4328
4227在 v2.1.281 之前,Read、Write、Edit 或 NotebookEdit 路徑中的 null 位元組會以指出 `Path contains null bytes` 的錯誤結束整個回合,且工具從未執行。4329在 v2.1.281 之前,Read、Write、Edit 或 NotebookEdit 路徑中的 null 位元組會以指出 `Path contains null bytes` 的錯誤結束整個回合,且工具從未執行。
4228 4330
4331### File is too large to read as an image
4332
4333Claude 嘗試使用 [Read 工具](/docs/zh-TW/tools-reference#read-tool-behavior) 將檔案作為圖片讀取,而該檔案大於 128 MB,也就是 Read 從圖片檔案載入的上限。沒有讀取任何內容,Claude 會收到此錯誤作為工具結果:
4334
4335```text wrap theme={null}
4336File is too large to read as an image (the limit is 128MB): <path>. If it is an image, resize it or export a smaller copy, then read that.
4337```
4338
4339當路徑是管道或裝置而非一般檔案時,Read 會在收到超過 128 MB 後停止,並改為傳回此錯誤:
4340
4341```text wrap theme={null}
4342Cannot read this as an image: <path> is a pipe or a device, not a regular file, and it sent more than 128MB without ending.
4343```
4344
4345**處理方式:**
4346
4347* 如果 Claude 依照 `File is too large` 訊息,接著調整了圖片大小或讀取了較小的副本,則無需任何動作
4348* 如果 Claude 在錯誤處停止,請自行匯出小於 128 MB 的副本(例如使用較低的解析度),然後讓 Claude 改讀該檔案
4349* 如果路徑是管道或裝置,請改為讓 Claude 讀取一般的圖片檔案
4350
4229### subagent\_type is required4351### subagent\_type is required
4230 4352
4231```text theme={null}4353```text theme={null}
4316* 在 [除錯日誌](/docs/zh-TW/debug-your-config) 指出的資料夾中執行 `claude`,並接受信任對話框。下次 Claude Code 恢復該隊員時,便會重新套用定義;您不需要重新啟動組長工作階段4438* 在 [除錯日誌](/docs/zh-TW/debug-your-config) 指出的資料夾中執行 `claude`,並接受信任對話框。下次 Claude Code 恢復該隊員時,便會重新套用定義;您不需要重新啟動組長工作階段
4317* 或者,在 `~/.claude.json` 中將 `hasTrustDialogAccepted` 項目設為 `true`,並使用除錯日誌印出的確切 `projects["<path>"]` 鍵4439* 或者,在 `~/.claude.json` 中將 `hasTrustDialogAccepted` 項目設為 `true`,並使用除錯日誌印出的確切 `projects["<path>"]` 鍵
4318 4440
4441### Only a teammate can approve a shutdown request
4442
4443Claude Code 拒絕了一項 [agent team](/docs/zh-TW/agent-teams) 關閉核准,因為傳送它的工作階段並非以隊員身分執行。沒有傳送任何內容,也沒有任何項目被關閉。拒絕訊息會出現在傳送端工作階段的工具結果中:
4444
4445```text wrap theme={null}
4446Only a teammate can approve a shutdown request, and this session is not running as one. Nothing was sent. To shut down a teammate, send that teammate a shutdown_request message. The teammate is the one that approves it.
4447```
4448
4449**處理方式:**
4450
4451* 如果拒絕訊息出現在您的組長工作階段中,請先檢查該隊員是否已在此後關閉。拒絕會連同改為傳送 `shutdown_request` 的指示傳回給 Claude,回合則會繼續進行。在互動式組長工作階段中,當隊員核准關閉請求時,會出現 `<name> has shut down.`。
4452* 如果該隊員仍在執行,請在組長的提示詞輸入框中要求組長關閉該隊員,例如 `Ask the researcher teammate to shut down`。請參閱 [關閉隊員](/docs/zh-TW/agent-teams#shut-down-teammates)。
4453* 如果是您自己以 `claude --resume` 恢復的前隊員收到此拒絕,則沒有傳送任何內容。若要結束該工作階段,請在其提示詞輸入框中執行 `/exit`。
4454
4319### Message too large for cross-session delivery4455### Message too large for cross-session delivery
4320 4456
4321Claude 傳送給您在此機器上另一個工作階段的 [跨工作階段訊息](/docs/zh-TW/cross-session-messaging) 過長,無法傳送。Claude Code 拒絕了它,接收端工作階段沒有收到任何內容。拒絕訊息會出現在傳送端工作階段的工具結果中,而不是以橫幅形式出現在您的終端機中。它會指出兩個大小以及如何讓訊息符合限制:4457Claude 傳送給您在此機器上另一個工作階段的 [跨工作階段訊息](/docs/zh-TW/cross-session-messaging) 過長,無法傳送。Claude Code 拒絕了它,接收端工作階段沒有收到任何內容。拒絕訊息會出現在傳送端工作階段的工具結果中,而不是以橫幅形式出現在您的終端機中。它會指出兩個大小以及如何讓訊息符合限制:
4449 4585
4450### Disk quota or temp filesystem is full4586### Disk quota or temp filesystem is full
4451 4587
4452Claude Code 會將每個 Bash 和 PowerShell 命令的輸出儲存到其暫存目錄下的檔案中。當命令以非零代碼結束且完全沒有輸出時,Claude Code 會檢查存放該檔案的檔案系統是否已用盡空間或 inode,或您在其上的磁碟配額是否已用完。若是如此,命令的結果中會以診斷訊息取代空白輸出:4588Claude Code 會將每個 Bash 和 PowerShell 命令的輸出儲存到其暫存目錄下的檔案中。命令結果中出現這些訊息,表示存放該目錄的檔案系統,或您在其上的磁碟配額已滿。
4589
4590如果 Claude Code 因為檔案系統或您在其上的配額已滿而無法建立該檔案,您的命令就不會啟動,結果內容如下:
4591
4592```text wrap theme={null}
4593The command was not started: this computer's disk is full (ENOSPC), so the file that captures command output could not be created. Nothing ran. If this is the user's own computer, tell them before deleting anything to make room.
4594```
4595
4596當命令以非零代碼結束且完全沒有輸出時,Claude Code 會檢查存放輸出檔案的檔案系統。如果該檔案系統已用盡空間或 inode,或您在其上的磁碟配額已用完,命令的結果中會以診斷訊息取代空白輸出:
4453 4597
4454```text wrap theme={null}4598```text wrap theme={null}
4455Your disk quota is full on the filesystem with Claude Code's temp directory /private/tmp/claude-501/-Users-you-my-project/1f0e62dc-4b0a-4f5e-9c2d-8a7b6c5d4e3f/tasks (EDQUOT), so any output this command printed was lost, and it may have failed because it could not write. Delete files you no longer need there, or restart Claude Code with CLAUDE_CODE_TMPDIR set to a directory on another filesystem.4599Your disk quota is full on the filesystem with Claude Code's temp directory /private/tmp/claude-501/-Users-you-my-project/1f0e62dc-4b0a-4f5e-9c2d-8a7b6c5d4e3f/tasks (EDQUOT), so any output this command printed was lost, and it may have failed because it could not write. Delete files you no longer need there, or restart Claude Code with CLAUDE_CODE_TMPDIR set to a directory on another filesystem.
4460* `Your disk quota is full ... (EDQUOT)`:您自己在該檔案系統上的配額已用完。即使檔案系統仍顯示有可用空間,配額也可能已滿4604* `Your disk quota is full ... (EDQUOT)`:您自己在該檔案系統上的配額已用完。即使檔案系統仍顯示有可用空間,配額也可能已滿
4461* `The filesystem with Claude Code's temp directory ..., or your disk quota on it, is full (ENOSPC)`:檔案系統或您在其上的配額已沒有剩餘空間4605* `The filesystem with Claude Code's temp directory ..., or your disk quota on it, is full (ENOSPC)`:檔案系統或您在其上的配額已沒有剩餘空間
4462* `Command output was lost: the temp filesystem at ... is full` 或 `... is out of inodes`:檔案系統幾乎沒有剩餘的可用空間,或 inode 即將用盡4606* `Command output was lost: the temp filesystem at ... is full` 或 `... is out of inodes`:檔案系統幾乎沒有剩餘的可用空間,或 inode 即將用盡
4607* `The command was not started: this computer's disk is full (ENOSPC)` 或 `... (EDQUOT)`:檔案系統已沒有空間可建立輸出檔案,或在 `EDQUOT` 的情況下,您自己在其上的配額已用完
4463 4608
4464**處理方式:**4609**處理方式:**
4465 4610
4466* 刪除存放 Claude Code 暫存目錄之檔案系統上不再需要的檔案。對於 `EDQUOT`,請刪除計入您自己配額的檔案。對於 `out of inodes`,請刪除大量檔案,而不是少數幾個大型檔案,因為無論大小,每個檔案都會佔用一個 inode4611* 刪除存放 Claude Code 暫存目錄之檔案系統上不再需要的檔案。如果您的訊息沒有指出該目錄,請在 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 參考資料中查詢其預設位置。對於 `EDQUOT`,請刪除計入您自己配額的檔案。對於 `out of inodes`,請刪除大量檔案,而不是少數幾個大型檔案,因為無論大小,每個檔案都會佔用一個 inode
4467* 或者,將 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 設為位於有空間之檔案系統上的目錄,然後重新啟動 Claude Code4612* 或者,將 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 設為位於有空間之檔案系統上的目錄,然後重新啟動 Claude Code
4468* 接著讓 Claude 再次執行該命令。它先前印出的輸出已遺失,而不是被截斷4613* 接著讓 Claude 再次執行該命令
4614
4615在 v2.1.305 之前,Claude Code 因磁碟已滿而無法啟動的命令,只會傳回作業系統的錯誤文字。該文字的內容例如 `ENOSPC: no space left on device, open <path>.output`。
4469 4616
4470### File is not valid UTF-84617### File is not valid UTF-8
4471 4618
4524* 在 Windows 上,若要讓 Claude 直接從共用資料夾發佈,請將其對應至磁碟機代號,並在啟動 Claude Code 時傳入該磁碟機。例如在 PowerShell 中,執行 `net use Z: \\server\share`,然後執行 `claude --add-dir Z:\`。Claude 便可以從該磁碟機發佈檔案。在工作階段進行中以 `/add-dir` 新增該磁碟機是不夠的。4671* 在 Windows 上,若要讓 Claude 直接從共用資料夾發佈,請將其對應至磁碟機代號,並在啟動 Claude Code 時傳入該磁碟機。例如在 PowerShell 中,執行 `net use Z: \\server\share`,然後執行 `claude --add-dir Z:\`。Claude 便可以從該磁碟機發佈檔案。在工作階段進行中以 `/add-dir` 新增該磁碟機是不夠的。
4525* 在 macOS 或 Linux 上,將共用資料夾掛載至某個目錄,例如 `/mnt` 或 `/Volumes` 下的目錄,並從該路徑發佈,而非從自動掛載路徑發佈4672* 在 macOS 或 Linux 上,將共用資料夾掛載至某個目錄,例如 `/mnt` 或 `/Volumes` 下的目錄,並從該路徑發佈,而非從自動掛載路徑發佈
4526 4673
4674### Not published: Claude sent the same content again after a newer version of the artifact turned it away
4675
4676Artifact 呼叫下方的這行紅字表示 Claude Code 阻止了一次重複的發佈:[artifact](/docs/zh-TW/artifacts) 並未更新,Claude 用來發佈的檔案也沒有寫入任何內容。除非 Claude 在未發佈的情況下停止,否則您無需採取任何動作。
4677
4678在工作階段稍早,Claude Code 因為該 artifact 有較新的版本而拒絕了一次發佈,例如由 [編輯者](/docs/zh-TW/artifacts#let-someone-edit-with-you) 或您的另一個工作階段所發佈的版本。這一行的結尾會說明 Claude 接下來必須做什麼:
4679
4680```text wrap theme={null}
4681Not published: Claude sent the same content again after a newer version of the artifact turned it away. Claude needs to work from that newer version first.
4682Not published: Claude sent the same content again after a newer version of the artifact turned it away. The artifact hasn't changed since, so publishing it once more should go through.
4683Not published: Claude sent its changes again over the same file after a newer version of the artifact turned them away. Claude needs to work from that newer version first.
4684Not published: Claude sent its changes again over the same file after a newer version of the artifact turned them away. The artifact hasn't changed since, so publishing once more should go through.
4685```
4686
4687**處理方式:**
4688
4689* **結尾為 `Claude needs to work from that newer version first`**:如果 Claude 在此停止,請要求它擷取該 artifact 的目前版本、將其變更合併進去,然後再次發佈
4690* **結尾為 `should go through`**:如果 Claude 在此停止,請要求它再次發佈
4691
4527### Reading a local file from outside the connected folders in a Cowork session4692### Reading a local file from outside the connected folders in a Cowork session
4528 4693
4529在 Claude Desktop 應用程式中於您的機器上執行的 [Cowork](https://claude.com/docs/cowork/overview) 工作階段裡,Claude 為 [artifact](/docs/zh-TW/artifacts) 指定了一個本機檔案。Claude Code 無法確認該檔案是位於工作階段已連接資料夾內的一般檔案:該路徑位於這些資料夾之外、經過符號連結,或其寫法可能指向與表面上不同的檔案。讀取這類檔案需要您的核准,而在無法向您顯示核准卡片的工作階段中(例如設定為略過所有核准的工作階段),Claude Code 會拒絕該讀取。4694在 Claude Desktop 應用程式中於您的機器上執行的 [Cowork](https://claude.com/docs/cowork/overview) 工作階段裡,Claude 為 [artifact](/docs/zh-TW/artifacts) 指定了一個本機檔案。Claude Code 無法確認該檔案是位於工作階段已連接資料夾內的一般檔案:該路徑位於這些資料夾之外、經過符號連結,或其寫法可能指向與表面上不同的檔案。讀取這類檔案需要您的核准,而在無法向您顯示核准卡片的工作階段中(例如設定為略過所有核准的工作階段),Claude Code 會拒絕該讀取。
4816* 若要繼續迴圈,請[回覆該工作階段](/docs/zh-TW/agent-view#peek-and-reply)並如此說明,例如 `keep the loop running`。Claude 會連同您的回覆一起讀取通知,並可以排程下一次喚醒4981* 若要繼續迴圈,請[回覆該工作階段](/docs/zh-TW/agent-view#peek-and-reply)並如此說明,例如 `keep the loop running`。Claude 會連同您的回覆一起讀取通知,並可以排程下一次喚醒
4817* 如果您已不需要該迴圈,則什麼都不用做。它已經停止4982* 如果您已不需要該迴圈,則什麼都不用做。它已經停止
4818 4983
4984### No LLM gateway: a gateway set in your shell isn't passed to a session opened from another folder
4985
4986顯示此訊息的[背景工作階段](/docs/zh-TW/agent-view)並未使用您的 [LLM 閘道](/docs/zh-TW/llm-gateway):它沒有取得閘道的位址,因此其請求會失敗。此訊息會出現在對話中取代 Claude 的回覆,並填入您工作階段的 ID 和資料夾:
4987
4988```text wrap theme={null}
4989No LLM gateway: a gateway set in your shell isn't passed to a session opened from another folder. To fix, run `claude respawn abc12345` from ~/project in another terminal where your gateway is set, or set ANTHROPIC_BASE_URL and its API key or token in a settings file's env block.
4990```
4991
4992當您附加到該工作階段時,其提示字元下方的通知會顯示簡短形式 `No LLM gateway: opened from another folder · respawn from ~/project`。
4993
4994您在 `ANTHROPIC_BASE_URL` 設定為您的閘道時,從訊息所指資料夾以外的資料夾分派、喚醒或重新啟動了該工作階段。關於在 shell 中匯出的閘道確實會傳遞到背景工作階段的情況,請參閱 [LLM 閘道](/docs/zh-TW/agent-view#llm-gateway)。
4995
4996**該怎麼做:**
4997
4998* **您在設定檔中設定了閘道的專案中使用 agent 檢視**:將 `ANTHROPIC_BASE_URL` 及其 API 金鑰或 token 放入[設定檔的 `env` 區塊](/docs/zh-TW/llm-gateway-connect#set-in-a-settings-file)。請使用 `~/.claude/settings.json`,或工作階段自身專案中的 `.claude/settings.local.json`,重新產生的工作階段都會讀取這兩者。然後從任何資料夾在您的 shell 中執行 `claude respawn <id>`。
4999* **您在終端機中匯出了閘道**:在已匯出閘道變數的終端機中,`cd` 到訊息所指的資料夾,並執行訊息中的 `claude respawn <id>` 命令。工作階段會從其已儲存的對話重新啟動。
5000 * 只有當 [supervisor](/docs/zh-TW/agent-view#the-supervisor-process) 本身是從匯出了相同閘道的 shell 啟動時,閘道才會傳遞到工作階段。如果 supervisor 不是如此,請依照 [Dispatch fails with `Could not resolve authentication method`](/docs/zh-TW/agent-view#dispatch-fails-with-could-not-resolve-authentication-method) 所述,從該終端機重新啟動它,然後再次執行 respawn 命令。
5001
5002在 v2.1.302 之前,處於此情況的背景工作階段會改為顯示登入錯誤,例如 [`Not logged in · Please run /login`](#not-logged-in),且不會指出資料夾。
5003
4819### CLAUDE\_CODE\_PROCESS\_WRAPPER 啟動器錯誤5004### CLAUDE\_CODE\_PROCESS\_WRAPPER 啟動器錯誤
4820 5005
4821[`CLAUDE_CODE_PROCESS_WRAPPER`](/docs/zh-TW/corporate-launcher) 已設定,但其值無法使用,因此 Claude Code 拒絕啟動受影響的程序,而不是在沒有啟動器的情況下執行它。設定問題會以變數名稱開頭並說明原因的訊息報告,例如:5006[`CLAUDE_CODE_PROCESS_WRAPPER`](/docs/zh-TW/corporate-launcher) 已設定,但其值無法使用,因此 Claude Code 拒絕啟動受影響的程序,而不是在沒有啟動器的情況下執行它。設定問題會以變數名稱開頭並說明原因的訊息報告,例如:
5094 5279
5095## 設定警告5280## 設定警告
5096 5281
5097Claude Code 會將這些訊息大多寫入 stderr,而非寫入對話中,且大多在啟動時寫入。若某個項目的訊息出現在其他位置(例如除錯日誌中,或在對話檢視中作為啟動通知),或出現在其他時間點(例如在請求時出現的[無法辨識模型診斷行](#unrecognized-model-id-on-a-request)),該項目會加以說明。5282若要找出 Claude Code 在互動式工作階段啟動時發出的警告,請先查看啟動橫幅下方,再查看除錯日誌:
5283
5284* **啟動橫幅下方的列**:部分關於[權限規則](/docs/zh-TW/permissions)的警告,例如 [`⚠ Deny rule Bsh matches no tool · check for typos`](#matches-no-tool)
5285* **除錯日誌**:Claude Code 只會在除錯模式下保留此日誌。若要閱讀其中的警告,請從您的 shell 以 `claude --debug-file <path>` 啟動 Claude Code,然後開啟該路徑上的檔案。
5286
5287在使用文字輸出的[非互動模式](/docs/zh-TW/headless)下,且不在[背景工作階段](/docs/zh-TW/agent-view)中時,請在 stderr 上查看啟動警告。
5288
5289在 v2.1.305 之前,互動式工作階段中也請查看 stderr,包括現在以橫幅下方列顯示的權限規則警告。
5098 5290
5099### Claude Code exited after an unrecoverable interface error5291### Claude Code exited after an unrecoverable interface error
5100 5292
5214 5406
5215### 工作目錄是網路路徑5407### 工作目錄是網路路徑
5216 5408
5217Claude Code 不會將網路路徑加入為工作目錄。查詢網路路徑可能會連線到其所指定的主機,而在 Windows 上,該連線可能會將您的憑證傳送給該主機,因此 Claude Code 會在不查詢的情況下直接拒絕該路徑。當您以此類路徑執行 `/add-dir` 時,或在啟動時以警告形式,您會看到此訊息。若在啟動時出現,Claude Code 會在不包含該目錄的情況下啟動。5409Claude Code 不會將網路路徑加入為工作目錄。查詢網路路徑可能會連線到其所指定的主機,而在 Windows 上,該連線可能會將您的憑證傳送給該主機。因此 Claude Code 會在不查詢的情況下直接拒絕該路徑。
5410
5411當您以網路路徑執行 `/add-dir` 時,會看到此訊息:
5218 5412
5219```text theme={null}5413```text theme={null}
5220\\server\share is a network path, which cannot be added as a working directory. On Windows, map the share to a drive letter and pass it at launch with --add-dir (a drive letter added mid-session does not yet carry remote-read trust).5414\\server\share is a network path, which cannot be added as a working directory. On Windows, map the share to a drive letter and pass it at launch with --add-dir (a drive letter added mid-session does not yet carry remote-read trust).
5221```5415```
5222 5416
5417若您改為在啟動時傳入網路路徑(使用 `--add-dir` 或在 `permissions.additionalDirectories` 中),Claude Code 會在不包含該目錄的情況下啟動。在互動式工作階段中,您不會在啟動時看到此訊息,因為它會與其他[啟動警告](#configuration-warnings)一起寫入除錯日誌。
5418
5223Claude Code 以此方式拒絕的路徑包括:5419Claude Code 以此方式拒絕的路徑包括:
5224 5420
5225* UNC 共用,例如 `\\server\share`5421* UNC 共用,例如 `\\server\share`
5465 5661
5466在 v2.1.260 之前,Claude Code 會將括號不成對的規則回報為 `Mismatched parentheses`。5662在 v2.1.260 之前,Claude Code 會將括號不成對的規則回報為 `Mismatched parentheses`。
5467 5663
5468### Is not matched by file permission checks5664### Matches no tool · check for typos
5665
5666啟動橫幅下方的這一列會指出某條拒絕或詢問[權限規則](/docs/zh-TW/permissions),其工具名稱是 Claude Code 無法辨識的,因此該規則不會套用到您原本想指定的工具。寫成 `Bsh` 的拒絕規則不會套用到 Bash;使用工具在逐字稿中顯示的標籤、而非其正式名稱的規則也是如此。此列會重複顯示您所寫的規則:
5667
5668```text theme={null}
5669⚠ Deny rule Bsh matches no tool · check for typos
5670```
5469 5671
5470Claude Code 在您的某個[設定檔](/docs/zh-TW/settings#where-settings-live)、[受管設定](/docs/zh-TW/managed-settings),或 `--allowedTools`、`--disallowedTools` 或 `--settings` 旗標值中,找到了帶有路徑的 `Write`、`NotebookEdit`、`MultiEdit` 或 `Glob` [權限規則](/docs/zh-TW/permissions#read-and-edit)。它只會依據 `Edit` 和 `Read` 規則檢查檔案權限,因此永遠不會參考指定其他檔案工具的路徑規則。它會保留該規則,不做其他變更;警告會列出該規則、括號中的來源,以及應改寫成的替代寫法:5672在使用文字輸出的[非互動模式](/docs/zh-TW/headless)下,Claude Code 會改為在 stderr 上印出較長形式的警告:
5471 5673
5472```text theme={null}5674```text theme={null}
5473Permission deny rule (.claude/settings.json): Write(docs/**) is not matched by file permission checks — only Edit(path) rules are. Use Edit(docs/**) instead (Edit rules cover all file-editing tools).5675Permission deny rule "Bsh" matches no known tool — check for typos.
5474```5676```
5475 5677
5476**處理方式:**5678**處理方式:**
5477 5679
5680* 修正規則中的工具名稱,例如以 `Bash` 取代 `Bsh`。請在[工具參考](/docs/zh-TW/tools-reference)中查詢正式名稱。
5681* 若要找出規則的定義位置,請在工作階段中執行 `/permissions` 並選取該規則。其詳細資訊會說明規則的來源,例如 `From project local settings`,或對於 `--disallowedTools` 值則為 `From CLI argument`。
5682* 若詳細資訊顯示 `From enterprise managed settings`,請將此列轉給負責維護您[受管設定](/docs/zh-TW/managed-settings)的人員,因為您無法自行變更該規則。
5683
5684在[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,Claude Code 會將警告寫入除錯日誌而非 stderr。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。
5685
5686在 v2.1.305 之前,互動式工作階段會在啟動時於 stderr 上印出較長形式,而非顯示此列。
5687
5688### Is not matched by file permission checks
5689
5690Claude Code 在您的某個[設定檔](/docs/zh-TW/settings#where-settings-live)、[受管設定](/docs/zh-TW/managed-settings),或 `--allowedTools`、`--disallowedTools` 或 `--settings` 旗標值中,找到了帶有路徑的 `Write`、`NotebookEdit`、`MultiEdit` 或 `Glob` [權限規則](/docs/zh-TW/permissions#read-and-edit)。它只會依據 `Edit` 和 `Read` 規則檢查檔案權限,因此永遠不會參考指定其他檔案工具的路徑規則。它會保留該規則,不做其他變更。
5691
5692* **互動式工作階段**:完整警告會寫入[除錯日誌](#configuration-warnings),而此形式的拒絕或詢問規則也會以這一列顯示在啟動橫幅下方:
5693
5694 ```text theme={null}
5695 ⚠ Deny rule Write(docs/**) never matches · use Edit(docs/**)
5696 ```
5697
5698 此形式的允許規則不會顯示列。若要找出規則的定義位置,請在工作階段中執行 `/permissions` 並選取該規則。
5699* **使用文字輸出的[非互動模式](/docs/zh-TW/headless)**:stderr 上的完整警告會列出該規則、括號中的來源,以及應改寫成的替代寫法:
5700
5701 ```text theme={null}
5702 Permission deny rule (.claude/settings.json): Write(docs/**) is not matched by file permission checks — only Edit(path) rules are. Use Edit(docs/**) instead (Edit rules cover all file-editing tools).
5703 ```
5704* **[背景工作階段](/docs/zh-TW/agent-view),或使用 `--output-format json` 或 `stream-json` 時**:完整警告會寫入除錯日誌而非 stderr,以保持機器讀取的輸出乾淨。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。
5705
5706**處理方式:**
5707
5478* 將 `Write(path)`、`NotebookEdit(path)` 及舊版的 `MultiEdit(path)` 規則替換為 `Edit(path)`。`Edit` 規則涵蓋所有檔案編輯工具。5708* 將 `Write(path)`、`NotebookEdit(path)` 及舊版的 `MultiEdit(path)` 規則替換為 `Edit(path)`。`Edit` 規則涵蓋所有檔案編輯工具。
5479* 除了在 `--allowedTools` 中(Claude Code 在此接受 `Glob` 規則且不會發出警告)之外,請將 `Glob(path)` 規則替換為 `Read(path)`。5709* 除了在 `--allowedTools` 中(Claude Code 在此接受 `Glob` 規則且不會發出警告)之外,請將 `Glob(path)` 規則替換為 `Read(path)`。
5480* 在警告括號中所指的來源修正規則:設定檔路徑,或對於 `--allowed-tools` 和 `--disallowed-tools` 則是旗標本身。磁碟上不存在的 `claude-settings-<hash>.json` 路徑代表的是內嵌的 `--settings` 值。請修正您傳給該旗標的 JSON。5710* 在完整警告括號中所指的來源修正規則:設定檔路徑,或對於 `--allowed-tools` 和 `--disallowed-tools` 則是旗標本身。磁碟上不存在的 `claude-settings-<hash>.json` 路徑代表的是內嵌的 `--settings` 值。請修正您傳給該旗標的 JSON。
5481* 像 `Write` 或 `Glob` 這類僅有工具名稱的規則保持不變即可。Claude Code 會在[工具層級](/docs/zh-TW/permissions#match-all-uses-of-a-tool)比對它們,且不會對其發出警告。5711* 像 `Write` 或 `Glob` 這類僅有工具名稱的規則保持不變即可。Claude Code 會在[工具層級](/docs/zh-TW/permissions#match-all-uses-of-a-tool)比對它們,且不會對其發出警告。
5482* 若來源顯示為 `managed policy settings`,請將警告轉給負責維護受管設定的人員,因為您無法自行消除它。5712* 對於來自受管設定的規則,完整警告的括號內容會顯示 `managed policy settings`,而 `/permissions` 中該規則的詳細資訊會顯示 `From enterprise managed settings`。請將該警告轉給負責維護受管設定的人員,因為您無法自行消除它。
5483 5713
5484在[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,Claude Code 會將警告寫入除錯日誌而非 stderr,以保持機器讀取的輸出乾淨。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。在 v2.1.210 之前,Claude Code 會接受這些規則而不發出警告。5714在 v2.1.210 之前,Claude Code 會接受這些規則而不發出警告。在 v2.1.305 之前,互動式工作階段會在 stderr 上印出完整警告。
5485 5715
5486### Has a wildcard before the rest of the command5716### Has a wildcard before the rest of the command
5487 5717
5488Claude Code 在您的某個[設定檔](/docs/zh-TW/settings#where-settings-live)、[受管設定](/docs/zh-TW/managed-settings),或 `--allowedTools` 或 `--settings` 旗標值中,找到了一條 `Bash` 允許規則,其 `*` 出現在決定命令為何的後續字詞之前,例如 `Bash(git * main)` 或 `Bash(git -C * status *)`。`*` 會比對任何文字,包括插入在該位置的選項:`Bash(git * main)` 也會核准 `git -c core.fsmonitor=<script> diff main`,其中 `-c` 會讓 git 執行命令中所指定的程式。[萬用字元模式](/docs/zh-TW/permissions#wildcard-patterns)說明了比對規則。5718Claude Code 在您的某個[設定檔](/docs/zh-TW/settings#where-settings-live)、[受管設定](/docs/zh-TW/managed-settings),或 `--allowedTools` 或 `--settings` 旗標值中,找到了一條 `Bash` 允許規則,其 `*` 出現在決定命令為何的後續字詞之前,例如 `Bash(git * main)` 或 `Bash(git -C * status *)`。`*` 會比對任何文字,包括插入在該位置的選項:`Bash(git * main)` 也會核准 `git -c core.fsmonitor=<script> diff main`,其中 `-c` 會讓 git 執行命令中所指定的程式。[萬用字元模式](/docs/zh-TW/permissions#wildcard-patterns)說明了比對規則。
5489 5719
5490此警告的目的是讓您能縮小萬用字元範圍比預期更廣的規則。Claude Code 會保留該規則,且不會改變其比對方式;警告會列出該規則及括號中的來源:5720此警告的目的是讓您能縮小萬用字元範圍比預期更廣的規則。Claude Code 會保留該規則,且不會改變其比對方式。在使用文字輸出的[非互動模式](/docs/zh-TW/headless)下,stderr 上的警告會列出該規則及括號中的來源:
5491 5721
5492```text theme={null}5722```text theme={null}
5493Permission allow rule (.claude/settings.json): Bash(git -C * status *) has a wildcard before the rest of the command, so it also matches any options inserted at that position and approves them without a prompt. For git, options such as -c and --exec-path can run arbitrary commands. Replace that * with the exact value you mean, or only use * after the subcommand (for example Bash(git status *)).5723Permission allow rule (.claude/settings.json): Bash(git -C * status *) has a wildcard before the rest of the command, so it also matches any options inserted at that position and approves them without a prompt. For git, options such as -c and --exec-path can run arbitrary commands. Replace that * with the exact value you mean, or only use * after the subcommand (for example Bash(git status *)).
5494```5724```
5495 5725
5726在互動式工作階段中,完整警告會寫入[除錯日誌](#configuration-warnings),而該規則會以這一列顯示在啟動橫幅下方:
5727
5728```text theme={null}
5729⚠ Allow rule Bash(git -C * status *) allows any option at its * · use an exact value
5730```
5731
5732若要找出規則的定義位置,請在工作階段中執行 `/permissions` 並選取該規則。
5733
5496**處理方式:**5734**處理方式:**
5497 5735
5498* 將子命令之前的 `*` 替換為您所指的確切值:以 `Bash(git checkout main)` 取代 `Bash(git * main)`。5736* 將子命令之前的 `*` 替換為您所指的確切值:以 `Bash(git checkout main)` 取代 `Bash(git * main)`。
5499* 將每個 `*` 移到子命令之後:以 `Bash(git status *)` 取代 `Bash(git -C * status *)`。為每個您想允許的子命令各寫一條規則。5737* 將每個 `*` 移到子命令之後:以 `Bash(git status *)` 取代 `Bash(git -C * status *)`。為每個您想允許的子命令各寫一條規則。
5500* 在警告括號中所指的來源修正規則:設定檔路徑,或 `--allowed-tools` 旗標本身。磁碟上不存在的 `claude-settings-<hash>.json` 路徑代表的是內嵌的 `--settings` 值。請修正您傳給該旗標的 JSON。5738* 在完整警告括號中所指的來源修正規則:設定檔路徑,或 `--allowed-tools` 旗標本身。磁碟上不存在的 `claude-settings-<hash>.json` 路徑代表的是內嵌的 `--settings` 值。請修正您傳給該旗標的 JSON。
5501* 若來源顯示為 `managed policy settings`,請將警告轉給負責維護受管設定的人員,因為您無法自行消除它。5739* 對於來自受管設定的規則,完整警告的括號內容會顯示 `managed policy settings`,而 `/permissions` 中該規則的詳細資訊會顯示 `From enterprise managed settings`。請將該警告轉給負責維護受管設定的人員,因為您無法自行消除它。
5502 5740
5503在[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,Claude Code 會將警告寫入除錯日誌而非 stderr,以保持機器讀取的輸出乾淨。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。在 v2.1.246 之前,Claude Code 會接受這些規則而不發出警告。5741在[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,Claude Code 會將警告寫入除錯日誌而非 stderr,以保持機器讀取的輸出乾淨。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。在 v2.1.246 之前,Claude Code 會接受這些規則而不發出警告。
5504 5742
5743在 v2.1.305 之前,互動式工作階段會在 stderr 上印出完整警告,而非顯示列。
5744
5505### Denying Bash also turns off the PowerShell tool5745### Denying Bash also turns off the PowerShell tool
5506 5746
5507您移除了整個 Bash 工具,例如使用 `--disallowedTools Bash`,或在某個設定檔中使用僅有 `Bash` 或 `Bash(*)` 的[拒絕規則](/docs/zh-TW/permissions#match-all-uses-of-a-tool)。在安裝了 Git Bash 的 Windows 上,[拒絕 Bash 也會關閉 PowerShell 工具](/docs/zh-TW/tools-reference#bash-deny-rules-also-turn-off-the-powershell-tool),因此工作階段啟動時不會有任何 shell 工具。Claude Code 會在啟動時印出此警告:5747您移除了整個 Bash 工具,例如使用 `--disallowedTools Bash`,或在某個設定檔中使用僅有 `Bash` 或 `Bash(*)` 的[拒絕規則](/docs/zh-TW/permissions#match-all-uses-of-a-tool)。在安裝了 Git Bash 的 Windows 上,[拒絕 Bash 也會關閉 PowerShell 工具](/docs/zh-TW/tools-reference#bash-deny-rules-also-turn-off-the-powershell-tool),因此工作階段啟動時不會有任何 shell 工具。
5748
5749在使用文字輸出的[非互動模式](/docs/zh-TW/headless)下,Claude Code 會在啟動時於 stderr 上印出此警告,而互動式工作階段只會將其寫入[除錯日誌](#configuration-warnings):
5508 5750
5509```text theme={null}5751```text theme={null}
5510Denying Bash also turns off the PowerShell tool, so Claude has neither. To use PowerShell, set CLAUDE_CODE_USE_POWERSHELL_TOOL=1.5752Denying Bash also turns off the PowerShell tool, so Claude has neither. To use PowerShell, set CLAUDE_CODE_USE_POWERSHELL_TOOL=1.
5517 5759
5518在[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,Claude Code 會將警告寫入除錯日誌而非 stderr。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。在 v2.1.287 之前,Claude Code 會以相同方式關閉 PowerShell 工具,但不會印出警告。5760在[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,Claude Code 會將警告寫入除錯日誌而非 stderr。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。在 v2.1.287 之前,Claude Code 會以相同方式關閉 PowerShell 工具,但不會印出警告。
5519 5761
5762在 v2.1.305 之前,互動式工作階段也會在啟動時於 stderr 上印出此警告。
5763
5520### crossSessionInbound must be one of accept, hold, refuse5764### crossSessionInbound must be one of accept, hold, refuse
5521 5765
5522某個設定檔將 [`crossSessionInbound`](/docs/zh-TW/settings-reference#crosssessioninbound) 設為 Claude Code 無法辨識的值,例如拼錯的 `"reject"`。警告的第二句取決於哪個檔案包含該值;在使用者、專案、本機或 `--settings` 檔案中,內容如下:5766某個設定檔將 [`crossSessionInbound`](/docs/zh-TW/settings-reference#crosssessioninbound) 設為 Claude Code 無法辨識的值,例如拼錯的 `"reject"`。警告的第二句取決於哪個檔案包含該值;在使用者、專案、本機或 `--settings` 檔案中,內容如下:
5566* 若訊息提及此版本無法辨識的模型 ID,請執行 `claude update`。能將該 ID 辨識為 1M 上下文模型的版本,無需額外設定即可強制執行該上限。5810* 若訊息提及此版本無法辨識的模型 ID,請執行 `claude update`。能將該 ID 辨識為 1M 上下文模型的版本,無需額外設定即可強制執行該上限。
5567* 若您希望工作階段改為使用模型的完整視窗,請取消設定 `CLAUDE_CODE_DISABLE_1M_CONTEXT`;此警告只是回報 200K 上限未被強制執行5811* 若您希望工作階段改為使用模型的完整視窗,請取消設定 `CLAUDE_CODE_DISABLE_1M_CONTEXT`;此警告只是回報 200K 上限未被強制執行
5568 5812
5569在[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,Claude Code 會將警告寫入除錯日誌而非 stderr。5813在使用文字輸出的[非互動模式](/docs/zh-TW/headless)下,此警告會出現在 stderr 上。在互動式工作階段、[背景工作階段](/docs/zh-TW/agent-view)中,或使用 `--output-format json` 或 `stream-json` 時,它會改為寫入除錯日誌。使用 `--debug` 執行即可在 `~/.claude/debug/<session-id>.txt` 中擷取它。
5814
5815在 v2.1.305 之前,互動式工作階段會在啟動時於 stderr 上印出此警告。
5570 5816
5571### 請求中包含無法辨識的模型 ID5817### 請求中包含無法辨識的模型 ID
5572 5818
5678如果此處未列出錯誤或建議的修正方法無法幫助:5924如果此處未列出錯誤或建議的修正方法無法幫助:
5679 5925
5680* 在 Claude Code 內執行 `/feedback` 以將文字記錄和說明傳送給 Anthropic。該命令也提供開啟預先填入的 GitHub issue 的選項。傳送給 Anthropic 需要[驗證](/docs/zh-TW/authentication)。在 Amazon Bedrock、Google Cloud 的 Agent Platform、Microsoft Foundry 和其他第三方提供者上,或當未設定 Anthropic 認證時,`/feedback` 會儲存本機封存,您可以改為傳送給您的 Anthropic 帳戶代表。5926* 在 Claude Code 內執行 `/feedback` 以將文字記錄和說明傳送給 Anthropic。該命令也提供開啟預先填入的 GitHub issue 的選項。傳送給 Anthropic 需要[驗證](/docs/zh-TW/authentication)。在 Amazon Bedrock、Google Cloud 的 Agent Platform、Microsoft Foundry 和其他第三方提供者上,或當未設定 Anthropic 認證時,`/feedback` 會儲存本機封存,您可以改為傳送給您的 Anthropic 帳戶代表。
5927* 如果 `/feedback` 回應它已被您組織的政策停用,請參閱[該訊息的條目](#feedback-is-disabled-by-your-organizations-policy)
5681* 從您的 shell 執行 `claude doctor` 以進行安裝的唯讀診斷,或在 Claude Code 內執行 `/doctor` 檢查以尋找並修正設定問題5928* 從您的 shell 執行 `claude doctor` 以進行安裝的唯讀診斷,或在 Claude Code 內執行 `/doctor` 檢查以尋找並修正設定問題
5682* 檢查 [status.claude.com](https://status.claude.com) 以了解活躍的事件5929* 檢查 [status.claude.com](https://status.claude.com) 以了解活躍的事件
5683* 在 GitHub 上搜尋[現有 issue](https://github.com/anthropics/claude-code/issues)5930* 在 GitHub 上搜尋[現有 issue](https://github.com/anthropics/claude-code/issues)