24| :- | :- |24| :- | :- |
25| `API Error: 500 Internal server error` | [伺服器錯誤](#api-error-500-internal-server-error) |25| `API Error: 500 Internal server error` | [伺服器錯誤](#api-error-500-internal-server-error) |
26| `API Error: Repeated 529 Overloaded errors` | [伺服器錯誤](#api-error-repeated-529-overloaded-errors) |26| `API Error: Repeated 529 Overloaded errors` | [伺服器錯誤](#api-error-repeated-529-overloaded-errors) |
27| `Request timed out` | [伺服器錯誤](#request-timed-out),或如果訊息提及您的網際網路連線,則為[網路](#unable-to-connect-to-api) |27| `Opus is experiencing high load` / `Fable is experiencing high load` | [伺服器錯誤](#api-error-repeated-529-overloaded-errors) |
28| `Request timed out` | [伺服器錯誤](#request-timed-out),或如果訊息提及您的網路連線,則為[網路](#unable-to-connect-to-api) |
28| `API Error: No response from API` | [伺服器錯誤](#no-response-from-api) |29| `API Error: No response from API` | [伺服器錯誤](#no-response-from-api) |
29| `Server error mid-response. The response above may be incomplete.` | [伺服器錯誤](#the-response-above-may-be-incomplete) |30| `Server error mid-response. The response above may be incomplete.` | [伺服器錯誤](#the-response-above-may-be-incomplete) |
30| `Connection lost mid-response` / `Your computer went to sleep mid-response` / `The response stopped arriving` | [伺服器錯誤](#the-response-above-may-be-incomplete) |31| `Connection lost mid-response` / `Your computer went to sleep mid-response` / `The response stopped arriving` | [伺服器錯誤](#the-response-above-may-be-incomplete) |
31| `Connection closed mid-response` / `Response stalled mid-stream` | [伺服器錯誤](#the-response-above-may-be-incomplete) |32| `Connection closed mid-response` / `Response stalled mid-stream` | [伺服器錯誤](#the-response-above-may-be-incomplete) |
33| `Part of the response never arrived` / `The response stream was malformed` | [伺服器錯誤](#the-response-above-may-be-incomplete) |
34| `API Error: Content block not found` / `API Error: Content block already closed` / `API Error: Stream event unreadable` | [伺服器錯誤](#the-response-above-may-be-incomplete) |
32| `Connection lost before a response was produced` / `Your computer went to sleep before a response was produced` / `The response stalled before a response was produced` | [自動重試](#automatic-retries) |35| `Connection lost before a response was produced` / `Your computer went to sleep before a response was produced` / `The response stalled before a response was produced` | [自動重試](#automatic-retries) |
33| `Connection closed while thinking` / `Response stalled while thinking` | [自動重試](#automatic-retries) |36| `Connection closed while thinking` / `Response stalled while thinking` | [自動重試](#automatic-retries) |
34| `Connection lost while your computer was asleep` | [自動重試](#automatic-retries) |37| `Connection lost while your computer was asleep` | [自動重試](#automatic-retries) |
49| `Could not update your spend limit` | [使用限制](#could-not-update-your-spend-limit) |52| `Could not update your spend limit` | [使用限制](#could-not-update-your-spend-limit) |
50| `spend limit reached` / `spend limit unavailable` | [使用限制](#spend-limit-reached) |53| `spend limit reached` / `spend limit unavailable` | [使用限制](#spend-limit-reached) |
51| `Not logged in · Please run /login` | [驗證](#not-logged-in) |54| `Not logged in · Please run /login` | [驗證](#not-logged-in) |
55| `Couldn't save your login` | [驗證](#couldnt-save-your-login) |
56| `Authentication required · Sign in again to continue` | [驗證](#not-logged-in) |
52| `Could not resolve authentication method` | [驗證](#could-not-resolve-authentication-method) |57| `Could not resolve authentication method` | [驗證](#could-not-resolve-authentication-method) |
53| `Invalid API key` | [驗證](#invalid-api-key) |58| `Invalid API key` | [驗證](#invalid-api-key) |
54| `Your apiKeyHelper script is failing` | [驗證](#your-apikeyhelper-script-is-failing) |59| `Your apiKeyHelper script is failing` | [驗證](#your-apikeyhelper-script-is-failing) |
69| `signed-in claude.ai account or organization changed on this machine` | [驗證](#remote-control-stopped-because-the-signed-in-account-changed) |74| `signed-in claude.ai account or organization changed on this machine` | [驗證](#remote-control-stopped-because-the-signed-in-account-changed) |
70| `Remote Control stopped — the app running this session is now signed in to a different Claude account` | [驗證](#remote-control-stopped-because-the-app-running-the-session-signed-out-or-switched-accounts) |75| `Remote Control stopped — the app running this session is now signed in to a different Claude account` | [驗證](#remote-control-stopped-because-the-app-running-the-session-signed-out-or-switched-accounts) |
71| `Remote Control stopped — the app running this session is signed out of Claude` | [驗證](#remote-control-stopped-because-the-app-running-the-session-signed-out-or-switched-accounts) |76| `Remote Control stopped — the app running this session is signed out of Claude` | [驗證](#remote-control-stopped-because-the-app-running-the-session-signed-out-or-switched-accounts) |
77| `Couldn't verify your organization's policy for remote control` | [疑難排解 Remote Control](/docs/zh-TW/remote-control#couldnt-verify-your-organizations-policy-for-remote-control) |
72| `OAuth token revoked` / `OAuth token has expired` | [驗證](#oauth-token-revoked-or-expired) |78| `OAuth token revoked` / `OAuth token has expired` | [驗證](#oauth-token-revoked-or-expired) |
73| `API Error: 401 Invalid authentication credentials` | [驗證](#api-error-401-invalid-authentication-credentials) |79| `API Error: 401 Invalid authentication credentials` | [驗證](#api-error-401-invalid-authentication-credentials) |
74| `Login expired · Please run /login` | [驗證](#login-expired) |80| `Login expired · Please run /login` | [驗證](#login-expired) |
77| `Not signed in to the Cloud gateway — run /login.` | [驗證](#administrator-policy-requires-a-cloud-gateway-sign-in) |83| `Not signed in to the Cloud gateway — run /login.` | [驗證](#administrator-policy-requires-a-cloud-gateway-sign-in) |
78| `Administrator policy requires a Cloud gateway sign-in on this machine` | [驗證](#administrator-policy-requires-a-cloud-gateway-sign-in) |84| `Administrator policy requires a Cloud gateway sign-in on this machine` | [驗證](#administrator-policy-requires-a-cloud-gateway-sign-in) |
79| `Failed to authenticate: OAuth session expired and could not be refreshed` | [驗證](#login-expired) |85| `Failed to authenticate: OAuth session expired and could not be refreshed` | [驗證](#login-expired) |
86| `Could not refresh your login because another Claude Code process is refreshing it` | [驗證](#could-not-refresh-your-login) |
87| `Failed to refresh OAuth token: another Claude Code process is refreshing it or exited mid-refresh` | [驗證](#could-not-refresh-your-login) |
80| `Your account is on hold and can't use Claude Code. View details or appeal: https://claude.ai/restricted` | [驗證](#your-account-is-on-hold) |88| `Your account is on hold and can't use Claude Code. View details or appeal: https://claude.ai/restricted` | [驗證](#your-account-is-on-hold) |
81| `Your account is on hold and can't sign in to Claude Code. View details or appeal: https://claude.ai/restricted` | [驗證](#your-account-is-on-hold) |89| `Your account is on hold and can't sign in to Claude Code. View details or appeal: https://claude.ai/restricted` | [驗證](#your-account-is-on-hold) |
82| `Anthropic profile login expired · Re-authenticate your Anthropic profile` | [驗證](#anthropic-profile-login-expired) |90| `Anthropic profile login expired · Re-authenticate your Anthropic profile` | [驗證](#anthropic-profile-login-expired) |
120| `Couldn't reconnect to your Remote Control session` | [網路](#couldnt-reconnect-to-your-remote-control-session) |128| `Couldn't reconnect to your Remote Control session` | [網路](#couldnt-reconnect-to-your-remote-control-session) |
121| `N sessions ended while this machine was offline — the environment was cleaned up on the server and can't be resumed.` | [網路](#sessions-ended-while-this-machine-was-offline) |129| `N sessions ended while this machine was offline — the environment was cleaned up on the server and can't be resumed.` | [網路](#sessions-ended-while-this-machine-was-offline) |
122| `Couldn't share the transcript.` | [網路](#couldnt-share-the-transcript) |130| `Couldn't share the transcript.` | [網路](#couldnt-share-the-transcript) |
131| `Couldn't send feedback` | [網路](#couldnt-send-feedback) |
123| `Prompt is too long` / `Input is too long for requested model` | [請求錯誤](#prompt-is-too-long) |132| `Prompt is too long` / `Input is too long for requested model` | [請求錯誤](#prompt-is-too-long) |
124| `Prompt is too long · automatic compaction failed:` | [請求錯誤](#prompt-is-too-long) |133| `Prompt is too long · automatic compaction failed:` | [請求錯誤](#prompt-is-too-long) |
125| `Prompt is too long · this conversation is a single exchange` / `A single-exchange conversation cannot be compacted` | [請求錯誤](#prompt-is-too-long) |134| `Prompt is too long · this conversation is a single exchange` / `A single-exchange conversation cannot be compacted` | [請求錯誤](#prompt-is-too-long) |
139| `PDF too large` / `PDF is password protected` | [請求錯誤](#pdf-errors) |148| `PDF too large` / `PDF is password protected` | [請求錯誤](#pdf-errors) |
140| `Extra inputs are not permitted` | [請求錯誤](#extra-inputs-are-not-permitted) |149| `Extra inputs are not permitted` | [請求錯誤](#extra-inputs-are-not-permitted) |
141| `API Error: 400 ... tools.N.custom.input_schema: JSON schema is invalid` / `Property keys should match pattern` | [請求錯誤](#tool-input-schema-is-invalid) |150| `API Error: 400 ... tools.N.custom.input_schema: JSON schema is invalid` / `Property keys should match pattern` | [請求錯誤](#tool-input-schema-is-invalid) |
151| `tool_use.name: String should have at most 200 characters` | [請求錯誤](#tool-use-name-over-200-characters) |
142| `There's an issue with the selected model` | [請求錯誤](#theres-an-issue-with-the-selected-model) |152| `There's an issue with the selected model` | [請求錯誤](#theres-an-issue-with-the-selected-model) |
143| `Model ... is not a recognized model id` | [請求錯誤](#model-is-not-a-recognized-model-id) |153| `Model ... is not a recognized model id` | [請求錯誤](#model-is-not-a-recognized-model-id) |
144| `Model ... not found` | [請求錯誤](#model-not-found) |154| `Model ... not found` | [請求錯誤](#model-not-found) |
155| `API error: ... · model not changed` | [請求錯誤](#api-error-model-not-changed) |
145| `Claude Opus is not available with the Claude Pro plan` | [請求錯誤](#claude-opus-is-not-available-with-the-claude-pro-plan) |156| `Claude Opus is not available with the Claude Pro plan` | [請求錯誤](#claude-opus-is-not-available-with-the-claude-pro-plan) |
146| `Claude Code ... does not support this model; version ... or newer is required` | [請求錯誤](#claude-code-does-not-support-this-model) |157| `Claude Code ... does not support this model; version ... or newer is required` | [請求錯誤](#claude-code-does-not-support-this-model) |
147| `Claude Code ... is older than the minimum version required by your organization's policy` | [請求錯誤](#claude-code-does-not-support-this-model) |158| `Claude Code ... is older than the minimum version required by your organization's policy` | [請求錯誤](#claude-code-does-not-support-this-model) |
148| `Model ... is restricted by your organization's settings` | [請求錯誤](#model-is-restricted-by-your-organizations-settings) |159| `Model ... is restricted by your organization's settings` | [請求錯誤](#model-is-restricted-by-your-organizations-settings) |
160| `Model ... is not available. Your organization restricts model selection.` | [請求錯誤](#model-is-restricted-by-your-organizations-settings) |
149| `Model switch ... blocked by a PreModelSwitch hook` | [請求錯誤](#model-switch-was-blocked-by-a-premodelswitch-hook) |161| `Model switch ... blocked by a PreModelSwitch hook` | [請求錯誤](#model-switch-was-blocked-by-a-premodelswitch-hook) |
150| `couldn't save it as your default` / `couldn't confirm it was saved as your default` | [請求錯誤](#couldnt-save-it-as-your-default) |162| `couldn't save it as your default` / `couldn't confirm it was saved as your default` | [請求錯誤](#couldnt-save-it-as-your-default) |
151| `thinking.type.enabled is not supported for this model` | [請求錯誤](#thinking-type-enabled-is-not-supported-for-this-model) |163| `thinking.type.enabled is not supported for this model` | [請求錯誤](#thinking-type-enabled-is-not-supported-for-this-model) |
155| `API Error: 400 due to tool use concurrency issues` | [請求錯誤](#tool-use-or-thinking-block-mismatch) |167| `API Error: 400 due to tool use concurrency issues` | [請求錯誤](#tool-use-or-thinking-block-mismatch) |
156| `API Error: 400 orphaned tool_result in conversation history` | [請求錯誤](#tool-use-or-thinking-block-mismatch) |168| `API Error: 400 orphaned tool_result in conversation history` | [請求錯誤](#tool-use-or-thinking-block-mismatch) |
157| `API Error: 400 duplicate tool_use ID in conversation history` | [請求錯誤](#tool-use-or-thinking-block-mismatch) |169| `API Error: 400 duplicate tool_use ID in conversation history` | [請求錯誤](#tool-use-or-thinking-block-mismatch) |
170| `Invalid data in redacted_thinking block` | [請求錯誤](#invalid-data-in-redacted-thinking-block) |
158| `[Unsupported tool content removed]` | [請求錯誤](#unsupported-tool-content-removed) |171| `[Unsupported tool content removed]` | [請求錯誤](#unsupported-tool-content-removed) |
159| `role 'system' must precede an 'assistant' message` | [請求錯誤](#role-system-must-precede-an-assistant-message) |172| `role 'system' must precede an 'assistant' message` | [請求錯誤](#role-system-must-precede-an-assistant-message) |
160| `Invalid encrypted_content in search_result block` / `Invalid encrypted_index in text block` / `Failed to decrypt web search result content` | [請求錯誤](#invalid-encrypted-content-in-search-result-block) |173| `Invalid encrypted_content in search_result block` / `Invalid encrypted_index in text block` / `Failed to decrypt web search result content` | [請求錯誤](#invalid-encrypted-content-in-search-result-block) |
174| `Invalid encrypted_stdout in encrypted_code_execution_result block` | [請求錯誤](#invalid-encrypted-content-in-search-result-block) |
161| `server_tool_use.name: Input should be` on every turn of a resumed session | [請求錯誤](#unsupported-tool-content-removed) |175| `server_tool_use.name: Input should be` on every turn of a resumed session | [請求錯誤](#unsupported-tool-content-removed) |
162| `<model> can't help with this. Start a new session to continue` | [請求錯誤](#usage-policy-refusal) |176| `<model> can't help with this. Start a new session to continue` | [請求錯誤](#usage-policy-refusal) |
163| `Claude Code is unable to respond to this request, which appears to violate our Usage Policy` | [請求錯誤](#usage-policy-refusal) |177| `Claude Code is unable to respond to this request, which appears to violate our Usage Policy` | [請求錯誤](#usage-policy-refusal) |
164| `<model>'s safeguards flagged this message` | [請求錯誤](#safety-measures-flagged-a-cybersecurity-topic) |178| `<model>'s safeguards flagged this message` | [請求錯誤](#safety-measures-flagged-a-cybersecurity-topic) |
165| `Opus 5.5's safeguards flagged this session` | [請求錯誤](#safety-measures-flagged-a-cybersecurity-topic) |179| `<model>'s safeguards flagged this session` | [請求錯誤](#safety-measures-flagged-a-cybersecurity-topic) |
166| `<model> has safety measures that flagged this message for a cybersecurity topic` | [請求錯誤](#safety-measures-flagged-a-cybersecurity-topic) |180| `<model> has safety measures that flagged this message for a cybersecurity topic` | [請求錯誤](#safety-measures-flagged-a-cybersecurity-topic) |
167| `Installation was killed before it could finish (exit code 137)` | [安裝錯誤](#installation-was-killed-before-it-could-finish) |181| `Installation was killed before it could finish (exit code 137)` | [安裝錯誤](#installation-was-killed-before-it-could-finish) |
168| `The connection dropped while downloading the update` | [安裝錯誤](#the-connection-dropped-while-downloading-the-update) |182| `The connection dropped while downloading the update` | [安裝錯誤](#the-connection-dropped-while-downloading-the-update) |
173| `Couldn't verify your organization's policy for cloud sessions` | [命令列錯誤](#cloud-sessions-are-disabled-by-your-organizations-policy) |187| `Couldn't verify your organization's policy for cloud sessions` | [命令列錯誤](#cloud-sessions-are-disabled-by-your-organizations-policy) |
174| `Error: --json-schema is not a valid JSON Schema` | [命令列錯誤](#command-line-errors) |188| `Error: --json-schema is not a valid JSON Schema` | [命令列錯誤](#command-line-errors) |
175| `Error: Invalid --agents configuration:` | [命令列錯誤](#invalid-agents-configuration) |189| `Error: Invalid --agents configuration:` | [命令列錯誤](#invalid-agents-configuration) |
190| `Error: --agents takes a JSON object, or a file path only with --print (-p)` | [命令列錯誤](#invalid-agents-configuration) |
191| `Error: --agents file not found` | [命令列錯誤](#invalid-agents-configuration) |
176| `Error: Settings file exceeds the 2MiB limit` | [命令列錯誤](#settings-file-exceeds-the-2mib-limit) |192| `Error: Settings file exceeds the 2MiB limit` | [命令列錯誤](#settings-file-exceeds-the-2mib-limit) |
177| `The current directory no longer exists (it was deleted or moved)` / `Can't read the current directory` | [命令列錯誤](#the-current-directory-no-longer-exists) |193| `The current directory no longer exists (it was deleted or moved)` / `Can't read the current directory` | [命令列錯誤](#the-current-directory-no-longer-exists) |
178| `Temp directory <dir> ... Refusing to use it` / `ENOSPC: no space left on device, mkdir '<dir>'` | [命令列錯誤](#temp-directory-refused-or-cannot-be-created) |194| `Temp directory <dir> ... Refusing to use it` / `ENOSPC: no space left on device, mkdir '<dir>'` | [命令列錯誤](#temp-directory-refused-or-cannot-be-created) |
207| `Single sign-on authorization needed` | [命令列錯誤](#single-sign-on-authorization-needed) |223| `Single sign-on authorization needed` | [命令列錯誤](#single-sign-on-authorization-needed) |
208| `Failed to resume the conversation` | [命令列錯誤](#failed-to-resume-the-conversation) |224| `Failed to resume the conversation` | [命令列錯誤](#failed-to-resume-the-conversation) |
209| `No conversation found with session ID: <session-id>` | [命令列錯誤](#no-conversation-found-with-the-session-id) |225| `No conversation found with session ID: <session-id>` | [命令列錯誤](#no-conversation-found-with-the-session-id) |
226| `Windows reported an error (EBADF) when Claude Code read this session's transcript file` | [命令列錯誤](#windows-reported-an-error-ebadf) |
210| `Cannot switch renderers in this session` | [命令列錯誤](#cannot-switch-renderers-in-this-session) |227| `Cannot switch renderers in this session` | [命令列錯誤](#cannot-switch-renderers-in-this-session) |
211| `Cannot switch renderers while work is running in the background` | [命令列錯誤](#cannot-switch-renderers-in-this-session) |228| `Cannot switch renderers while work is running in the background` | [命令列錯誤](#cannot-switch-renderers-in-this-session) |
212| `Couldn't open Claude Desktop` | [命令列錯誤](#couldnt-open-claude-desktop) |229| `Couldn't open Claude Desktop` | [命令列錯誤](#couldnt-open-claude-desktop) |
218| `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) |235| `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) |
219| `` `plugin eval` is currently in early access `` / `` `plugin eval` is currently unavailable `` | [Plugin 錯誤](#plugin-eval-is-currently-in-early-access) |236| `` `plugin eval` is currently in early access `` / `` `plugin eval` is currently unavailable `` | [Plugin 錯誤](#plugin-eval-is-currently-in-early-access) |
220| `Marketplace "<name>" is registered from an untrusted source` | [Plugin 錯誤](#marketplace-is-registered-from-an-untrusted-source) |237| `Marketplace "<name>" is registered from an untrusted source` | [Plugin 錯誤](#marketplace-is-registered-from-an-untrusted-source) |
238| `Claude Code refuses the marketplace name "<name>"` | [Plugin 錯誤](#claude-code-refuses-the-marketplace-name) |
239| `Marketplace name impersonates an official Anthropic/Claude marketplace` | [Plugin 錯誤](#claude-code-refuses-the-marketplace-name) |
221| `Marketplace "<name>" is already added from a different source` | [Plugin 錯誤](#marketplace-is-already-added-from-a-different-source) |240| `Marketplace "<name>" is already added from a different source` | [Plugin 錯誤](#marketplace-is-already-added-from-a-different-source) |
222| `"<name>" is another spelling of "<reserved>", a reserved marketplace name` | [Plugin 錯誤](#marketplace-name-is-another-spelling-of-a-reserved-name) |241| `"<name>" is another spelling of "<reserved>", a reserved marketplace name` | [Plugin 錯誤](#marketplace-name-is-another-spelling-of-a-reserved-name) |
223| `references ${user_config.*} in a shell-form command` | [Plugin 錯誤](#plugin-command-references-user-config) |242| `references ${user_config.*} in a shell-form command` | [Plugin 錯誤](#plugin-command-references-user-config) |
231| `Failed to load marketplace configuration` | [Plugin 錯誤](#failed-to-load-marketplace-configuration) |250| `Failed to load marketplace configuration` | [Plugin 錯誤](#failed-to-load-marketplace-configuration) |
232| `Marketplace configuration file is corrupted` | [Plugin 錯誤](#failed-to-load-marketplace-configuration) |251| `Marketplace configuration file is corrupted` | [Plugin 錯誤](#failed-to-load-marketplace-configuration) |
233| `Plugin "<name>@synced" is required by your organization and can't be disabled here` | [Plugin 錯誤](#plugin-is-required-by-your-organization) |252| `Plugin "<name>@synced" is required by your organization and can't be disabled here` | [Plugin 錯誤](#plugin-is-required-by-your-organization) |
253| `"<plugin>" was not uninstalled: it is still switched on in <file>` | [Plugin 錯誤](#plugin-was-not-uninstalled) |
254| `"<plugin>" was not uninstalled: <file> is there and could not be read` | [Plugin 錯誤](#plugin-was-not-uninstalled) |
234| `would be spawned with zero tools — refusing` | [工具錯誤](#agent-would-be-spawned-with-zero-tools) |255| `would be spawned with zero tools — refusing` | [工具錯誤](#agent-would-be-spawned-with-zero-tools) |
235| `File is covered by a Read deny rule in your permission settings` | [工具錯誤](#file-is-covered-by-a-read-deny-rule) |256| `File is covered by a Read deny rule in your permission settings` | [工具錯誤](#file-is-covered-by-a-read-deny-rule) |
257| `cannot contain null bytes (\0)` | [工具錯誤](#path-cannot-contain-null-bytes) |
258| `Path contains null bytes` | [工具錯誤](#path-cannot-contain-null-bytes) |
236| `subagent_type is required: the general-purpose agent is not available in this session` | [工具錯誤](#subagent-type-is-required) |259| `subagent_type is required: the general-purpose agent is not available in this session` | [工具錯誤](#subagent-type-is-required) |
237| `Error: this write left the memory index at MEMORY.md at ..., over its ... read limit` | [工具錯誤](#memory-index-is-over-its-read-limit) |260| `Error: this write left the memory index at MEMORY.md at ..., over its ... read limit` | [工具錯誤](#memory-index-is-over-its-read-limit) |
238| `pkill: refusing to run` | [工具錯誤](#pkill-pattern-matches-the-claude-code-process) |261| `pkill: refusing to run` | [工具錯誤](#pkill-pattern-matches-the-claude-code-process) |
248| `Refusing to read <path>: its symlink resolution changed after permission was checked (<reason>)` / `Refusing to search <path>: its symlink resolution changed after permission was checked` | [工具錯誤](#refusing-after-a-symlink-changed) |271| `Refusing to read <path>: its symlink resolution changed after permission was checked (<reason>)` / `Refusing to search <path>: its symlink resolution changed after permission was checked` | [工具錯誤](#refusing-after-a-symlink-changed) |
249| `Refusing to write <path>: its parent-directory symlink resolution changed after permission was checked` / `Refusing to write <path>: it is a symbolic link. Write to the link's target path instead` | [工具錯誤](#refusing-after-a-symlink-changed) |272| `Refusing to write <path>: its parent-directory symlink resolution changed after permission was checked` / `Refusing to write <path>: it is a symbolic link. Write to the link's target path instead` | [工具錯誤](#refusing-after-a-symlink-changed) |
250| `Refusing to write through symlink: <path>` / `Refusing to write into symlinked directory: <path>` | [工具錯誤](#refusing-after-a-symlink-changed) |273| `Refusing to write through symlink: <path>` / `Refusing to write into symlinked directory: <path>` | [工具錯誤](#refusing-after-a-symlink-changed) |
274| `Refusing to write <path>: where it leads on disk could not be determined` / `Refusing to read <path>: where it leads on disk could not be determined` | [工具錯誤](#refusing-after-a-symlink-changed) |
251| `Refusing to search <path>: a path one of its Read deny rules is written through changed while the search was being prepared` / `Refusing to search <path>: it could not be opened` | [工具錯誤](#refusing-after-a-symlink-changed) |275| `Refusing to search <path>: a path one of its Read deny rules is written through changed while the search was being prepared` / `Refusing to search <path>: it could not be opened` | [工具錯誤](#refusing-after-a-symlink-changed) |
252| `its permission check expired before it ran (too many concurrent file operations)` / `ripgrep was found only by name on PATH` | [工具錯誤](#refusing-after-a-symlink-changed) |276| `its permission check expired before it ran (too many concurrent file operations)` / `ripgrep was found only by name on PATH` | [工具錯誤](#refusing-after-a-symlink-changed) |
253| `task output swap refused (tasks dir moved or linked)` | [工具錯誤](#task-output-swap-refused) |277| `task output swap refused (tasks dir moved or linked)` | [工具錯誤](#task-output-swap-refused) |
254| `Command killed: its output file was replaced or could no longer be verified` | [工具錯誤](#task-output-swap-refused) |278| `Command killed: its output file was replaced or could no longer be verified` | [工具錯誤](#task-output-swap-refused) |
279| `Your disk quota is full on the filesystem with Claude Code's temp directory <dir> (EDQUOT)` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |
280| `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) |
281| `Command output was lost: the temp filesystem at <dir> is full` / `is out of inodes` | [工具錯誤](#disk-quota-or-temp-filesystem-is-full) |
255| `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) |282| `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) |
256| `the source file has the replacement character U+FFFD` | [工具錯誤](#the-source-file-is-not-valid-utf-8-text) |283| `the source file has the replacement character U+FFFD` | [工具錯誤](#the-source-file-is-not-valid-utf-8-text) |
257| `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) |284| `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) |
279| `EACCES: permission denied, posix_spawn` | [背景工作階段錯誤](#eacces-when-starting-a-background-session) |306| `EACCES: permission denied, posix_spawn` | [背景工作階段錯誤](#eacces-when-starting-a-background-session) |
280| `exited before it became reachable` | [背景工作階段錯誤](#background-service-exited-before-it-became-reachable) |307| `exited before it became reachable` | [背景工作階段錯誤](#background-service-exited-before-it-became-reachable) |
281| `Couldn't start a background session (working directory no longer exists or is not accessible: ...)` | [背景工作階段錯誤](#working-directory-no-longer-exists-when-starting-a-background-session) |308| `Couldn't start a background session (working directory no longer exists or is not accessible: ...)` | [背景工作階段錯誤](#working-directory-no-longer-exists-when-starting-a-background-session) |
309| `Workspace not trusted.` when starting or restarting a background session | [背景工作階段錯誤](#workspace-not-trusted-when-dispatching-a-background-session) |
282| `Claude Code is being updated by npm on this machine (still not runnable after 2 min, ...)` | [背景工作階段錯誤](#eacces-when-starting-a-background-session) |310| `Claude Code is being updated by npm on this machine (still not runnable after 2 min, ...)` | [背景工作階段錯誤](#eacces-when-starting-a-background-session) |
283| `Claude Code process exited with code N` | [包裝程式和 IDE 錯誤](#claude-code-process-exited-with-code-n) |311| `Claude Code process exited with code N` | [包裝程式和 IDE 錯誤](#claude-code-process-exited-with-code-n) |
284| `The connection to Claude Code ended before this message completed` | [包裝程式和 IDE 錯誤](#the-connection-to-claude-code-ended-before-this-message-completed) |312| `The connection to Claude Code ended before this message completed` | [包裝程式和 IDE 錯誤](#the-connection-to-claude-code-ended-before-this-message-completed) |
291| `Claude Code's fullscreen renderer didn't finish starting last time on this machine` / `Claude Code's fullscreen renderer has repeatedly failed to start on this machine` | [設定警告](#fullscreen-failed-start-notice) |319| `Claude Code's fullscreen renderer didn't finish starting last time on this machine` / `Claude Code's fullscreen renderer has repeatedly failed to start on this machine` | [設定警告](#fullscreen-failed-start-notice) |
292| `Claude Code exited after an unrecoverable interface error (...)` | [設定警告](#exited-after-an-unrecoverable-interface-error) |320| `Claude Code exited after an unrecoverable interface error (...)` | [設定警告](#exited-after-an-unrecoverable-interface-error) |
293| `Agent descriptions are over the 15.0k-token limit` | [設定警告](#agent-descriptions-are-over-the-15000-token-limit) |321| `Agent descriptions are over the 15.0k-token limit` | [設定警告](#agent-descriptions-are-over-the-15000-token-limit) |
322| `Not loaded: rename <path>, then restart — its name uses "<name>", a name reserved for the skills synced from your claude.ai account` | [設定警告](#a-skill-command-or-workflow-wasnt-loaded-because-its-name-is-reserved) |
294| `Ignoring N permissions.allow entries from ... this workspace has not been trusted` | [設定警告](#workspace-has-not-been-trusted) |323| `Ignoring N permissions.allow entries from ... this workspace has not been trusted` | [設定警告](#workspace-has-not-been-trusted) |
295| `is a network path, which cannot be added as a working directory` | [設定警告](#working-directory-is-a-network-path) |324| `is a network path, which cannot be added as a working directory` | [設定警告](#working-directory-is-a-network-path) |
296| `Remote managed settings failed to load (<cause>)` | [設定警告](#remote-managed-settings-failed-to-load) |325| `Remote managed settings failed to load (<cause>)` | [設定警告](#remote-managed-settings-failed-to-load) |
297| `Managed settings were not approved; exiting without applying them.` | [設定警告](#managed-settings-were-not-approved) |326| `Managed settings were not approved; exiting without applying them.` | [設定警告](#managed-settings-were-not-approved) |
327| `Claude Code can't start: your organization's managed settings block the default model` / `Claude Code can't start: your organization allows only the models listed in "availableModels"` | [設定警告](#managed-settings-block-the-default-model) |
298| `MCP server <name> is blocked by enterprise managed policy` | [設定警告](#mcp-server-is-blocked-by-enterprise-managed-policy) |328| `MCP server <name> is blocked by enterprise managed policy` | [設定警告](#mcp-server-is-blocked-by-enterprise-managed-policy) |
299| `Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.` | [設定警告](#managed-settings-document-could-not-be-parsed) |329| `Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.` | [設定警告](#managed-settings-document-could-not-be-parsed) |
300| `Managed settings drop-in directory could not be read` | [設定警告](#managed-settings-document-could-not-be-parsed) |330| `Managed settings drop-in directory could not be read` | [設定警告](#managed-settings-document-could-not-be-parsed) |
390 420
391尾部句子名稱檢查服務健康狀況的位置,並因提供者而異。Amazon Bedrock、Google Cloud 的 Agent Platform 和 Microsoft Foundry 設定會名稱該提供者的服務狀態。自訂 `ANTHROPIC_BASE_URL` 會名稱閘道主機。421尾部句子名稱檢查服務健康狀況的位置,並因提供者而異。Amazon Bedrock、Google Cloud 的 Agent Platform 和 Microsoft Foundry 設定會名稱該提供者的服務狀態。自訂 `ANTHROPIC_BASE_URL` 會名稱閘道主機。
392 422
393這表示 API 內部發生意外故障。它不是由您的提示、設定或帳戶引起的。423來自 API 本身的 5xx 表示 API 內部發生意外故障。它不是由您的提示、設定或帳戶引起的。
424
425當代理、負載平衡器或閘道以 HTML 錯誤頁面回應時,訊息會顯示狀態碼和頁面的標題,例如 `API Error: 502 Bad Gateway`。對於沒有標題的頁面,訊息會改為顯示狀態碼及其標準名稱。在 v2.1.281 之前,當頁面有標題時狀態碼被丟棄,當頁面沒有標題時列印頁面的原始標記。
394 426
395**該怎麼做:**427**該怎麼做:**
396 428
416 448
417* 檢查 [status.claude.com](https://status.claude.com) 或訊息中名稱的提供者狀態頁面,查看容量通知449* 檢查 [status.claude.com](https://status.claude.com) 或訊息中名稱的提供者狀態頁面,查看容量通知
418* 在幾分鐘後重試450* 在幾分鐘後重試
419* 執行 `/model` 並切換到不同的模型以繼續工作,因為容量是按模型追蹤的。Claude Code 會在一個模型負載特別高時提示您執行此操作,例如 `Opus is experiencing high load, please use /model to switch to Sonnet`。451* 執行 `/model` 並切換到不同的模型以繼續工作,因為容量是按模型追蹤的。Claude Code 會在一個模型負載特別高時提示您執行此操作,例如 `Opus is experiencing high load, please use /model to switch to Sonnet`。在 Fable 模型上,訊息會名稱 Fable。
452
453 在 Claude Desktop 應用程式執行的工作階段中,例如 Code 標籤或 Cowork,訊息讀作 `Opus is experiencing high load. Switch to Sonnet.`,您可以使用應用程式的模型選擇器切換模型。
420 454
421<h3 id="request-timed-out">455<h3 id="request-timed-out">
422 Request timed out456 Request timed out
474API Error: Connection lost mid-response. The response above may be incomplete.508API Error: Connection lost mid-response. The response above may be incomplete.
475API Error: Your computer went to sleep mid-response. The response above may be incomplete.509API Error: Your computer went to sleep mid-response. The response above may be incomplete.
476API Error: The response stopped arriving. The response above may be incomplete.510API Error: The response stopped arriving. The response above may be incomplete.
511API Error: Part of the response never arrived. The response above may be incomplete.
512API Error: The response stream was malformed. The response above may be incomplete.
477```513```
478 514
479* `Server error mid-response`:中流過載或 5xx 伺服器錯誤。此變體需要 Claude Code v2.1.199 或更高版本;在此之前,該情況會丟棄部分輸出並將整個輪次報告為錯誤。515* `Server error mid-response`:中流過載或 5xx 伺服器錯誤。此變體需要 Claude Code v2.1.199 或更高版本;在此之前,該情況會丟棄部分輸出並將整個輪次報告為錯誤。
480* `Connection lost mid-response`:連線中斷。516* `Connection lost mid-response`:連線中斷。您也會在代理或閘道在回應完成之前乾淨地結束回應正文時看到此變體。
481* `Your computer went to sleep mid-response`:Claude Code 偵測到您的電腦在回應串流時進入睡眠狀態。一旦您的電腦喚醒,Claude Code 會將連線視為中斷並停止從中讀取。517* `Your computer went to sleep mid-response`:Claude Code 偵測到您的電腦在回應串流時進入睡眠狀態。一旦您的電腦喚醒,Claude Code 會將連線視為中斷並停止從中讀取。
518* `Part of the response never arrived`:串流事件在 API 和 Claude Code 之間被丟棄,因此稍後的事件參考了從未到達的內容。在 v2.1.281 之前,此情況以 `API Error: Content block not found` 結束該輪次。
519* `The response stream was malformed`:已完成的內容區塊到達了事件,或事件到達時已損壞。損壞的事件是指其資料不是有效 JSON、其內容遺失或其內容與事件類型不符的事件。在 v2.1.284 之前,當具有無效 JSON 的事件在 Claude 完成其思考、文字區塊或工具呼叫後到達時,解析器的原始錯誤(例如以 `API Error: JSON Parse error` 開頭的錯誤)會出現。
482* `The response stopped arriving`:連線保持開啟但停止傳遞資料,因此串流空閒監視程式中止了它。在 v2.1.222 之前,Claude Code 也可能在通過 `ANTHROPIC_BASE_URL` 或 `ANTHROPIC_AWS_BASE_URL` 到達的[閘道](/docs/zh-TW/gateways)連線上報告此故障,同時伺服器的保活 ping 仍在到達,因為它只計算那裡解析的回應事件;升級會停止這些虛假逾時在這些路由上。通過提供者基礎 URL(例如 `ANTHROPIC_BEDROCK_BASE_URL`)到達的閘道不被位元組監視程式包裝;請參閱[串流空閒監視程式](/docs/zh-TW/network-config#streaming-idle-watchdogs)。520* `The response stopped arriving`:連線保持開啟但停止傳遞資料,因此串流空閒監視程式中止了它。在 v2.1.222 之前,Claude Code 也可能在通過 `ANTHROPIC_BASE_URL` 或 `ANTHROPIC_AWS_BASE_URL` 到達的[閘道](/docs/zh-TW/gateways)連線上報告此故障,同時伺服器的保活 ping 仍在到達,因為它只計算那裡解析的回應事件;升級會停止這些虛假逾時在這些路由上。通過提供者基礎 URL(例如 `ANTHROPIC_BEDROCK_BASE_URL`)到達的閘道不被位元組監視程式包裝;請參閱[串流空閒監視程式](/docs/zh-TW/network-config#streaming-idle-watchdogs)。
483 521
484在 v2.1.227 之前,`Connection lost mid-response` 讀作 `Connection closed mid-response`,`The response stopped arriving` 讀作 `Response stalled mid-stream`。522在 v2.1.227 之前,`Connection lost mid-response` 讀作 `Connection closed mid-response`,`The response stopped arriving` 讀作 `Response stalled mid-stream`。
485 523
524當丟棄、重複或損壞的串流事件在 Claude 開始任何文字或工具呼叫之前到達時,您看不到此通知:
525
526* 如果 Claude 只完成了其思考,Claude Code 會重新發出請求。當重新發出的串流以相同方式中斷時,該輪次以 `Part of the response never arrived and no response was produced. Try again.` 或 `The response stream was malformed and no response was produced. Try again.` 結束。
527* 如果沒有完成任何內容,Claude Code 會改為重新傳送請求而不進行串流。如果您使用 [`CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK`](/docs/zh-TW/env-vars) 關閉了該回退,該輪次會以 `API Error: Content block not found` 結束丟棄的事件或 `API Error: Content block already closed` 結束重複的事件。對於損壞的事件且回退關閉,該輪次以 `API Error: Stream event unreadable` 或解析器的原始錯誤結束。
528
486在四種情況下,Claude Code 會在不立即顯示此通知的情況下處理故障:529在四種情況下,Claude Code 會在不立即顯示此通知的情況下處理故障:
487 530
488* 在回應的早期,Claude Code 要麼重試故障,要麼以不同的錯誤結束輪次。請參閱[自動重試](#automatic-retries)。531* 在回應的早期,Claude Code 要麼重試故障,要麼以不同的錯誤結束輪次。請參閱[自動重試](#automatic-retries)。
668API Error: Usage credits required for 1M context · run /usage-credits to turn them on (they take effect after you restart Claude Code), or /model to switch to standard context711API Error: Usage credits required for 1M context · run /usage-credits to turn them on (they take effect after you restart Claude Code), or /model to switch to standard context
669```712```
670 713
714在 Claude 桌面應用程式執行的工作階段中,提示不會命名任何命令:它指向 claude.ai 使用量設定頁面,或在 Team 和 Enterprise 方案上說在 claude.ai/admin-settings/usage 開啟使用額度,或要求您的管理員。
715
671這是權利檢查,而非配額耗盡。即使您的工作階段和每週額度有剩餘容量,它也會觸發。請參閱[擴展上下文](/docs/zh-TW/model-config#extended-context)以了解哪些方案直接包括 1M 上下文,哪些需要使用額度。Claude Code 在您使用 `/model` 選擇模型時執行此檢查,且僅在直接連接到 Anthropic API 時執行;如果您將 `ANTHROPIC_BASE_URL` 指向[LLM 閘道](/docs/zh-TW/llm-gateway),`/model` 允許 `[1m]` 選擇,閘道決定請求是否成功。716這是權利檢查,而非配額耗盡。即使您的工作階段和每週額度有剩餘容量,它也會觸發。請參閱[擴展上下文](/docs/zh-TW/model-config#extended-context)以了解哪些方案直接包括 1M 上下文,哪些需要使用額度。Claude Code 在您使用 `/model` 選擇模型時執行此檢查,且僅在直接連接到 Anthropic API 時執行;如果您將 `ANTHROPIC_BASE_URL` 指向[LLM 閘道](/docs/zh-TW/llm-gateway),`/model` 允許 `[1m]` 選擇,閘道決定請求是否成功。
672 717
673當此錯誤在對話中期出現,因為上下文增長超過 200K 權杖時,Claude Code 會自動將對話壓縮回標準上下文限制以下,並之後將工作階段保持在該限制,因此無需採取任何行動。在 v2.1.172 之前的版本上,錯誤會在每個後續請求(包括 `/compact`)上重複;在這些版本上執行 `/clear` 以恢復。以下步驟適用於您明確選擇 `[1m]` 模型的情況。718當此錯誤在對話中期出現,因為上下文增長超過 200K 權杖時,Claude Code 會自動將對話壓縮回標準上下文限制以下,並之後將工作階段保持在該限制,因此無需採取任何行動。在 v2.1.172 之前的版本上,錯誤會在每個後續請求(包括 `/compact`)上重複;在這些版本上執行 `/clear` 以恢復。以下步驟適用於您明確選擇 `[1m]` 模型的情況。
733 778
734尾部句子命名檢查服務健康狀況的位置,並因提供者而異。Amazon Bedrock、Google Cloud 的 Agent Platform 和 Microsoft Foundry 設定會命名該提供者的服務狀態,而不是 Anthropic 狀態頁面。自訂 `ANTHROPIC_BASE_URL` 會命名閘道主機。779尾部句子命名檢查服務健康狀況的位置,並因提供者而異。Amazon Bedrock、Google Cloud 的 Agent Platform 和 Microsoft Foundry 設定會命名該提供者的服務狀態,而不是 Anthropic 狀態頁面。自訂 `ANTHROPIC_BASE_URL` 會命名閘道主機。
735 780
781當代理、負載平衡器或 Claude Code 與 API 之間的閘道以其自己的 HTML 429 頁面回應時,`·` 後面的文字是該頁面的標題(如果有的話),例如 `Too Many Requests`。在 v2.1.281 之前,整個頁面的標記被列印在 `·` 後面。
782
736**該怎麼做:**783**該怎麼做:**
737 784
738* 執行 `/status` 並確認作用中的認證是您預期的認證。環境中的流浪 `ANTHROPIC_API_KEY` 可能會透過低階金鑰而不是您的訂閱路由請求。785* 執行 `/status` 並確認作用中的認證是您預期的認證。環境中的流浪 `ANTHROPIC_API_KEY` 可能會透過低階金鑰而不是您的訂閱路由請求。
839Not logged in · Please run /login886Not logged in · Please run /login
840```887```
841 888
889在 Claude Desktop 應用程式執行的工作階段中,例如 Code 標籤或 Cowork,訊息讀作 `Authentication required · Sign in again to continue`,您從應用程式再次登入。
890
842**該怎麼做:**891**該怎麼做:**
843 892
844* 執行 `/login` 以使用您的 Claude 訂閱或 Console 帳戶進行驗證893* 執行 `/login` 以使用您的 Claude 訂閱或 Console 帳戶進行驗證
985Your organization has disabled API key authentication · Unset ANTHROPIC_API_KEY to use your claude.ai account instead1034Your organization has disabled API key authentication · Unset ANTHROPIC_API_KEY to use your claude.ai account instead
986Your organization has disabled API key authentication · Unset ANTHROPIC_API_KEY and run /login to sign in with your claude.ai account1035Your organization has disabled API key authentication · Unset ANTHROPIC_API_KEY and run /login to sign in with your claude.ai account
987Your organization has disabled API key authentication · Unset the apiKeyHelper setting and run /login to sign in with your claude.ai account1036Your organization has disabled API key authentication · Unset the apiKeyHelper setting and run /login to sign in with your claude.ai account
1037Your organization has disabled API key authentication · Sign in again with your claude.ai account
988```1038```
989 1039
1040最後一種形式出現在 Claude Desktop 應用程式執行的工作階段中,例如 Code 標籤或 Cowork,您從應用程式再次登入。
1041
990環境變數和 `apiKeyHelper` 優先於 `/login`,因此在任一個仍在提供金鑰時單獨執行 `/login` 沒有幫助。請參閱[驗證優先順序](/docs/zh-TW/authentication#authentication-precedence)。1042環境變數和 `apiKeyHelper` 優先於 `/login`,因此在任一個仍在提供金鑰時單獨執行 `/login` 沒有幫助。請參閱[驗證優先順序](/docs/zh-TW/authentication#authentication-precedence)。
991 1043
992**該怎麼做:**1044**該怎麼做:**
1021 您的組織政策已停用例行程序1073 您的組織政策已停用例行程序
1022</h3>1074</h3>
1023 1075
1024An Owner in your Team or Enterprise organization has turned off routines at the organization level. The error appears when you try to create or run a routine, for example from the [Routines](/docs/zh-TW/routines) UI on claude.ai/code. On Claude Code v2.1.227 or later, the same setting also [hides `/schedule`](/docs/zh-TW/routines#troubleshooting) in the CLI.1076您的 Team 或 Enterprise 組織中的擁有者已在組織層級關閉例行程序。當您嘗試建立或執行例行程序時會出現此錯誤,例如從 claude.ai/code 上的 [Routines](/docs/zh-TW/routines) UI。在 Claude Code v2.1.227 或更新版本上,相同的設定也會[隱藏 CLI 中的 `/schedule`](/docs/zh-TW/routines#troubleshooting)。
1025 1077
1026```text theme={null}1078```text theme={null}
1027Routines are disabled by your organization's policy.1079Routines are disabled by your organization's policy.
1203* 在非互動式模式中,在相同環境中執行 `claude`,完成 `/login`,然後重新執行您的命令。對於無法以互動方式登入的自動化,使用 `ANTHROPIC_API_KEY` 或[使用 `claude setup-token` 產生長期權杖](/docs/zh-TW/authentication#generate-a-long-lived-token)進行驗證。1255* 在非互動式模式中,在相同環境中執行 `claude`,完成 `/login`,然後重新執行您的命令。對於無法以互動方式登入的自動化,使用 `ANTHROPIC_API_KEY` 或[使用 `claude setup-token` 產生長期權杖](/docs/zh-TW/authentication#generate-a-long-lived-token)進行驗證。
1204* 如果登入持續失敗,請參閱[登入和驗證](/docs/zh-TW/troubleshoot-install#login-and-authentication)1256* 如果登入持續失敗,請參閱[登入和驗證](/docs/zh-TW/troubleshoot-install#login-and-authentication)
1205 1257
1258<h3 id="could-not-refresh-your-login">
1259 無法重新整理您的登入,因為另一個 Claude Code 程序正在重新整理它
1260</h3>
1261
1262此訊息不表示您的登入被拒絕。您的已儲存 claude.ai 登入已過期,需要更新。此機器上的另一個 Claude Code 程序持有共用重新整理鎖定,或退出並將其留下,重新整理在此工作階段等待時沒有進展。Claude Code 在傳送前停止請求:
1263
1264```text theme={null}
1265Could not refresh your login because another Claude Code process is refreshing it (or exited mid-refresh) · Try again in a minute; if it keeps happening, close other Claude Code windows or sign in again with /login
1266```
1267
1268在[非互動式模式](/docs/zh-TW/headless)(`-p`) 和 [Agent SDK](/docs/zh-TW/agent-sdk/overview) 中,訊息讀作如下,結構化錯誤代碼為 `server_error`:
1269
1270```text theme={null}
1271Failed to refresh OAuth token: another Claude Code process is refreshing it or exited mid-refresh. This is usually transient; retry in a minute, and if it persists close other Claude Code processes or sign in again
1272```
1273
1274使用 API 金鑰、[`CLAUDE_CODE_OAUTH_TOKEN`](/docs/zh-TW/env-vars) 或第三方提供者進行驗證的工作階段不使用已儲存的登入,永遠不會看到此訊息。
1275
1276**該怎麼做:**
1277
1278* 一分鐘後重試。如果另一個程序首先完成重新整理,此工作階段會使用更新的登入。
1279* 如果訊息持續返回,請關閉其他 Claude Code 視窗和程序,然後重試。
1280* 如果在沒有其他 Claude Code 程序執行的情況下返回,請執行 `/login`。再次登入不會等待重新整理鎖定。
1281
1282<h3 id="couldnt-save-your-login">
1283 無法儲存您的登入
1284</h3>
1285
1286您使用 claude.ai 登入,但 Claude Code 無法將登入儲存到其認證資格存放區,因此登入未完成。在 macOS 上,當登入鑰匙圈鎖定時(例如在睡眠或閒置時),在 Claude Code 已在同一工作階段中讀取或儲存認證資格之後,可能會發生這種情況。
1287
1288```text theme={null}
1289Couldn't save your login. If your Mac's keychain is locked, unlock it and log in again.
1290Couldn't save your login. Try logging in again.
1291```
1292
1293第一種形式出現在 macOS 上,第二種形式出現在其他地方。暫時性認證資格存放區失敗(例如逾時或無法讀取的存放區)會產生相同的訊息。
1294
1295**該怎麼做:**
1296
1297* 在 macOS 上,解鎖登入鑰匙圈,然後再次執行 `/login`
1298* 在其他平台上,再次執行 `/login`
1299* 如果登入仍未儲存,請參閱[未登入或權杖已過期](/docs/zh-TW/troubleshoot-install#not-logged-in-or-token-expired)以取得鑰匙圈解鎖命令和其他認證資格儲存復原步驟
1300
1206<h3 id="claude-login-not-accepted">1301<h3 id="claude-login-not-accepted">
1207 Claude 登入未被接受1302 Claude 登入未被接受
1208</h3>1303</h3>
1458* 執行 `aws sts get-caller-identity` 以確認您的請求使用哪個身份;過時的 `AWS_PROFILE` 或預設設定檔是權限不匹配的常見原因1553* 執行 `aws sts get-caller-identity` 以確認您的請求使用哪個身份;過時的 `AWS_PROFILE` 或預設設定檔是權限不匹配的常見原因
1459 1554
1460<h3 id="google-cloud-credentials-expired-or-invalid">1555<h3 id="google-cloud-credentials-expired-or-invalid">
1556 Google Cloud 認證資格已過期或無效
1557</h3>
1558
1559您的 [Google Cloud 的 Agent Platform](/docs/zh-TW/google-vertex-ai) Google Cloud 認證資格已過期或被拒絕:請求傳回 401,這是 Agent Platform 報告認證資格過期的方式。
1560
1561中間的動作提示會根據您的設定而異。穩定的部分是前導 `Google Cloud credentials expired or invalid`:
1562
1563```text theme={null}
1564Google Cloud credentials expired or invalid · refresh your Google Cloud credentials (application default sign-in, or the key file in GOOGLE_APPLICATION_CREDENTIALS) and retry · API Error: 401 ...
1565```
1566
1567**該怎麼做:**
1568
1569* 如果提示說認證資格由此環境管理,啟動 Claude Code 的應用程式擁有認證資格,此處的其他步驟不適用:重試,或聯絡您的管理員
1570* 如果您使用應用程式預設認證資格進行驗證,請執行訊息中命名的 [`gcpAuthRefresh`](/docs/zh-TW/google-vertex-ai#advanced-credential-configuration) 命令或 `gcloud auth application-default login`,並完成登入,然後重試
1571* 如果您透過設定 `CLAUDE_CODE_SKIP_VERTEX_AUTH` 的 [LLM 閘道](/docs/zh-TW/llm-gateway)路由,請重新整理 `ANTHROPIC_AUTH_TOKEN` 或 `ANTHROPIC_CUSTOM_HEADERS` 中的閘道權杖,然後重試
1572* 如果您使用服務帳戶金鑰檔案進行驗證,請確認 `GOOGLE_APPLICATION_CREDENTIALS` 指向有效的金鑰。請參閱[設定 GCP 認證資格](/docs/zh-TW/google-vertex-ai#3-configure-gcp-credentials)
1573* 如果重新整理後錯誤重複,請在相同 shell 中使用 `gcloud auth application-default print-access-token` 確認身份在 Claude Code 外有效
1574
1575在 v2.1.273 之前,來自 Agent Platform 的 401 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,無法重新整理 Google Cloud 認證資格。
1576
1577<h3 id="google-cloud-authentication-failed">
1578 Google Cloud 驗證失敗
1579</h3>
1580
1581[Google Cloud 的 Agent Platform](/docs/zh-TW/google-vertex-ai) 傳回 403,它用於授權拒絕而不是過期的認證資格。通常您驗證的身份缺少 IAM 權限,或該模型未為您的專案啟用。
1582
1583中間的動作提示會根據您的設定而異。穩定的部分是前導 `Google Cloud authentication failed`:
1584
1585```text theme={null}
1586Google Cloud authentication failed · refresh your Google Cloud credentials (application default sign-in, or the key file in GOOGLE_APPLICATION_CREDENTIALS) and retry · if credentials are current, check GCP IAM permissions and Vertex AI model access · API Error: 403 ...
1587```
1588
1589**該怎麼做:**
1590
1591* 如果提示說認證資格由此環境管理,啟動 Claude Code 的應用程式擁有認證資格,此處的其他步驟不適用:重試,或聯絡您的管理員
1592* 確認 [IAM 設定](/docs/zh-TW/google-vertex-ai#iam-configuration)中的角色已授予您驗證的身份
1593* 確認該模型已為您的專案啟用。請參閱[要求模型存取](/docs/zh-TW/google-vertex-ai#2-request-model-access)
1594
1595在 v2.1.273 之前,來自 Agent Platform 的 403 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,無法重新整理 Google Cloud 認證資格。
1596
1597<h3 id="microsoft-foundry-authentication-failed">
1598 Microsoft Foundry 驗證失敗
1599</h3>
1600
1601[Microsoft Foundry](/docs/zh-TW/microsoft-foundry) 傳回 401 或 403:請求上的 Azure 認證資格被拒絕,或其背後的身份沒有存取 Foundry 資源的權限。`/login` 無法鑄造 Azure 認證資格。中間的動作提示會根據您的設定而異。穩定的部分是前導 `Microsoft Foundry authentication failed`:
1602
1603```text theme={null}
1604Microsoft Foundry authentication failed · refresh your Foundry credential (ANTHROPIC_FOUNDRY_AUTH_TOKEN, ANTHROPIC_FOUNDRY_API_KEY, Azure sign-in for Entra, or your proxy token) and retry · if credentials are current, check access to the Foundry resource · API Error: 401 ...
1605```
1606
1607**該怎麼做:**
1608
1609* 如果提示說認證資格由此環境管理,啟動 Claude Code 的應用程式擁有認證資格,此處的其他步驟不適用:重試,或聯絡您的管理員
1610* 重新整理您在[設定 Azure 認證資格](/docs/zh-TW/microsoft-foundry#2-configure-azure-credentials)中設定的認證資格:輪換 `ANTHROPIC_FOUNDRY_API_KEY`、鑄造新的 `ANTHROPIC_FOUNDRY_AUTH_TOKEN`,或執行 `az login` 以便預設 Microsoft Entra 認證資格鏈可以再次登入
1611* 如果認證資格是最新的,請確認身份有權存取 Foundry 資源。請參閱 [Azure RBAC 設定](/docs/zh-TW/microsoft-foundry#azure-rbac-configuration)
1612
1613在 v2.1.273 之前,來自 Microsoft Foundry 的 401 或 403 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,無法重新整理 Azure 認證資格。
1614
1615<h3 id="could-not-load-aws-or-google-cloud-credentials">
1461 無法載入 AWS 或 Google Cloud 認證資格1616 無法載入 AWS 或 Google Cloud 認證資格
1462</h3>1617</h3>
1463 1618
1475* 執行您的提供者的登入命令,例如 `aws sso login --profile myprofile` 或 `gcloud auth application-default login`,然後重試。[Bedrock、Agent Platform 或 Foundry 認證資格未載入](/docs/zh-TW/troubleshoot-install#bedrock-agent-platform-or-foundry-credentials-not-loading)顯示如何在 Claude Code 外確認認證資格1630* 執行您的提供者的登入命令,例如 `aws sso login --profile myprofile` 或 `gcloud auth application-default login`,然後重試。[Bedrock、Agent Platform 或 Foundry 認證資格未載入](/docs/zh-TW/troubleshoot-install#bedrock-agent-platform-or-foundry-credentials-not-loading)顯示如何在 Claude Code 外確認認證資格
1476* 如果詳細資訊讀作 `AWS default-chain credential resolve timed out`,鏈掛起而不是失敗,因此改為遵循 [AWS default-chain credential resolve timed out](#aws-default-chain-credential-resolve-timed-out)1631* 如果詳細資訊讀作 `AWS default-chain credential resolve timed out`,鏈掛起而不是失敗,因此改為遵循 [AWS default-chain credential resolve timed out](#aws-default-chain-credential-resolve-timed-out)
1477 1632
1478<h3 id="google-cloud-authentication-failed">1633<h3 id="aws-default-chain-credential-resolve-timed-out">
1479 AWS default-chain credential resolve 逾時1634 AWS default-chain credential resolve 逾時
1480</h3>1635</h3>
1481 1636
1496* 在啟動 Claude Code 之前完成登入步驟,例如 `aws sso login --profile myprofile`,以便鏈從本機 SSO 快取解析,而不是等待瀏覽器流程1651* 在啟動 Claude Code 之前完成登入步驟,例如 `aws sso login --profile myprofile`,以便鏈從本機 SSO 快取解析,而不是等待瀏覽器流程
1497* 如果您的鏈執行合法需要超過 60 秒的互動式登入,例如透過 `aws-vault` 等包裝程式的 SSO 與 MFA,請使用 [`CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS`](/docs/zh-TW/env-vars) 以毫秒為單位提高限制1652* 如果您的鏈執行合法需要超過 60 秒的互動式登入,例如透過 `aws-vault` 等包裝程式的 SSO 與 MFA,請使用 [`CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS`](/docs/zh-TW/env-vars) 以毫秒為單位提高限制
1498 1653
1499<h3 id="microsoft-foundry-authentication-failed">1654<h3 id="bedrock-setup-verification-timed-out-waiting-for-aws">
1500 Bedrock 設定驗證逾時等待 AWS1655 Bedrock 設定驗證逾時等待 AWS
1501</h3>1656</h3>
1502 1657
1524* 在開啟精靈之前完成任何互動式登入,例如 `aws sso login --profile myprofile`1679* 在開啟精靈之前完成任何互動式登入,例如 `aws sso login --profile myprofile`
1525* 如果您的 AWS 設定檔中的認證資格協助程式合法需要超過 60 秒來提示您,請使用 [`CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS`](/docs/zh-TW/env-vars) 以毫秒為單位提高限制1680* 如果您的 AWS 設定檔中的認證資格協助程式合法需要超過 60 秒來提示您,請使用 [`CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS`](/docs/zh-TW/env-vars) 以毫秒為單位提高限制
1526 1681
1527<h3 id="could-not-load-aws-or-google-cloud-credentials">1682<h3 id="cloud-gateway-session-expired">
1528 雲端閘道工作階段已過期1683 雲端閘道工作階段已過期
1529</h3>1684</h3>
1530 1685
1547* 在工作階段中執行 `/login` 並完成瀏覽器登入1702* 在工作階段中執行 `/login` 並完成瀏覽器登入
1548* 對於非互動式啟動,在相同環境中啟動 `claude`,執行 `/login`,然後重新執行您的命令1703* 對於非互動式啟動,在相同環境中啟動 `claude`,執行 `/login`,然後重新執行您的命令
1549 1704
1550<h3 id="aws-default-chain-credential-resolve-timed-out">1705<h3 id="sign-in-timed-out-while-waiting-for-you-to-continue">
1551 登入逾時,等待您繼續1706 登入逾時,等待您繼續
1552</h3>1707</h3>
1553 1708
1561 1716
1562* 執行 `/login` 並在登入過期之前確認帳戶1717* 執行 `/login` 並在登入過期之前確認帳戶
1563 1718
1564<h3 id="bedrock-setup-verification-timed-out-waiting-for-aws">1719<h3 id="gateway-refused-the-request">
1565 閘道拒絕了請求1720 閘道拒絕了請求
1566</h3>1721</h3>
1567 1722
1578 1733
1579在 v2.1.273 之前,閘道工作階段上的 403 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,再次登入不會清除拒絕。1734在 v2.1.273 之前,閘道工作階段上的 403 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,再次登入不會清除拒絕。
1580 1735
1581<h3 id="cloud-gateway-session-expired">
1582 Google Cloud 認證資格已過期或無效
1583</h3>
1584
1585您的 [Google Cloud 的 Agent Platform](/docs/zh-TW/google-vertex-ai) Google Cloud 認證資格已過期或被拒絕:請求傳回 401,這是 Agent Platform 報告認證資格過期的方式。
1586
1587中間的動作提示會根據您的設定而異。穩定的部分是前導 `Google Cloud credentials expired or invalid`:
1588
1589```text theme={null}
1590Google Cloud credentials expired or invalid · refresh your Google Cloud credentials (application default sign-in, or the key file in GOOGLE_APPLICATION_CREDENTIALS) and retry · API Error: 401 ...
1591```
1592
1593**該怎麼做:**
1594
1595* 如果提示說認證資格由此環境管理,啟動 Claude Code 的應用程式擁有認證資格,此處的其他步驟不適用:重試,或聯絡您的管理員
1596* 如果您使用應用程式預設認證資格進行驗證,請執行訊息中命名的 [`gcpAuthRefresh`](/docs/zh-TW/google-vertex-ai#advanced-credential-configuration) 命令或 `gcloud auth application-default login`,並完成登入,然後重試
1597* 如果您透過設定 `CLAUDE_CODE_SKIP_VERTEX_AUTH` 的 [LLM 閘道](/docs/zh-TW/llm-gateway)路由,請重新整理 `ANTHROPIC_AUTH_TOKEN` 或 `ANTHROPIC_CUSTOM_HEADERS` 中的閘道權杖,然後重試
1598* 如果您使用服務帳戶金鑰檔案進行驗證,請確認 `GOOGLE_APPLICATION_CREDENTIALS` 指向有效的金鑰。請參閱[設定 GCP 認證資格](/docs/zh-TW/google-vertex-ai#3-configure-gcp-credentials)
1599* 如果重新整理後錯誤重複,請在相同 shell 中使用 `gcloud auth application-default print-access-token` 確認身份在 Claude Code 外有效
1600
1601在 v2.1.273 之前,來自 Agent Platform 的 401 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,無法重新整理 Google Cloud 認證資格。
1602
1603<h3 id="sign-in-timed-out-while-waiting-for-you-to-continue">
1604 Google Cloud 驗證失敗
1605</h3>
1606
1607[Google Cloud 的 Agent Platform](/docs/zh-TW/google-vertex-ai) 傳回 403,它用於授權拒絕而不是過期的認證資格。通常您驗證的身份缺少 IAM 權限,或該模型未為您的專案啟用。
1608
1609中間的動作提示會根據您的設定而異。穩定的部分是前導 `Google Cloud authentication failed`:
1610
1611```text theme={null}
1612Google Cloud authentication failed · refresh your Google Cloud credentials (application default sign-in, or the key file in GOOGLE_APPLICATION_CREDENTIALS) and retry · if credentials are current, check GCP IAM permissions and Vertex AI model access · API Error: 403 ...
1613```
1614
1615**該怎麼做:**
1616
1617* 如果提示說認證資格由此環境管理,啟動 Claude Code 的應用程式擁有認證資格,此處的其他步驟不適用:重試,或聯絡您的管理員
1618* 確認 [IAM 設定](/docs/zh-TW/google-vertex-ai#iam-configuration)中的角色已授予您驗證的身份
1619* 確認該模型已為您的專案啟用。請參閱[要求模型存取](/docs/zh-TW/google-vertex-ai#2-request-model-access)
1620
1621在 v2.1.273 之前,來自 Agent Platform 的 403 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,無法重新整理 Google Cloud 認證資格。
1622
1623<h3 id="gateway-refused-the-request">
1624 Microsoft Foundry 驗證失敗
1625</h3>
1626
1627[Microsoft Foundry](/docs/zh-TW/microsoft-foundry) 傳回 401 或 403:請求上的 Azure 認證資格被拒絕,或其背後的身份沒有存取 Foundry 資源的權限。`/login` 無法鑄造 Azure 認證資格。中間的動作提示會根據您的設定而異。穩定的部分是前導 `Microsoft Foundry authentication failed`:
1628
1629```text theme={null}
1630Microsoft Foundry authentication failed · refresh your Foundry credential (ANTHROPIC_FOUNDRY_AUTH_TOKEN, ANTHROPIC_FOUNDRY_API_KEY, Azure sign-in for Entra, or your proxy token) and retry · if credentials are current, check access to the Foundry resource · API Error: 401 ...
1631```
1632
1633**該怎麼做:**
1634
1635* 如果提示說認證資格由此環境管理,啟動 Claude Code 的應用程式擁有認證資格,此處的其他步驟不適用:重試,或聯絡您的管理員
1636* 重新整理您在[設定 Azure 認證資格](/docs/zh-TW/microsoft-foundry#2-configure-azure-credentials)中設定的認證資格:輪換 `ANTHROPIC_FOUNDRY_API_KEY`、鑄造新的 `ANTHROPIC_FOUNDRY_AUTH_TOKEN`,或執行 `az login` 以便預設 Microsoft Entra 認證資格鏈可以再次登入
1637* 如果認證資格是最新的,請確認身份有權存取 Foundry 資源。請參閱 [Azure RBAC 設定](/docs/zh-TW/microsoft-foundry#azure-rbac-configuration)
1638
1639在 v2.1.273 之前,來自 Microsoft Foundry 的 401 或 403 顯示通用 `Please run /login` 或 `Failed to authenticate` 訊息,無法重新整理 Azure 認證資格。
1640
1641<h2 id="network-and-connection-errors">1736<h2 id="network-and-connection-errors">
1642 網路和連線錯誤1737 網路和連線錯誤
1643</h2>1738</h2>
1677 1772
1678如果 `curl` 成功但 Claude Code 仍然失敗,原因通常是執行時和網路之間的某些東西,而不是網路本身:1773如果 `curl` 成功但 Claude Code 仍然失敗,原因通常是執行時和網路之間的某些東西,而不是網路本身:
1679 1774
1775* 通過執行 `echo $ANTHROPIC_BASE_URL` 檢查 `ANTHROPIC_BASE_URL` 是否已設定,或在 PowerShell 中執行 `echo $env:ANTHROPIC_BASE_URL`,並在您的[設定檔](/docs/zh-TW/settings)的 `env` 區塊中查找它。當它被設定時,Claude Code 會將模型請求傳送到該位址而不是 `api.anthropic.com`,因此指向不再執行的本機代理或閘道的過時值會產生 `Connection refused`,即使 `curl` 到達 API。從您的 shell 設定檔或設定中移除它,並從新終端啟動 Claude Code。
1680* 在 Linux 和 WSL 上,檢查 `/etc/resolv.conf` 是否有無法到達的名稱伺服器。特別是 WSL 可以從主機繼承損壞的解析器。1776* 在 Linux 和 WSL 上,檢查 `/etc/resolv.conf` 是否有無法到達的名稱伺服器。特別是 WSL 可以從主機繼承損壞的解析器。
1681* 在 macOS 上,已斷開連線或卸載的 VPN 用戶端可能會留下隧道介面或路由規則。檢查 `ifconfig` 是否有過時的 `utun` 介面,並在系統設定中移除 VPN 的網路擴充功能。1777* 在 macOS 上,已斷開連線或卸載的 VPN 用戶端可能會留下隧道介面或路由規則。檢查 `ifconfig` 是否有過時的 `utun` 介面,並在系統設定中移除 VPN 的網路擴充功能。
1682* Docker Desktop 和類似的容器執行時可以攔截出站流量。退出它們並重試以排除這種可能性。1778* Docker Desktop 和類似的容器執行時可以攔截出站流量。退出它們並重試以排除這種可能性。
1897* 使用 `claude --remote-control` 啟動新工作階段以建立新的 Remote Control 工作階段1993* 使用 `claude --remote-control` 啟動新工作階段以建立新的 Remote Control 工作階段
1898* 對於其他 Remote Control 啟動訊息,請參閱[Remote Control 疑難排解](/docs/zh-TW/remote-control#troubleshooting)1994* 對於其他 Remote Control 啟動訊息,請參閱[Remote Control 疑難排解](/docs/zh-TW/remote-control#troubleshooting)
1899 1995
1900如果伺服器改為報告前一個工作階段已消失,您不會看到此訊息。Claude Code 會在其位置啟動新工作階段或顯示 [`Previous session is unavailable — run /remote-control to start a new one`](/docs/zh-TW/remote-control#previous-session-is-unavailable),取決於[對話的重新連線記錄](/docs/zh-TW/remote-control#resume-outcomes)。從 v2.1.227 到 v2.1.231,Claude Code 改為顯示以 `Remote Control could not resume the previous session under the current login` 開頭的訊息,[較早的版本行為也不同](/docs/zh-TW/remote-control#reconnect-history)。1996如果伺服器改為報告前一個工作階段已消失,您不會看到此訊息。Claude Code 會在其位置啟動新工作階段或顯示 [`Previous session is unavailable — run /remote-control to start a new one`](/docs/zh-TW/remote-control#previous-session-is-unavailable)。
1901 1997
1902<h3 id="sessions-ended-while-this-machine-was-offline">1998<h3 id="sessions-ended-while-this-machine-was-offline">
1903 此機器離線時工作階段已結束1999 此機器離線時工作階段已結束
1931* 執行 `/feedback` 以傳送文字記錄並描述發生了什麼。如果您的環境中無法使用 `/feedback`,請參閱[報告錯誤](#report-an-error)2027* 執行 `/feedback` 以傳送文字記錄並描述發生了什麼。如果您的環境中無法使用 `/feedback`,請參閱[報告錯誤](#report-an-error)
1932* 如果其他請求也失敗,請檢查您的網路連線並查看[無法連線到 API](#unable-to-connect-to-api)2028* 如果其他請求也失敗,請檢查您的網路連線並查看[無法連線到 API](#unable-to-connect-to-api)
1933 2029
2030<h3 id="couldnt-send-feedback">
2031 無法傳送意見反應
2032</h3>
2033
2034您從 [`/feedback`、`/bug` 或 `/share` 對話方塊](/docs/zh-TW/commands#all-commands)傳送了報告,上傳到 Anthropic 失敗。對話方塊會保留您的文字,以便您可以重試。
2035
2036```text theme={null}
2037Couldn't send feedback (couldn't reach the service). If it keeps failing, you can file at https://github.com/anthropics/claude-code/issues instead.
2038```
2039
2040前綴後的文字會命名失敗的內容:
2041
2042* **`:not signed in. Run /login, then retry.`**:對話方塊僅在 Claude Code 在開啟時找到 Anthropic 認證且到您傳送時沒有可用的認證時上傳。例如,您在此期間在此機器上登出,或您的登入無法再刷新。
2043* **括號內容**:`(server returned <status>)` 是服務的回應代碼;`(request timed out)` 和 `(couldn't reach the service)` 是網路故障。當 Claude Code 無法命名原因時,括號內容不存在。
2044
2045在[意見反應草稿佇列](/docs/zh-TW/tools-reference#sendfeedback-tool-behavior)中,相同的故障以 `The draft is still queued. Try again later.` 結束,草稿保留在佇列中以供另一次嘗試。
2046
2047**該怎麼做:**
2048
2049* 對於未登入的措辭,執行 `/login` 並再次傳送
2050* 否則,再次傳送;如果其他請求也失敗,請檢查您的網路連線並查看[無法連線到 API](#unable-to-connect-to-api)
2051* 如果它持續失敗,請在 [github.com/anthropics/claude-code/issues](https://github.com/anthropics/claude-code/issues) 提交報告,如訊息所說
2052
2053在 v2.1.281 之前,每次傳送在 Remote Control **Stop** 或緊急跨工作階段訊息在對話方塊開啟時到達後都失敗並出現此訊息。在這些版本上,關閉對話方塊,重新開啟它,然後再次傳送。
2054
1934<h2 id="request-errors">2055<h2 id="request-errors">
1935 請求錯誤2056 請求錯誤
1936</h2>2057</h2>
2017 上下文超過令牌限制2138 上下文超過令牌限制
2018</h3>2139</h3>
2019 2140
2020當對話超過模型的上下文視窗時,`/context` 在其輸出頂部顯示此警告。在您釋放空間之前,請求會失敗並出現 [`Prompt is too long`](#prompt-is-too-long)。互動式工作階段將該錯誤顯示為 `Context limit reached` 行。2141`/context` 在其輸出頂部顯示此警告,當對話超過模型的上下文視窗時。在您釋放空間之前,請求會失敗並出現 [`Prompt is too long`](#prompt-is-too-long)。互動式工作階段將該錯誤顯示為 `Context limit reached` 行。
2021 2142
2022```text theme={null}2143```text theme={null}
2023Context exceeds the 200k-token limit by 94k tokens — run /compact or /clear to continue.2144Context exceeds the 200k-token limit by 94k tokens — run /compact or /clear to continue.
2185* 移除或 [禁用](/docs/zh-TW/mcp#disable-a-server-without-removing-it) 聲明無效架構的 MCP 伺服器。該錯誤僅按位置命名工具。在 v2.1.216 或更新版本上,檢查每個伺服器的日誌以查找命名工具的行,其輸入架構會被拒絕。如果沒有日誌命名一個,請逐個禁用伺服器。2306* 移除或 [禁用](/docs/zh-TW/mcp#disable-a-server-without-removing-it) 聲明無效架構的 MCP 伺服器。該錯誤僅按位置命名工具。在 v2.1.216 或更新版本上,檢查每個伺服器的日誌以查找命名工具的行,其輸入架構會被拒絕。如果沒有日誌命名一個,請逐個禁用伺服器。
2186* 如果您維護伺服器,請修復工具的 `input_schema`。架構必須是有效的 JSON Schema,頂級屬性名稱必須為 1 到 64 個字元長,並且只能使用 ASCII 字母和數字、`_`、`.` 和 `-`。請參閱 [Tools with invalid input schemas](/docs/zh-TW/mcp#tools-with-invalid-input-schemas)。2307* 如果您維護伺服器,請修復工具的 `input_schema`。架構必須是有效的 JSON Schema,頂級屬性名稱必須為 1 到 64 個字元長,並且只能使用 ASCII 字母和數字、`_`、`.` 和 `-`。請參閱 [Tools with invalid input schemas](/docs/zh-TW/mcp#tools-with-invalid-input-schemas)。
2187 2308
2309<h3 id="tool-use-name-over-200-characters">
2310 tool\_use.name 超過 200 個字元
2311</h3>
2312
2313對話歷史記錄中的工具呼叫包含超過 API 在請求中接受的 200 個字元的名稱:
2314
2315```text theme={null}
2316API Error: 400 ... tool_use.name: String should have at most 200 characters
2317```
2318
2319Claude Code 在回應到達時以及載入已保存的對話時將此類名稱切割為 200 個字元,因此呼叫失敗,出現普通的 `No such tool available` 工具錯誤,對話在沒有此 API 錯誤的情況下繼續。
2320
2321**該怎麼辦:**
2322
2323* 執行 `claude update`,然後恢復對話。更新的版本在載入文字記錄時修復超長名稱,因此卡住的對話再次工作。
2324
2325在 v2.1.281 之前,超長名稱保留在歷史記錄中,API 拒絕了重新發送對話的每個請求,包括 `/compact` 和 `--resume`,因此此錯誤重複出現,對話被卡住。
2326
2188<h3 id="theres-an-issue-with-the-selected-model">2327<h3 id="theres-an-issue-with-the-selected-model">
2189 選定的模型有問題2328 選定的模型有問題
2190</h3>2329</h3>
2216Model "claud-sonnet-5" is not a recognized model id. Did you mean 'claude-sonnet-5'?2355Model "claud-sonnet-5" is not a recognized model id. Did you mean 'claude-sonnet-5'?
2217```2356```
2218 2357
2219尾部提示命名最接近的匹配別名或模型 ID。當沒有足夠接近的內容時,它讀取 `Run /model to see available models.`。2358尾部提示命名最接近的匹配別名或模型 ID。當沒有足夠接近的內容時,它讀取 `Run /model to see available models.`。在 [Desktop app](/docs/zh-TW/desktop) 啟動的工作階段中,無匹配提示讀取 `Switch to a different model.`
2220 2359
2221Claude Code 在請求切換的時刻在本地產生此錯誤,在任何 API 請求之前。它適用於通過 [Agent SDK](/docs/zh-TW/agent-sdk/typescript) `setModel()` 方法設定模型、由執行 Claude Code CLI 的應用程式(例如 [Desktop app](/docs/zh-TW/desktop))設定,或當您從通過 [Remote Control](/docs/zh-TW/remote-control) 連接的裝置選擇模型時。在 v2.1.260 之前,檢查不涵蓋 Remote Control 選擇,因此 Claude Code 應用了選擇,下一個請求失敗,出現 [There's an issue with the selected model](#theres-an-issue-with-the-selected-model)。2360Claude Code 在請求切換的時刻在本地產生此錯誤,在任何 API 請求之前。它適用於通過 [Agent SDK](/docs/zh-TW/agent-sdk/typescript) `setModel()` 方法設定模型、由執行 Claude Code CLI 的應用程式(例如 [Desktop app](/docs/zh-TW/desktop))設定,或當您從通過 [Remote Control](/docs/zh-TW/remote-control) 連接的裝置選擇模型時。在 v2.1.260 之前,檢查不涵蓋 Remote Control 選擇,因此 Claude Code 應用了選擇,下一個請求失敗,出現 [There's an issue with the selected model](#theres-an-issue-with-the-selected-model)。
2222 2361
2245* 如果您輸入了完整 ID,請根據您提供者的模型目錄檢查它。新推出的模型可能在 Anthropic API 上可用,但您的提供者或區域尚未提供。2384* 如果您輸入了完整 ID,請根據您提供者的模型目錄檢查它。新推出的模型可能在 Anthropic API 上可用,但您的提供者或區域尚未提供。
2246* 在 v2.1.265 之前,`/model` 也以此錯誤拒絕了 `opusplan[1m]` 別名拼寫。在這些版本上,更新 Claude Code,或在 [settings](/docs/zh-TW/model-config#setting-your-model) 中或使用 `--model` 設定模型。2385* 在 v2.1.265 之前,`/model` 也以此錯誤拒絕了 `opusplan[1m]` 別名拼寫。在這些版本上,更新 Claude Code,或在 [settings](/docs/zh-TW/model-config#setting-your-model) 中或使用 `--model` 設定模型。
2247 2386
2387<h3 id="api-error-model-not-changed">
2388 檢查選擇的模型時出現 API 錯誤
2389</h3>
2390
2391您使用 `/model <name>` 選擇了模型,或連接到工作階段的應用程式請求了切換。API 拒絕了 Claude Code 發送以驗證模型的最小請求,原因沒有自己的條目,例如速率限制或伺服器錯誤。工作階段保持其目前模型,訊息以說明這一點結尾:
2392
2393```text theme={null}
2394API error: 429 <the server's explanation> · model not changed
2395```
2396
2397訊息的中間是 HTTP 狀態和伺服器自己的解釋。
2398
2399**該怎麼辦:**
2400
2401* 根據伺服器的解釋採取行動;對於速率限制或 5xx 狀態,等待並再次選擇模型
2402* 具有自己措辭的拒絕由周圍條目涵蓋,例如 [Model not found](#model-not-found) 和 [Model is restricted by your organization's settings](#model-is-restricted-by-your-organizations-settings)
2403
2248<h3 id="claude-opus-is-not-available-with-the-claude-pro-plan">2404<h3 id="claude-opus-is-not-available-with-the-claude-pro-plan">
2249 Claude Opus 不適用於 Claude Pro 方案2405 Claude Opus 不適用於 Claude Pro 方案
2250</h3>2406</h3>
2255Claude Opus is not available with the Claude Pro plan. If you have updated your subscription plan recently, run /logout and /login for the plan to take effect.2411Claude Opus is not available with the Claude Pro plan. If you have updated your subscription plan recently, run /logout and /login for the plan to take effect.
2256```2412```
2257 2413
2414在 Claude Desktop 應用程式執行的工作階段中,訊息說改為 `sign out and sign in again` 而不是命名命令。
2415
2258**該怎麼辦:**2416**該怎麼辦:**
2259 2417
2260* 執行 `/model` 並選擇您的方案包括的模型2418* 執行 `/model` 並選擇您的方案包括的模型
2261* 如果您最近升級了方案但仍然看到這個,請執行 `/logout` 然後 `/login`。儲存的令牌反映您登入時的方案,因此在現有工作階段中在網路上升級不會生效,直到您重新驗證。2419* 如果您最近升級了方案但仍然看到這個,請執行 `/logout` 然後 `/login`。儲存的令牌反映您登入時的方案,因此在現有工作階段中在 claude.ai 上升級不會生效,直到您重新驗證。
2262* 請參閱 [claude.com/pricing](https://claude.com/pricing) 以了解每個方案包括哪些模型2420* 請參閱 [claude.com/pricing](https://claude.com/pricing) 以了解每個方案包括哪些模型
2263 2421
2264<h3 id="claude-code-does-not-support-this-model">2422<h3 id="claude-code-does-not-support-this-model">
2287 模型受您的組織設定限制2445 模型受您的組織設定限制
2288</h3>2446</h3>
2289 2447
2290您的組織管理員已在 claude.ai 管理控制台中禁用此模型,或它被受管設定中的 [`availableModels`](/docs/zh-TW/model-config#restrict-model-selection) 允許清單排除。當受限制的模型使用 `--model`、`ANTHROPIC_MODEL` 或 `model` 設定設定時,Claude Code 替換允許的模型並繼續。為受限制的模型輸入 `/model <name>` 被拒絕,出現 `Run /model to choose a different model.`,工作階段保持其目前模型。替換通知可能也會在工作階段中途出現,在管理員在 claude.ai 管理控制台中禁用工作階段正在執行的模型之後。2448您的組織管理員已在 claude.ai 管理控制台中禁用此模型,或受管設定中的 [`availableModels`](/docs/zh-TW/model-config#restrict-model-selection) 允許清單或 [`deniedModels`](/docs/zh-TW/model-config#block-specific-models-or-versions) 清單排除它。當受限制的模型使用 `--model`、`ANTHROPIC_MODEL` 或 `model` 設定設定時,通知會在啟動時出現,並命名工作階段改為使用的模型。如果受管設定沒有為工作階段留下允許的模型,請參閱 [Managed settings block the default model](#managed-settings-block-the-default-model)。替換通知也可能在工作階段中途出現,在管理員在 claude.ai 管理控制台中禁用工作階段正在執行的模型之後。
2291 2449
2292```text theme={null}2450```text theme={null}
2293Model "claude-opus-4-8" is restricted by your organization's settings. Using claude-sonnet-4-6 instead.2451Model "claude-opus-4-8" is restricted by your organization's settings. Using claude-sonnet-4-6 instead.
2294```2452```
2295 2453
2454為受限制的模型輸入 `/model <name>` 被拒絕,工作階段保持其目前模型。對於在管理控制台中禁用的模型,拒絕讀取 `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.`。對於受管設定排除的模型,它讀取 `Model '<name>' is not available. Your organization restricts model selection.`
2455
2296以代理、技能或命令名稱為前綴的通知意味著限制適用於該 [子代理的請求模型](/docs/zh-TW/sub-agents#choose-a-model):子代理在替換模型上執行,您的工作階段模型保持不變。在 v2.1.223 之前,Claude Code 僅對使用 Agent 工具啟動的子代理顯示通知。2456以代理、技能或命令名稱為前綴的通知意味著限制適用於該 [子代理的請求模型](/docs/zh-TW/sub-agents#choose-a-model):子代理在替換模型上執行,您的工作階段模型保持不變。在 v2.1.223 之前,Claude Code 僅對使用 Agent 工具啟動的子代理顯示通知。
2297 2457
2298Claude Code 將模型系列別名(`opus`、`sonnet`、`haiku` 或 `fable` 之一)視為對該系列的請求,而不是對其最新版本的請求。在 Anthropic API 和 [Claude Platform on AWS](/docs/zh-TW/claude-platform-on-aws) 上,受限制的系列別名解析為您的組織和 `availableModels` 允許清單允許的系列的最新版本,替換通知命名該版本。Claude Code 僅在系列的每個版本都受限制時拒絕 `/model <alias>`。在 v2.1.205 之前,系列別名基於其最新版本單獨替換或拒絕,即使同一系列的較舊版本被允許。2458Claude Code 將模型系列別名(`opus`、`sonnet`、`haiku` 或 `fable` 之一)視為對該系列的請求,而不是對其最新版本的請求。在 Anthropic API 和 [Claude Platform on AWS](/docs/zh-TW/claude-platform-on-aws) 上,受限制的系列別名解析為您的組織的設定允許的系列的最新版本,替換通知命名該版本。Claude Code 僅在系列的每個版本都受限制時拒絕 `/model <alias>`。在 v2.1.205 之前,系列別名基於其最新版本單獨替換或拒絕,即使同一系列的較舊版本被允許。
2299 2459
2300**該怎麼辦:**2460**該怎麼辦:**
2301 2461
2354 2514
2355**該怎麼辦:**2515**該怎麼辦:**
2356 2516
2357* 執行 `claude update` 並重新啟動 Claude Code。Opus 4.7 需要 v2.1.111 或更新版本。Opus 4.8 需要 v2.1.154 或更新版本。Sonnet 5 需要 v2.1.197 或更新版本。Opus 5 需要 v2.1.219 或更新版本。Opus 5.5 需要 v2.1.280 或更新版本2517* 執行 `claude update` 並重新啟動 Claude Code。Opus 4.7 需要 v2.1.111 或更新版本。Opus 4.8 需要 v2.1.154 或更新版本。Sonnet 5 需要 v2.1.197 或更新版本。Opus 5 需要 v2.1.219 或更新版本。Opus 5.5 需要 v2.1.280 或更新版本。Sonnet 5.5 需要 v2.1.284 或更新版本
2358* 如果您無法升級,執行 `/model` 並改為選擇 Opus 4.6 或 Sonnet 4.62518* 如果您無法升級,執行 `/model` 並改為選擇 Opus 4.6 或 Sonnet 4.6
2359* 如果您在 [Agent SDK](/docs/zh-TW/agent-sdk/overview) 中遇到這個,請改為升級 SDK 套件。Opus 4.8 需要 TypeScript SDK v0.3.154 或更新版本和 Python SDK v0.2.88 或更新版本。Sonnet 5 需要 TypeScript SDK v0.3.197 或更新版本。Opus 5 需要 TypeScript SDK v0.3.219 或更新版本。Opus 5.5 需要 TypeScript SDK v0.3.280 或更新版本2519* 如果您在 [Agent SDK](/docs/zh-TW/agent-sdk/overview) 中遇到這個,請改為升級 SDK 套件。Opus 4.8 需要 TypeScript SDK v0.3.154 或更新版本和 Python SDK v0.2.88 或更新版本。Sonnet 5 需要 TypeScript SDK v0.3.197 或更新版本。Opus 5 需要 TypeScript SDK v0.3.219 或更新版本。Opus 5.5 需要 TypeScript SDK v0.3.280 或更新版本。Sonnet 5.5 需要 TypeScript SDK v0.3.284 或更新版本
2360 2520
2361<h3 id="effort-isnt-available-with-thinking-turned-off">2521<h3 id="effort-isnt-available-with-thinking-turned-off">
2362 關閉思考時努力不可用2522 關閉思考時努力不可用
2368API Error: Effort 'xhigh' isn't available with thinking turned off on this model · run /effort high to continue, or turn thinking back on (unset MAX_THINKING_TOKENS=0)2528API Error: Effort 'xhigh' isn't available with thinking turned off on this model · run /effort high to continue, or turn thinking back on (unset MAX_THINKING_TOKENS=0)
2369```2529```
2370 2530
2531`·` 後的提示因表面而異:在非互動式工作階段中,它讀取 `use --effort high (or the effortLevel setting)`,在 Claude Desktop 應用程式執行的工作階段中,它讀取 `you can lower effort to High`。
2532
2371**該怎麼辦:**2533**該怎麼辦:**
2372 2534
2373* [降低努力級別](/docs/zh-TW/model-config#set-the-effort-level) 至 `high` 或以下。2535* [降低努力級別](/docs/zh-TW/model-config#set-the-effort-level) 至 `high` 或以下。
2413* 如果您使用 Opus 4.7 或 Opus 4.8,請先執行 `claude update`。v2.1.156 之前的版本可以在正常工具使用期間觸發此錯誤,`/rewind` 不會清除它。2575* 如果您使用 Opus 4.7 或 Opus 4.8,請先執行 `claude update`。v2.1.156 之前的版本可以在正常工具使用期間觸發此錯誤,`/rewind` 不會清除它。
2414* 執行 `/rewind`,或按 Esc 兩次,以回退到損壞輪次之前的檢查點並從那裡繼續。請參閱 [Checkpointing](/docs/zh-TW/checkpointing) 以了解檢查點如何建立和恢復。2576* 執行 `/rewind`,或按 Esc 兩次,以回退到損壞輪次之前的檢查點並從那裡繼續。請參閱 [Checkpointing](/docs/zh-TW/checkpointing) 以了解檢查點如何建立和恢復。
2415 2577
2578<h3 id="invalid-data-in-redacted-thinking-block">
2579 redacted\_thinking 區塊中的無效資料
2580</h3>
2581
2582API 因為它無法接受對話歷史記錄中較早輪次所帶的 `redacted_thinking` 區塊而拒絕了請求,出現 400。
2583
2584```text theme={null}
2585API Error: 400 ... Invalid `data` in `redacted_thinking` block
2586```
2587
2588Claude Code 將對話的較早思考排除在請求之外並重試一次,因此工作階段在不顯示錯誤的情況下繼續。在 v2.1.282 之前,Claude Code 保留了被拒絕的區塊,每個後續輪次都失敗了相同的錯誤。
2589
2590**該怎麼辦:**
2591
2592* 如果您在 v2.1.281 或更早版本上,每輪都失敗此錯誤,請執行 `claude update` 並恢復工作階段
2593* 如果錯誤持續,執行 `/clear` 以開始不包含該區塊的對話
2594
2416<h3 id="unsupported-tool-content-removed">2595<h3 id="unsupported-tool-content-removed">
2417 移除了不支援的工具內容2596 移除了不支援的工具內容
2418</h3>2597</h3>
2458API 因為對話歷史記錄包含它無法解密的託管網路搜尋內容而拒絕了請求,出現 400。措辭命名它無法讀取的欄位:2637API 因為對話歷史記錄包含它無法解密的託管網路搜尋內容而拒絕了請求,出現 400。措辭命名它無法讀取的欄位:
2459 2638
2460```text theme={null}2639```text theme={null}
2461API Error: 400 messages.21.content.0: Invalid `encrypted_content` in `search_result` block2640API Error: 400 ... Invalid `encrypted_content` in `search_result` block
2462API Error: 400 messages.21.content.3.citations.0: Invalid `encrypted_index` in `text` block2641API Error: 400 ... Invalid `encrypted_index` in `text` block
2463API Error: 400 Failed to decrypt web search result content2642API Error: 400 ... Failed to decrypt web search result content
2643API Error: 400 ... Invalid `encrypted_stdout` in `encrypted_code_execution_result` block
2464```2644```
2465 2645
2466來自 API 託管 [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) 的結果包含只有 API 可以讀取的加密欄位。API 拒絕重播它無法解密的內容的請求,例如為不同組織產生的內容。2646來自 API 託管 [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) 的結果包含只有 API 可以讀取的加密欄位。`encrypted_stdout` 措辭命名讀取此類結果的託管程式碼執行程式的輸出,API 也會加密。API 拒絕重播它無法解密的內容的請求,例如為不同組織產生的內容。
2467 2647
2468Claude Code 自己的 [WebSearch tool](/docs/zh-TW/tools-reference#websearch-tool-behavior) 將搜尋結果記錄為純文字,因此這些區塊通常通過代理或 [LLM gateway](/docs/zh-TW/llm-gateway) 到達對話,該代理或閘道本身執行了託管網路搜尋。2648Claude Code 自己的 [WebSearch tool](/docs/zh-TW/tools-reference#websearch-tool-behavior) 將搜尋結果記錄為純文字,因此這些區塊通常通過代理或 [LLM gateway](/docs/zh-TW/llm-gateway) 到達對話,該代理或閘道本身執行了託管網路搜尋。
2469 2649
2470被拒絕的區塊保留在對話歷史記錄中,因此每個後續輪次和 `/compact` 都失敗了相同的方式。2650對於三個網路搜尋措辭,Claude Code 將搜尋呼叫、結果和引用排除在它發送的內容之外並重試請求一次,因此工作階段在不顯示錯誤的情況下繼續。`encrypted_stdout` 措辭沒有此類恢復,因此該訊息仍然到達您。在 v2.1.282 之前,Claude Code 也保留了被拒絕的網路搜尋區塊,每個後續輪次和 `/compact` 都失敗了相同的方式。
2471 2651
2472**該怎麼辦:**2652**該怎麼辦:**
2473 2653
2474* 執行 `/clear` 或開始新的工作階段;新對話不包含被拒絕的區塊2654* 如果您在 v2.1.281 或更早版本上,每輪都失敗其中一個網路搜尋措辭,請執行 `claude update` 並恢復工作階段
2655* 如果錯誤持續,或訊息命名 `encrypted_stdout`,執行 `/rewind` 以回退到添加內容的輪次之前的檢查點,或執行 `/clear` 以開始不包含它的對話
2475* 如果您在代理或閘道後面執行 Claude Code,請向操作它的人報告錯誤2656* 如果您在代理或閘道後面執行 Claude Code,請向操作它的人報告錯誤
2476 2657
2477<h3 id="usage-policy-refusal">2658<h3 id="usage-policy-refusal">
2478 使用政策拒絕2659 使用政策拒絕
2479</h3>2660</h3>
2480 2661
2481API 拒絕回應,因為對話中的內容觸發了 [Usage Policy](https://www.anthropic.com/legal/aup) 檢查。訊息包括您可以引用給支援的請求 ID,如果您認為拒絕不正確。2662API 拒絕回應,因為對話中的內容觸發了 [Usage Policy](https://www.anthropic.com/legal/aup) 檢查。
2663
2664訊息包括請求 ID 和訊息 ID,您可以引用給支援,如果您認為拒絕不正確。
2482 2665
2483```text theme={null}2666```text theme={null}
2484API Error: Opus 4.6 can't help with this. Start a new session to continue.2667API Error: Opus 4.6 can't help with this. Start a new session to continue.
2508API Error: Opus 4.8's safeguards flagged this message. Our intentionally broad safeguards allow us to deliver more capabilities faster, but can sometimes flag legitimate cybersecurity work. Apply to the Cyber Verification Program to reduce these interruptions. Send feedback with /feedback or learn more: https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude2691API Error: Opus 4.8's safeguards flagged this message. Our intentionally broad safeguards allow us to deliver more capabilities faster, but can sometimes flag legitimate cybersecurity work. Apply to the Cyber Verification Program to reduce these interruptions. Send feedback with /feedback or learn more: https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude
2509```2692```
2510 2693
2511訊息連結到 [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude),它為合法網路安全工作授予存取權限。在 Opus 5.5 上(需要 v2.1.280 或更新版本),訊息改為以 `Opus 5.5's safeguards flagged this session` 開頭。當標記的類別有可用的備用模型時,Claude Code [切換模型](/docs/zh-TW/model-config#automatic-model-fallback) 而不是顯示此錯誤。2694訊息連結到 [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude),它為合法網路安全工作授予存取權限。在 Opus 5.5 和 Sonnet 5.5 上,訊息改為以 `<model>'s safeguards flagged this session` 開頭。當標記的類別有可用的備用模型時,Claude Code [切換模型](/docs/zh-TW/model-config#automatic-model-fallback) 而不是顯示此錯誤。
2512 2695
2513在 [Amazon Bedrock](/docs/zh-TW/amazon-bedrock)、[Google Cloud 的 Agent Platform](/docs/zh-TW/google-vertex-ai) 和 [Microsoft Foundry](/docs/zh-TW/microsoft-foundry) 上,網路安全標記會改為產生 [Usage Policy refusal](#usage-policy-refusal) 訊息。2696在 [Amazon Bedrock](/docs/zh-TW/amazon-bedrock)、[Google Cloud 的 Agent Platform](/docs/zh-TW/google-vertex-ai) 和 [Microsoft Foundry](/docs/zh-TW/microsoft-foundry) 上,網路安全標記會改為產生 [Usage Policy refusal](#usage-policy-refusal) 訊息。
2514 2697
2594 無效的 --agents 設定2777 無效的 --agents 設定
2595</h3>2778</h3>
2596 2779
2597您傳遞給 `--agents` 的值無效,所以 `claude` 以代碼 1 結束而不是啟動工作階段。當您傳遞 `--safe-mode`、`--resume` 或 `--continue`,或設定 [`CLAUDE_CODE_SAFE_MODE`](/docs/zh-TW/env-vars#variables) 時,Claude Code 不會檢查該值並啟動工作階段。在 v2.1.242 之前,Claude Code 仍然啟動工作階段並省略了它無法載入的定義。2780您傳遞給 `--agents` 的值無效,所以 `claude` 以代碼 1 結束而不是啟動工作階段。當您傳遞 `--safe-mode` 或設定 [`CLAUDE_CODE_SAFE_MODE`](/docs/zh-TW/env-vars#variables) 時,Claude Code 忽略 `--agents` 完全。使用 `--resume` 或 `--continue` 時,內聯 JSON 值不被檢查且工作階段啟動;從檔案讀取的值在每次啟動時被檢查。在 v2.1.242 之前,Claude Code 仍然啟動工作階段並省略了它無法載入的定義。
2598 2781
2599```text theme={null}2782```text theme={null}
2600Error: Invalid --agents configuration:2783Error: Invalid --agents configuration:
2603 2786
2604第一行之後的內容取決於值如何失敗。Claude Code 按順序執行這些檢查,並在第一個失敗的檢查處停止。如果您的值有兩種問題,您只有在修復第一個問題後才會看到第二個:2787第一行之後的內容取決於值如何失敗。Claude Code 按順序執行這些檢查,並在第一個失敗的檢查處停止。如果您的值有兩種問題,您只有在修復第一個問題後才會看到第二個:
2605 2788
26061. 當值不能解析為 JSON 時,Claude Code 列印一行 `invalid JSON:` 並帶有 JSON 解析器自己的訊息27891. 當值以 `{` 開頭但不能解析為 JSON 時,或 `--agents` 檔案的內容不解析時,Claude Code 列印一行 `invalid JSON:` 並帶有 JSON 解析器自己的訊息
26072. 當它解析但代理定義不符合 [CLI 定義的子代理](/docs/zh-TW/sub-agents#choose-the-subagent-scope) 的架構時,Claude Code 每個問題列印一行27902. 當它解析但代理定義不符合 [CLI 定義的子代理](/docs/zh-TW/sub-agents#choose-the-subagent-scope) 的架構時,Claude Code 每個問題列印一行
26083. 當代理名稱以 `-` 開頭時,Claude Code 列印 `<name>: agent names must not start with '-'`27913. 當代理名稱以 `-` 開頭時,Claude Code 列印 `<name>: agent names must not start with '-'`
2609 2792
2610當有超過 20 行問題時,Claude Code 列印前 20 行並用 `…and N more` 替換其餘部分。2793當有超過 20 行問題時,Claude Code 列印前 20 行並用 `…and N more` 替換其餘部分。
2611 2794
2795使用 `--print` 時,`--agents` 也接受 [JSON 檔案的路徑](/docs/zh-TW/sub-agents#choose-the-subagent-scope)代替內聯物件。在 v2.1.281 之前,`--agents` 只接受內聯 JSON 並將檔案路徑視為無效 JSON。檔案形式有自己的拒絕,列印代替此訊息,包括這些:
2796
2797* **`Error: --agents takes a JSON object, or a file path only with --print (-p)`**:Claude Code 在互動工作階段中將值讀取為檔案路徑。將定義作為內聯 JSON 傳遞,或新增 `-p` 以從檔案讀取它們。
2798* **`Error: --agents file not found: <path>`**:該路徑不存在檔案。不以 `{` 開頭且不是有效 JSON 的值被讀取為路徑,所以您的 shell 損壞的內聯 JSON 可能以此方式失敗。檢查路徑或引用並再次執行命令。
2799
2612**該怎麼做:**2800**該怎麼做:**
2613 2801
2614* 修復訊息列出的每個問題,然後再次執行命令。請參閱 [CLI 定義的子代理採用的欄位](/docs/zh-TW/sub-agents#choose-the-subagent-scope)。2802* 修復訊息列出的每個問題,然後再次執行命令。請參閱 [CLI 定義的子代理採用的欄位](/docs/zh-TW/sub-agents#choose-the-subagent-scope)。
2756 啟動遠端控制時工作區未受信任2944 啟動遠端控制時工作區未受信任
2757</h3>2945</h3>
2758 2946
2759您在未信任的目錄中使用 `claude remote-control` 或其 `claude rc` 別名啟動[遠端控制](/docs/zh-TW/remote-control)伺服器模式。該命令本身不顯示工作區信任對話框,所以它以代碼 1 結束並命名修復:2947您在未信任的目錄中使用 `claude remote-control` 或其 `claude rc` 別名啟動[遠端控制](/docs/zh-TW/remote-control)伺服器模式,且命令無法詢問您是否信任它。當命令的標準輸入或標準輸出不是終端時,會出現此訊息,例如因為其中一個被重定向或管道化。命令以代碼 1 結束:
2760 2948
2761```text theme={null}2949```text theme={null}
2762Error: Workspace not trusted. Please run `claude` in /Users/you/project first to review and accept the workspace trust dialog.2950Error: Workspace not trusted. Please run `claude` in /Users/you/project first to review and accept the workspace trust dialog.
2763```2951```
2764 2952
2953兩個也以 `Error: Workspace not trusted.` 開頭的變體也會在終端中出現,終端太小而無法顯示信任目錄會開啟什麼,或沒有報告其大小。放大視窗或切換到正常終端視窗,然後再次執行 `claude rc`。
2954
2765在您的主目錄中,訊息是不同的,因為工作區信任對話框永遠不會為主目錄儲存信任,所以在那裡接受它無法滿足此檢查。在 v2.1.214 之前,主目錄顯示上述訊息,其建議無法在那裡成功。2955在您的主目錄中,訊息是不同的,因為工作區信任對話框永遠不會為主目錄儲存信任,所以在那裡接受它無法滿足此檢查。在 v2.1.214 之前,主目錄顯示上述訊息,其建議無法在那裡成功。
2766 2956
2767```text theme={null}2957```text theme={null}
2768Error: Workspace not trusted. /Users/you is your home directory, and for security home-directory trust is never saved, so running `claude` here first won't help. Run `claude rc` from a project directory instead (run `claude` there once to accept the trust dialog).2958Error: Workspace not trusted. /Users/you is your home directory, and for security home-directory trust is never saved, so running `claude` here first won't help. Run `claude rc` from a project directory instead (run `claude` there once to accept the trust dialog).
2769```2959```
2770 2960
2961如果您在 [`Trust <directory>?` 問題](/docs/zh-TW/remote-control#requirements)回答 `n` 或按 Enter,命令會列印一個 `Remote Control did not start` 訊息,命名目錄並以代碼 1 結束。再次執行 `claude rc` 以回答 `y`。
2962
2771**該怎麼做:**2963**該怎麼做:**
2772 2964
2773* 在目錄中執行 `claude`,接受[工作區信任對話框](/docs/zh-TW/permissions#project-allow-rules-and-workspace-trust),然後再次執行 `claude remote-control`2965* 首先從終端信任目錄:在那裡執行 `claude rc` 並回答 `y`,或執行 `claude` 並接受[工作區信任對話框](/docs/zh-TW/permissions#project-allow-rules-and-workspace-trust),然後再次執行您的原始命令
2774* 在您的主目錄中,變更到專案目錄並在那裡啟動遠端控制2966* 在您的主目錄中,變更到專案目錄並在那裡啟動遠端控制
2775 2967
2968在 v2.1.284 之前,命令永遠不會詢問,即使在終端中。
2969
2776<h3 id="not-carried-over-to-the-sessions-remote-control-starts">2970<h3 id="not-carried-over-to-the-sessions-remote-control-starts">
2777 未帶到遠端控制啟動的工作階段2971 未帶到遠端控制啟動的工作階段
2778</h3>2972</h3>
2986* 伺服器端 HEAD 指向沒有人推送的分支的遠端3180* 伺服器端 HEAD 指向沒有人推送的分支的遠端
2987* 沒有 `origin` 遠端的儲存庫,或您從未擷取的儲存庫3181* 沒有 `origin` 遠端的儲存庫,或您從未擷取的儲存庫
2988 3182
2989Claude Code 為任何 [injects dynamic context](/docs/zh-TW/skills#when-an-injected-command-fails) 的 skill 顯示相同的錯誤,失敗的注入命令中止該 skill 的呼叫。兩個同級字串在命令執行之前就會觸發:3183Claude Code 為任何[注入動態上下文](/docs/zh-TW/skills#when-an-injected-command-fails)的 skill 顯示相同的錯誤,失敗的注入命令中止該 skill 的呼叫。兩個同級字串在命令執行之前就會觸發:
2990 3184
2991* `Shell command permission check failed for pattern "..."`: 命令的權限檢查不允許它。[Permission checks on injected commands](/docs/zh-TW/skills#permission-checks-on-injected-commands) 涵蓋在每個權限模式中哪些結果中止以及如何使用 `allowed-tools` 預先批准命令3185* `Shell command permission check failed for pattern "..."`:命令的權限檢查不允許它。[注入命令的權限檢查](/docs/zh-TW/skills#permission-checks-on-injected-commands)涵蓋在每個權限模式中哪些結果中止以及如何使用 `allowed-tools` 預先批准命令
2992* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``: skill 的 frontmatter 在沒有它的機器上要求 bash。安裝 Git for Windows 或將 frontmatter 變更為 `shell: powershell`。請參閱[注入命令如何執行](/docs/zh-TW/skills#how-injected-commands-run)3186* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``:skill 的 frontmatter 在沒有它的機器上要求 bash。安裝 Git for Windows 或將 frontmatter 變更為 `shell: powershell`。請參閱[注入命令如何執行](/docs/zh-TW/skills#how-injected-commands-run)
2993 3187
2994**該怎麼做:**3188**該怎麼做:**
2995 3189
3056 3250
3057Claude Code 建議此工作階段中菜單列出的最接近的命令名稱或別名。當沒有接近的時,訊息在名稱後結束。原因通常是以下之一:3251Claude Code 建議此工作階段中菜單列出的最接近的命令名稱或別名。當沒有接近的時,訊息在名稱後結束。原因通常是以下之一:
3058 3252
3059* 打字錯誤,例如 `/hepl` 代替 `/help`。[How the command menu matches what you type](/docs/zh-TW/commands#how-the-command-menu-matches-what-you-type) 涵蓋在提交前選擇接近的匹配3253* 打字錯誤,例如 `/hepl` 代替 `/help`。[命令菜單如何匹配您輸入的內容](/docs/zh-TW/commands#how-the-command-menu-matches-what-you-type)涵蓋在提交前選擇接近的匹配
3060* 存在但在此工作階段中不可用的命令,因為不符合要求,例如您的平台、計畫或身份驗證方法。[`/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)3254* 存在但在此工作階段中不可用的命令,因為不符合要求,例如您的平台、計畫或身份驗證方法。[`/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)
3061* 來自此工作階段中未安裝或未連接的[外掛程式](/docs/zh-TW/plugins)或 [MCP 伺服器](/docs/zh-TW/mcp#use-mcp-prompts-as-commands)的命令3255* 來自此工作階段中未安裝或未連接的[外掛程式](/docs/zh-TW/plugins/overview)或 [MCP 伺服器](/docs/zh-TW/mcp#use-mcp-prompts-as-commands)的命令
3062 3256
3063Claude Code 只在互動終端工作階段中以此方式回答不符合的 `/` 名稱。在每個其他工作階段中,它改為將提示傳送給 Claude 作為普通訊息,並帶有命令未執行的注意和 Claude 可以在工作階段中執行的命令清單。這些工作階段包括:3257Claude Code 只在互動終端工作階段中以此方式回答不符合的 `/` 名稱。在每個其他工作階段中,它改為將提示傳送給 Claude 作為普通訊息,並帶有命令未執行的注意和 Claude 可以在工作階段中執行的命令清單。這些工作階段包括:
3064 3258
3269* 對於互動工作階段,使用 `claude --resume` 開啟[工作階段選擇器](/docs/zh-TW/sessions#use-the-session-picker),按 `Ctrl+A` 將其擴寬到此機器上的每個專案,然後選擇工作階段3463* 對於互動工作階段,使用 `claude --resume` 開啟[工作階段選擇器](/docs/zh-TW/sessions#use-the-session-picker),按 `Ctrl+A` 將其擴寬到此機器上的每個專案,然後選擇工作階段
3270* 使用 `claude -p` 或 [Agent SDK](/docs/zh-TW/agent-sdk/overview) 建立的工作階段不會出現在選擇器中,所以重新檢查 ID 與您的原始執行列印的 `session_id`3464* 使用 `claude -p` 或 [Agent SDK](/docs/zh-TW/agent-sdk/overview) 建立的工作階段不會出現在選擇器中,所以重新檢查 ID 與您的原始執行列印的 `session_id`
3271 3465
3466<h3 id="windows-reported-an-error-ebadf">
3467 Windows 報告了讀取此工作階段文字記錄檔案時的錯誤 (EBADF)
3468</h3>
3469
3470您在 Windows 上恢復了工作階段,其已儲存的[文字記錄檔案](/docs/zh-TW/sessions#where-transcripts-are-stored)正常開啟,讀取它然後失敗並出現系統錯誤 EBADF。系統錯誤沒有說讀取失敗的原因,所以訊息建議可能的原因和要嘗試的內容:
3471
3472```text theme={null}
3473Windows reported an error (EBADF) when Claude Code read this session's transcript file, although the file had opened normally. This can happen when other software intercepts file reads — security, encryption or endpoint-management tools, for example. If it keeps happening for this conversation, try excluding the folder that holds Claude Code's session transcripts from such software (the .claude folder in your user profile, unless the app or CLAUDE_CONFIG_DIR points Claude Code elsewhere), or adding Claude Code to its allowed applications, then resume again.
3474```
3475
3476訊息遵循命令自己的失敗行,例如 `Failed to resume session <session-id>`。`claude --resume` 或 [`claude -p`](/docs/zh-TW/headless) 命令在顯示它後以代碼 1 結束。在工作階段內的 `/resume` 後,您目前的工作階段保持執行。
3477
3478**該怎麼做:**
3479
3480* 從掃描或攔截檔案讀取的軟體(例如安全、加密或端點管理工具)中排除保有您的工作階段文字記錄的資料夾。文字記錄預設位於 `%USERPROFILE%\.claude\projects` 下,或位於 [`CLAUDE_CONFIG_DIR`](/docs/zh-TW/env-vars) 命名的目錄下
3481* 如果您無法新增排除項,改為將 Claude Code 新增到該軟體的允許應用程式
3482* 再次恢復工作階段
3483
3484在 v2.1.282 之前,失敗沒有解釋:`claude --resume <session-id>` 在 `Failed to resume session <session-id>` 結束,`-p` 執行只列印系統錯誤文字,例如 `Failed to resume session: EBADF: bad file descriptor, read`。
3485
3272<h3 id="cannot-switch-renderers-in-this-session">3486<h3 id="cannot-switch-renderers-in-this-session">
3273 無法在此工作階段中切換轉譯器3487 無法在此工作階段中切換轉譯器
3274</h3>3488</h3>
3452* 將 marketplace 重新命名為不拼寫保留名稱的名稱,然後重新新增它3666* 將 marketplace 重新命名為不拼寫保留名稱的名稱,然後重新新增它
3453* 對於忽略的項目警告,執行它給出的 `claude plugin marketplace remove` 命令,或從 `~/.claude/plugins/known_marketplaces.json` 移除項目3667* 對於忽略的項目警告,執行它給出的 `claude plugin marketplace remove` 命令,或從 `~/.claude/plugins/known_marketplaces.json` 移除項目
3454 3668
3669<h3 id="claude-code-refuses-the-marketplace-name">
3670 Claude Code 拒絕 marketplace 名稱
3671</h3>
3672
3673已註冊的 marketplace 名稱 [冒充官方 Anthropic marketplace](/docs/zh-TW/plugins/marketplace-reference#reserved-names),根據該部分列出的規則。
3674
3675如果 marketplace 是在檢查阻止它之前以這樣的名稱註冊的,marketplace 及從中安裝的 plugin 會停止載入,因為 Claude Code 每次讀取 marketplace 的目錄時都會檢查名稱。當名稱模仿官方名稱時,`claude plugin list` 和 `/plugin` **錯誤** 標籤會報告每個受影響的 plugin,訊息開頭為:
3676
3677```text theme={null}
3678Claude Code refuses the marketplace name "anthropic-plugins-v2"
3679```
3680
3681對於模仿名稱,marketplace 自己的錯誤讀作 `Claude Code refuses this marketplace's name: it looks like one of Anthropic's own`。`claude plugin marketplace add` 拒絕任何冒充名稱,並顯示 `Marketplace name impersonates an official Anthropic/Claude marketplace`。
3682
3683在 v2.1.282 之前,`claude plugin list` 和 `/plugin` 報告模仿名稱的 plugin 也失敗載入,而沒有將 marketplace 名稱命名為原因。
3684
3685**該怎麼做:**
3686
3687* 執行 `claude plugin marketplace remove <name>`。這也會卸載從 marketplace 安裝的 plugin 並刪除其已儲存的資料
3688* 若要改為保留 marketplace,請等待其維護者重新命名它,然後執行 `claude plugin marketplace update <name>`
3689* 如果您發佈 marketplace,請在您的 `marketplace.json` 中重新命名它;使用者然後更新 marketplace 而不是移除它
3690
3455<h3 id="marketplace-is-already-added-from-a-different-source">3691<h3 id="marketplace-is-already-added-from-a-different-source">
3456 Marketplace 已從不同的來源新增3692 Marketplace 已從不同的來源新增
3457</h3>3693</h3>
3621* `Failed to load marketplace configuration`:檔案不是有效的 JSON,或無法讀取。空檔案也會以這種方式失敗。3857* `Failed to load marketplace configuration`:檔案不是有效的 JSON,或無法讀取。空檔案也會以這種方式失敗。
3622* `Marketplace configuration file is corrupted`:檔案是有效的 JSON,但其內容與登錄架構不符。3858* `Marketplace configuration file is corrupted`:檔案是有效的 JSON,但其內容與登錄架構不符。
3623 3859
3624遺失的檔案不是失敗:Claude Code 將其視為沒有marketplace 的登錄。3860遺失的檔案不是失敗:Claude Code 將其視為沒有 marketplace 的登錄。
3625 3861
3626使用空檔案時,`claude plugin install` 報告:3862使用空檔案時,`claude plugin install` 報告:
3627 3863
3654 3890
3655* 詢問您的 claude.ai 組織的管理員以變更 plugin 在 claude.ai 上的必需狀態3891* 詢問您的 claude.ai 組織的管理員以變更 plugin 在 claude.ai 上的必需狀態
3656 3892
3893<h3 id="plugin-was-not-uninstalled">
3894 Plugin 未被卸載
3895</h3>
3896
3897您執行了 [`claude plugin uninstall`](/docs/zh-TW/plugins/cli-reference#plugin-uninstall),或在 `/plugin` **已安裝** 標籤中選擇了 **卸載**,而卸載停止並顯示以 `"<plugin>" was not uninstalled:` 開頭的訊息。
3898
3899當 Claude Code 從 `enabledPlugins` 移除 plugin 的項目並讀回該範圍的設定檔案時,要麼 plugin 仍在該處被開啟,要麼可以開啟它的檔案無法被讀取或檢查。在設定項目可以將其重新開啟時刪除 plugin 的已儲存選項、機密和資料會遺失它們,因此卸載會停止:plugin 保持安裝,它儲存的任何內容都不會被刪除。
3900
3901```text theme={null}
3902✘ Failed to uninstall plugin "formatter": "formatter" was not uninstalled: it is still switched on in /home/user/project/.claude/settings.local.json, although the settings change reported no error. It is still installed. Take it out of "enabledPlugins" in that file yourself, then uninstall it again.
3903```
3904
3905訊息的中間部分命名了檔案和原因:
3906
3907* `it is still switched on in <file>, although the settings change reported no error`:設定寫入報告成功但項目在讀回檔案時仍在那裡
3908* `it is still switched on in <file>, and the settings change failed (<error>)`:檔案無法被儲存,原因在括號中
3909* `<file> is there and could not be read`:檔案存在但無法作為設定讀取,例如因為它不是有效的 JSON,所以它可能仍然啟用 plugin
3910* `<file> (not read: it is on a network path or is a link to one, or could not be checked)`:Claude Code 沒有讀取專案或本機設定檔案,因為檔案或保存它的 `.claude` 資料夾是指向網路位置的連結,或因為它無法檢查該路徑
3911
3912`claude plugin uninstall` 以退出代碼 1 結束,使用 `--json` 時結果帶有 `failureCode: "settings_still_on"`。`/plugin` 顯示相同的訊息。
3913
3914**該怎麼做:**
3915
3916* 遵循訊息的最後一句:修復或替換它命名的設定檔案,或自己從該檔案中的 `enabledPlugins` 移除 plugin 的項目,然後再次執行卸載
3917
3657<h2 id="tool-errors">3918<h2 id="tool-errors">
3658 工具錯誤3919 工具錯誤
3659</h2>3920</h2>
3661這些錯誤來自 Claude 的內建工具。Claude 會自動修正大多數工具錯誤。當需要您進行變更時,該錯誤的**應該怎麼做**清單會說明要變更的內容。3922這些錯誤來自 Claude 的內建工具。Claude 會自動修正大多數工具錯誤。當需要您進行變更時,該錯誤的**應該怎麼做**清單會說明要變更的內容。
3662 3923
3663<h3 id="agent-would-be-spawned-with-zero-tools">3924<h3 id="agent-would-be-spawned-with-zero-tools">
3664 Agent would be spawned with zero tools3925 Agent 會以零個工具生成
3665</h3>3926</h3>
3666 3927
3667子代理的 [`tools` 清單](/docs/zh-TW/sub-agents#supported-frontmatter-fields)中的每個項目都無法符合可用的工具,因此 Claude Code 拒絕啟動子代理:沒有工具,它就無法行動。該訊息會按照出錯的原因將您的項目分組:3928子代理的 [`tools` 清單](/docs/zh-TW/sub-agents#supported-frontmatter-fields)中的每個項目都無法匹配可用的工具,因此 Claude Code 拒絕啟動子代理:沒有工具,它無法採取行動。該訊息會按出錯原因將您的項目分組:
3668 3929
3669* **Unrecognized**:該項目不符合任何工具名稱,通常是打字錯誤,例如 `Grpe` 而非 `Grep`。3930* **無法識別**:該項目不符合任何工具名稱,通常是打字錯誤,例如 `Grpe` 而非 `Grep`。
3670* **Not available to subagents**:該項目命名了一個[子代理無法使用](/docs/zh-TW/sub-agents#available-tools)的真實工具。背景子代理保持較小的內建工具集,因此當子代理在背景中執行時(這是預設行為),只有前景子代理才能使用的項目會出現在此處。如果您列出 `Agent`,該訊息會改為在下一個群組下報告它。3931* **子代理無法使用**:該項目命名了一個[子代理無法使用](/docs/zh-TW/sub-agents#available-tools)的真實工具。背景子代理保持較小的內建工具集,因此當子代理在背景中執行時(這是預設值),只有前景子代理可以使用的項目會出現在此處。如果您列出 `Agent`,該訊息會改為在下一個群組下報告它。
3671* **Matched no tools in this session**:該項目有效,但目前工作階段中沒有工具符合它,例如沒有連接 GitHub MCP 伺服器的 `mcp__github__*`,或在[深度限制](/docs/zh-TW/sub-agents#let-subagents-spawn-their-own-subagents)處的子代理的 `Agent`。3932* **在此工作階段中未匹配任何工具**:該項目有效,但目前工作階段中沒有工具符合它,例如沒有連接 GitHub MCP 伺服器的 `mcp__github__*`,或子代理在[深度限制](/docs/zh-TW/sub-agents#let-subagents-spawn-their-own-subagents)處的 `Agent`。
3672 3933
3673省略 `tools` 欄位永遠不會觸發此拒絕。如果您將 `tools` 清單留空,或 `disallowedTools` 移除其中的每個項目,Claude Code 也會跳過拒絕並啟動沒有工具的子代理。3934省略 `tools` 欄位永遠不會觸發此拒絕。如果您將 `tools` 清單留空,或 `disallowedTools` 移除其中的每個項目,Claude Code 也會跳過拒絕並啟動沒有工具的子代理。
3674 3935
3675在 v2.1.208 之前,子代理啟動時沒有工具,可能會傳回空的或令人困惑的結果。3936在 v2.1.208 之前,子代理會以零個工具啟動,並可能返回空的或令人困惑的結果。
3676 3937
3677```text theme={null}3938```text theme={null}
3678Agent 'code-reviewer' would be spawned with zero tools — refusing. Its tools list resolved to nothing: unrecognized [Grpe]. Fix the agent's tools frontmatter or pass a different subagent_type.3939Agent 'code-reviewer' would be spawned with zero tools — refusing. Its tools list resolved to nothing: unrecognized [Grpe]. Fix the agent's tools frontmatter or pass a different subagent_type.
3682 3943
3683* 根據[子代理可用的工具](/docs/zh-TW/sub-agents#available-tools)修正錯誤命名的每個項目3944* 根據[子代理可用的工具](/docs/zh-TW/sub-agents#available-tools)修正錯誤命名的每個項目
3684* 移除工作階段沒有的工具項目,例如來自未連接伺服器的 MCP 工具3945* 移除工作階段沒有的工具項目,例如來自未連接伺服器的 MCP 工具
3685* 對於[背景子代理會捨棄](/docs/zh-TW/sub-agents#available-tools)的工具(例如 `CronCreate`),移除該項目。若要保留該工具,請[關閉 fork 模式](/docs/zh-TW/sub-agents#turn-fork-mode-on-or-off)並要求 Claude 在前景中執行子代理3946* 對於[背景子代理會捨棄](/docs/zh-TW/sub-agents#available-tools)的工具(例如 `CronCreate`),移除該項目。若要保留該工具,[關閉 fork 模式](/docs/zh-TW/sub-agents#turn-fork-mode-on-or-off)並要求 Claude 在前景中執行子代理
3686* 刪除 `tools` 欄位而不是列出工具,以給予子代理[子代理可用的每個工具](/docs/zh-TW/sub-agents#available-tools)3947* 刪除 `tools` 欄位而不是列出工具,以給予子代理[子代理可用的每個工具](/docs/zh-TW/sub-agents#available-tools)
3687* 對於只包含 `Agent` 的 `tools` 清單,提高[深度限制](/docs/zh-TW/sub-agents#let-subagents-spawn-their-own-subagents)或給予代理至少一個其他工具:Claude Code 在該限制處會拒絕提供 `Agent`,因此只有其他工具的清單會解析為沒有工具3948* 對於只包含 `Agent` 的 `tools` 清單,提高[深度限制](/docs/zh-TW/sub-agents#let-subagents-spawn-their-own-subagents)或給予代理至少一個其他工具:Claude Code 在該限制處會保留 `Agent`,因此只有其他工具的清單會解析為零個工具
3688 3949
3689<h3 id="file-is-covered-by-a-read-deny-rule">3950<h3 id="file-is-covered-by-a-read-deny-rule">
3690 File is covered by a Read deny rule3951 檔案受到 Read 拒絕規則的涵蓋
3691</h3>3952</h3>
3692 3953
3693Edit 或 Write 工具在由 [`Read` 拒絕規則](/docs/zh-TW/permissions#read-and-edit)符合的路徑上被呼叫,包括在該路徑建立新檔案。兩個工具都會變更 Claude 必須能夠讀回的內容,因此 Claude Code 在任何檔案存取之前拒絕該呼叫。NotebookEdit 不受 `Read` 拒絕規則涵蓋。在 v2.1.228 之前,該規則僅阻止 Edit 工具,在 v2.1.208 之前,只有 `Edit` 拒絕規則會阻止編輯。3954Edit 或 Write 工具在由 [`Read` 拒絕規則](/docs/zh-TW/permissions#read-and-edit)匹配的路徑上被呼叫,包括在該路徑建立新檔案。兩個工具都會變更 Claude 必須能夠讀回的內容,因此 Claude Code 在任何檔案存取之前拒絕該呼叫。NotebookEdit 不受 `Read` 拒絕規則涵蓋。在 v2.1.228 之前,該規則僅阻止 Edit 工具,在 v2.1.208 之前,只有 `Edit` 拒絕規則會阻止編輯。
3694 3955
3695```text theme={null}3956```text theme={null}
3696File is covered by a Read deny rule in your permission settings and cannot be edited.3957File is covered by a Read deny rule in your permission settings and cannot be edited.
3703* 如果 Claude 應該能夠變更檔案,請在 `/permissions` 或[設定](/docs/zh-TW/settings-reference#permission-settings)中移除或縮小 `Read` 拒絕規則3964* 如果 Claude 應該能夠變更檔案,請在 `/permissions` 或[設定](/docs/zh-TW/settings-reference#permission-settings)中移除或縮小 `Read` 拒絕規則
3704* 如果檔案必須保持未觸及,請保留該規則並為相同路徑新增 `Edit` 拒絕規則以同時阻止 NotebookEdit 工具3965* 如果檔案必須保持未觸及,請保留該規則並為相同路徑新增 `Edit` 拒絕規則以同時阻止 NotebookEdit 工具
3705 3966
3967<h3 id="path-cannot-contain-null-bytes">
3968 路徑不能包含空位元組
3969</h3>
3970
3971檔案工具呼叫的路徑或模式引數包含空位元組,檔案系統和搜尋工具無法接受。Read、Write、Edit、NotebookEdit、Glob 和 Grep 會檢查此項,訊息會命名工具和引數:
3972
3973```text theme={null}
3974Read file_path cannot contain null bytes (\0). Remove the null byte and try again.
3975```
3976
3977工具呼叫失敗,Claude 看到錯誤,回合繼續。
3978
3979**應該怎麼做:**
3980
3981* 您這邊無需做任何事:錯誤會作為工具的結果返回給 Claude,訊息本身會告訴 Claude 移除空位元組並重試
3982
3983在 v2.1.281 之前,Read、Write、Edit 或 NotebookEdit 路徑中的空位元組會以命名 `Path contains null bytes` 的錯誤結束整個回合,工具永遠不會執行。
3984
3706<h3 id="subagent-type-is-required">3985<h3 id="subagent-type-is-required">
3707 subagent\_type is required3986 subagent\_type 是必需的
3708</h3>3987</h3>
3709 3988
3710```text theme={null}3989```text theme={null}
3711subagent_type is required: the general-purpose agent is not available in this session. Available agents: ...3990subagent_type is required: the general-purpose agent is not available in this session. Available agents: ...
3712```3991```
3713 3992
3714Claude 呼叫了 [Agent 工具](/docs/zh-TW/tools-reference#agent-tool-behavior)但沒有 `subagent_type`,而此工作階段沒有[通用子代理](/docs/zh-TW/sub-agents#built-in-subagents)可作為備用。這在兩種設定中是這樣的情況:3993Claude 呼叫了 [Agent 工具](/docs/zh-TW/tools-reference#agent-tool-behavior)但沒有 `subagent_type`,此工作階段沒有[通用子代理](/docs/zh-TW/sub-agents#built-in-subagents)可作為備用。這在兩種設定中是這樣的情況:
3715 3994
3716* [`CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS=1`](/docs/zh-TW/env-vars) 在非互動模式中設定,這會移除每個內建子代理3995* [`CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS=1`](/docs/zh-TW/env-vars) 在非互動模式中設定,這會移除每個內建子代理
3717* 工作階段的主執行緒代理有一個 [`tools: Agent(...)` 允許清單](/docs/zh-TW/sub-agents#restrict-which-subagents-can-be-spawned),其中不包括 `general-purpose`3996* 工作階段的主執行緒代理有一個 [`tools: Agent(...)` 允許清單](/docs/zh-TW/sub-agents#restrict-which-subagents-can-be-spawned),其中不包括 `general-purpose`
3718 3997
3719**應該怎麼做:**3998**應該怎麼做:**
3720 3999
3721* 通常不需要做任何事:該訊息列出工作階段確實擁有的子代理,因此 Claude 可以使用其中一個重試4000* 通常無需做任何事:訊息會列出工作階段確實擁有的子代理,因此 Claude 可以使用其中一個重試
3722* 如果 Claude 持續失敗,請將 `general-purpose` 新增到 `tools: Agent(...)` 允許清單,或取消設定 `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS`4001* 如果 Claude 持續失敗,請將 `general-purpose` 新增到 `tools: Agent(...)` 允許清單,或取消設定 `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS`
3723 4002
3724在 v2.1.235 之前,相同的呼叫失敗並顯示 `Agent type 'general-purpose' not found`。4003在 v2.1.235 之前,相同的呼叫失敗並顯示 `Agent type 'general-purpose' not found`。
3725 4004
3726<h3 id="memory-index-is-over-its-read-limit">4005<h3 id="memory-index-is-over-its-read-limit">
3727 Memory index is over its read limit4006 記憶體索引超過其讀取限制
3728</h3>4007</h3>
3729 4008
3730Claude 寫入[自動記憶](/docs/zh-TW/memory#auto-memory)索引 `MEMORY.md` 並將其留在其中一個讀取限制之上:200 行或 25KB。寫入成功,但只有前 200 行或 25KB(以先到者為準)在工作階段開始時載入,因此超過限制的所有內容在每次讀取索引時都會被捨棄。在 v2.1.210 之前,超過限制的索引在下次載入時會被無聲地截斷,沒有寫入時間訊號。4009Claude 寫入[自動記憶體](/docs/zh-TW/memory#auto-memory)索引 `MEMORY.md` 並將其留在其讀取限制之一上方:200 行或 25KB。寫入成功,但只有前 200 行或 25KB(以先到者為準)在工作階段開始時載入,因此超過限制的所有內容在每次讀取索引時都會被捨棄。在 v2.1.210 之前,超限索引在下次載入時會被無聲地截斷,沒有寫入時間訊號。
3731 4010
3732```text theme={null}4011```text theme={null}
3733Error: this write left the memory index at MEMORY.md at 214 lines, over its 200-line read limit. The write succeeded, but everything past the limit is silently dropped each time the index is loaded — entries at the end are already invisible to readers. Rewrite it to under 140 lines now: keep one line per entry, move detail into topic files, and merge or drop stale entries.4012Error: this write left the memory index at MEMORY.md at 214 lines, over its 200-line read limit. The write succeeded, but everything past the limit is silently dropped each time the index is loaded — entries at the end are already invisible to readers. Rewrite it to under 140 lines now: keep one line per entry, move detail into topic files, and merge or drop stale entries.
3734```4013```
3735 4014
3736只有載入的內容才計入限制。YAML frontmatter 和區塊級 HTML 註解在索引載入前會被移除,因此它們被排除在測量之外。在 v2.1.211 之前,Claude Code 測量原始檔案,frontmatter 或註解可能會觸發此錯誤,即使載入的內容符合。4015只有載入的內容才計入限制。YAML frontmatter 和區塊級 HTML 註解在索引載入前會被移除,因此它們被排除在測量之外。在 v2.1.211 之前,Claude Code 測量原始檔案,frontmatter 或註解即使在載入的內容符合時也可能觸發此錯誤。
3737 4016
3738Claude Code 在寫入後將錯誤傳遞給 Claude,而不是在您的終端中列印為橫幅,因此您可能只在文字記錄中注意到它。4017Claude Code 在寫入後將錯誤傳遞給 Claude,而不是在您的終端中列印為橫幅,因此您可能只在文字記錄中注意到它。
3739 4018
3740當 Claude 的寫入使檔案接近限制但未超過時,Claude Code 會傳回更溫和的提醒以壓縮索引,而不是此錯誤。4019當 Claude 的寫入使檔案接近限制但未超過時,Claude Code 會返回更溫和的提醒以壓縮索引,而不是此錯誤。
3741 4020
3742**應該怎麼做:**4021**應該怎麼做:**
3743 4022
3744* 讓 Claude 重寫 `MEMORY.md`,或要求它:每個項目保留一行,將詳細資訊移到主題檔案中,並合併或捨棄過時的項目4023* 讓 Claude 重寫 `MEMORY.md`,或要求它:每個項目保留一行,將詳細資訊移到主題檔案中,並合併或捨棄過時的項目
3745* 若要自己修剪索引,請參閱[稽核和編輯您的記憶](/docs/zh-TW/memory#audit-and-edit-your-memory)4024* 若要自己修剪索引,請參閱[稽核和編輯您的記憶體](/docs/zh-TW/memory#audit-and-edit-your-memory)
3746 4025
3747<h3 id="pkill-pattern-matches-the-claude-code-process">4026<h3 id="pkill-pattern-matches-the-claude-code-process">
3748 pkill pattern matches the Claude Code process4027 pkill 模式符合 Claude Code 程序
3749</h3>4028</h3>
3750 4029
3751Bash 工具呼叫中的 `pkill` 命令使用了一個模式(通常使用 `-f`),該模式符合 Claude Code 程序本身,因此 Claude Code 拒絕該命令而不是讓它結束工作階段。Claude Code 在執行 `pkill` 之前使用 `pgrep` 測試該模式,並在其自己的程序 ID 在結果中時拒絕。該檢查僅在 Linux 上執行;在 macOS 上,`pkill` 不經修改地執行。在 v2.1.214 之前,該命令執行,符合的模式會在轉換中途殺死 Claude Code 工作階段。4030Bash 工具呼叫中的 `pkill` 命令使用了一個模式(通常帶有 `-f`),該模式符合 Claude Code 程序本身,因此 Claude Code 拒絕該命令而不是讓它結束工作階段。Claude Code 在執行 `pkill` 之前使用 `pgrep` 測試模式,並在結果中包含其自己的程序 ID 時拒絕。檢查僅在 Linux 上執行;在 macOS 上,`pkill` 不經修改地執行。在 v2.1.214 之前,命令執行,符合的模式在回合中途殺死了 Claude Code 工作階段。
3752 4031
3753```text theme={null}4032```text theme={null}
3754pkill: refusing to run — this pattern matches the Claude CLI process (PID 12345). Narrow the pattern, or target your own children with `pkill -P $$ ...`.4033pkill: refusing to run — this pattern matches the Claude CLI process (PID 12345). Narrow the pattern, or target your own children with `pkill -P $$ ...`.
3762* 若要停止由目前 shell 啟動的程序,請使用 `pkill -P $$` 搭配模式,這會將符合限制為 shell 自己的子程序4041* 若要停止由目前 shell 啟動的程序,請使用 `pkill -P $$` 搭配模式,這會將符合限制為 shell 自己的子程序
3763 4042
3764<h3 id="failed-to-write-to-a-teammate-inbox">4043<h3 id="failed-to-write-to-a-teammate-inbox">
3765 Failed to write to a teammate's inbox4044 無法寫入隊友的收件匣
3766</h3>4045</h3>
3767 4046
3768Claude Code 無法將訊息寫入 `~/.claude/teams/{team-name}/inboxes/` 下的隊友信箱檔案,因此收件人沒有收到任何內容。當 Claude Code 無法建立或更新檔案時寫入失敗,例如因為磁碟已滿、目錄不可寫,或另一個代理長時間持有收件箱鎖定。在 v2.1.224 之前,Claude Code 即使寫入失敗也會報告訊息已傳送。4047Claude Code 無法將訊息寫入 `~/.claude/teams/{team-name}/inboxes/` 下隊友的信箱檔案,因此收件者沒有收到任何內容。當 Claude Code 無法建立或更新檔案時寫入失敗,例如因為磁碟已滿、目錄不可寫,或另一個代理長時間持有收件匣鎖。在 v2.1.224 之前,Claude Code 即使寫入失敗也會報告訊息已傳送。
3769 4048
3770該錯誤出現在傳送代理的工具結果中,而不是作為您終端中的橫幅,其文字告訴 Claude 重試:4049錯誤出現在傳送代理的工具結果中,而不是作為您終端中的橫幅,其文字告訴 Claude 重試:
3771 4050
3772```text theme={null}4051```text theme={null}
3773Failed to write to researcher's inbox — nothing was sent. Try again, or message the lead.4052Failed to write to researcher's inbox — nothing was sent. Try again, or message the lead.
3775 4054
3776結構化[代理團隊](/docs/zh-TW/agent-teams)協議訊息以相同方式失敗,錯誤命名未傳遞的訊息:當 Claude Code 無法寫入計畫核准、計畫拒絕、關閉要求或關閉拒絕時,錯誤讀作 `Failed to write the <message> to <name>'s inbox — nothing was sent`。該清單中的 `plan approval` 是領導者核准隊友計畫的決定;隊友的計畫提交是單獨的 `plan approval request` 訊息。該訊息和另外兩個協議訊息帶有自己的訊息文字和後果:4055結構化[代理團隊](/docs/zh-TW/agent-teams)協議訊息以相同方式失敗,錯誤命名未傳遞的訊息:當 Claude Code 無法寫入計畫核准、計畫拒絕、關閉要求或關閉拒絕時,錯誤讀作 `Failed to write the <message> to <name>'s inbox — nothing was sent`。該清單中的 `plan approval` 是領導者核准隊友計畫的決定;隊友的計畫提交是單獨的 `plan approval request` 訊息。該訊息和另外兩個協議訊息帶有自己的訊息文字和後果:
3777 4056
3778* `Failed to write the plan approval request to the lead's inbox — plan not submitted; try again`:隊友的計畫從未到達領導者,隊友保持在計畫模式,直到重新提交成功4057* `Failed to write the plan approval request to the lead's inbox — plan not submitted; try again`:隊友的計畫永遠沒有到達領導者,隊友保持在計畫模式直到重新提交成功
3779* `The permission request could not be delivered to the team lead (mailbox write failed)`:隊友的權限要求從未到達領導者,因此沒有人核准工具呼叫4058* `The permission request could not be delivered to the team lead (mailbox write failed)`:隊友的權限要求永遠沒有到達領導者,因此沒有人核准工具呼叫
3780* `The confirmation could not be written to team-lead's inbox.`:關閉核准本身生效,隊友退出;只有對領導者的確認遺失4059* `The confirmation could not be written to team-lead's inbox.`:關閉核准本身生效,隊友退出;只有對領導者的確認遺失
3781 4060
3782當您自己訊息隊友時,在領導者工作階段中輸入 `@name` 後跟訊息,相同的失敗會顯示為通知 `Couldn't write to @name's inbox — message not sent. Try again.`,Claude Code 會將您的文字保留在提示框中,以便您可以再次傳送。4061當您自己訊息隊友時,在領導者工作階段中輸入 `@name` 後跟訊息,相同的失敗會顯示為通知 `Couldn't write to @name's inbox — message not sent. Try again.`,Claude Code 會將您的文字保留在提示框中,以便您可以再次傳送。
3783 4062
3784**應該怎麼做:**4063**應該怎麼做:**
3785 4064
3786* 要求傳送者重新傳送訊息;收件箱鎖定的爭用是暫時的,在重試時會清除4065* 要求傳送者重新傳送訊息;收件匣鎖的爭用是暫時的,在重試時會清除
3787* 檢查可用磁碟空間,並檢查 `~/.claude/teams` 及其下的檔案是否可由您的使用者寫入4066* 檢查可用磁碟空間,並檢查 `~/.claude/teams` 及其下的檔案是否可由您的使用者寫入
3788 4067
3789<h3 id="teammate-agent-definition-not-restored">4068<h3 id="teammate-agent-definition-not-restored">
3790 Teammate's agent definition was not restored4069 隊友的代理定義未被復原
3791</h3>4070</h3>
3792 4071
3793Claude 訊息了一個已停止的[代理團隊](/docs/zh-TW/agent-teams)隊友,Claude Code 將其恢復而沒有重新應用它生成的[子代理定義](/docs/zh-TW/agent-teams#use-subagent-definitions-for-teammates),因為其定義檔案來自沒有已儲存信任的資料夾。該通知在傳送代理的工具結果中的恢復報告之後:4072Claude 訊息了一個已停止的[代理團隊](/docs/zh-TW/agent-teams)隊友,Claude Code 將其恢復而沒有重新應用[子代理定義](/docs/zh-TW/agent-teams#use-subagent-definitions-for-teammates)它是從中生成的,因為其定義檔案來自沒有已儲存信任的資料夾。通知在傳送代理的工具結果中的恢復報告之後:
3794 4073
3795```text wrap theme={null}4074```text wrap theme={null}
3796Its agent definition was not restored: the folder its definition file came from is not trusted (source: projectSettings), so the teammate is running with the team-essential tools and no custom instructions. To restore it, the user needs to run Claude Code in that folder once and accept the trust dialog (the --debug log names the folder); do not change trust settings on the user's behalf.4075Its agent definition was not restored: the folder its definition file came from is not trusted (source: projectSettings), so the teammate is running with the team-essential tools and no custom instructions. To restore it, the user needs to run Claude Code in that folder once and accept the trust dialog (the --debug log names the folder); do not change trust settings on the user's behalf.
3797```4076```
3798 4077
3799該檢查適用於專案的 `.claude/agents/` 目錄或 `--add-dir` 目錄中的定義,接受父資料夾的信任對話不滿足它。4078檢查適用於專案的 `.claude/agents/` 目錄或 `--add-dir` 目錄中的定義,接受父資料夾的信任對話不滿足它。
3800 4079
3801**應該怎麼做:**4080**應該怎麼做:**
3802 4081
3804* 或在 `~/.claude.json` 中將 `hasTrustDialogAccepted` 項目設定為 `true`,使用偵錯日誌列印的確切 `projects["<path>"]` 鍵4083* 或在 `~/.claude.json` 中將 `hasTrustDialogAccepted` 項目設定為 `true`,使用偵錯日誌列印的確切 `projects["<path>"]` 鍵
3805 4084
3806<h3 id="message-too-large-for-cross-session-delivery">4085<h3 id="message-too-large-for-cross-session-delivery">
3807 Message too large for cross-session delivery4086 跨工作階段傳遞的訊息太大
3808</h3>4087</h3>
3809 4088
3810Claude 的[跨工作階段訊息](/docs/zh-TW/cross-session-messaging)到此機器上您的另一個工作階段太長而無法傳送。Claude Code 拒絕了它,接收工作階段沒有收到任何內容。拒絕出現在傳送工作階段的工具結果中,而不是作為您終端中的橫幅。它命名了兩個大小以及如何使訊息符合:4089Claude 的[跨工作階段訊息](/docs/zh-TW/cross-session-messaging)到此機器上您的另一個工作階段太長而無法傳送。Claude Code 拒絕了它,接收工作階段沒有收到任何內容。拒絕出現在傳送工作階段的工具結果中,而不是作為您終端中的橫幅。它命名兩個大小以及如何使訊息符合:
3811 4090
3812```text wrap theme={null}4091```text wrap theme={null}
3813Failed to send to api-worker: Message too large for cross-session delivery: the serialized message is 1,203,844 characters and the limit is 1,048,576. Shorten the message text — put bulk content in a file the recipient can read rather than in the message — or split it into smaller messages.4092Failed to send to api-worker: Message too large for cross-session delivery: the serialized message is 1,203,844 characters and the limit is 1,048,576. Shorten the message text — put bulk content in a file the recipient can read rather than in the message — or split it into smaller messages.
3814```4093```
3815 4094
3816重新傳送相同的文字以相同的方式失敗。4095重新傳送相同的文字以相同方式失敗。
3817 4096
3818**應該怎麼做:**4097**應該怎麼做:**
3819 4098
3820* 要求 Claude 總結訊息,或將大量內容放在收件人可以讀取的檔案中並傳送檔案的路徑4099* 要求 Claude 總結訊息,或將大量內容放在收件者可以讀取的檔案中
3821* 要求 Claude 將內容分割成幾個較短的訊息4100* 要求 Claude 將內容分割成幾個較短的訊息
3822 4101
3823在 v2.1.235 之前,Claude Code 報告超大訊息已傳送。接收工作階段未讀就捨棄了它。4102在 v2.1.235 之前,Claude Code 報告超大訊息已傳送。接收工作階段未讀地捨棄了它。
3824 4103
3825<h3 id="too-many-messages-to-this-session-just-now">4104<h3 id="too-many-messages-to-this-session-just-now">
3826 Too many messages to this session just now4105 此工作階段剛才收到太多訊息
3827</h3>4106</h3>
3828 4107
3829Claude 向此機器上您的一個工作階段傳送了快速的[跨工作階段訊息](/docs/zh-TW/cross-session-messaging)爆發,該爆發達到了該工作階段的收件箱接受的內容。Claude Code 拒絕了下一個傳送,接收工作階段沒有收到任何內容。拒絕出現在傳送工作階段的工具結果中,而不是作為您終端中的橫幅:4108Claude 向此機器上您的一個工作階段傳送了快速的[跨工作階段訊息](/docs/zh-TW/cross-session-messaging)爆發,爆發達到該工作階段的收件匣接受的內容。Claude Code 拒絕了下一個傳送,接收工作階段沒有收到任何內容。拒絕出現在傳送工作階段的工具結果中,而不是作為您終端中的橫幅:
3830 4109
3831```text wrap theme={null}4110```text wrap theme={null}
3832Failed to send to api-worker: Too many messages to this session just now: 30 were sent recently and more would be dropped by its rate limit, so this one was not sent. Batch what remains into one message, or wait a little before sending more.4111Failed to send to api-worker: Too many messages to this session just now: 30 were sent recently and more would be dropped by its rate limit, so this one was not sent. Batch what remains into one message, or wait a little before sending more.
3834 4113
3835**應該怎麼做:**4114**應該怎麼做:**
3836 4115
3837* 通常不需要做任何事:Claude 將剩餘內容批次處理為一個訊息,或在傳送更多內容之前等待4116* 通常無需做任何事:Claude 將剩餘內容批次處理為一個訊息,或在傳送更多內容之前等待
3838* 如果您自己提示了爆發,請要求 Claude 將剩餘內容合併為單一訊息4117* 如果您自己提示了爆發,要求 Claude 將剩餘內容合併為單一訊息
3839 4118
3840在 v2.1.236 之前,Claude Code 報告這些傳送已傳送。接收工作階段未讀就捨棄了它們。4119在 v2.1.236 之前,Claude Code 報告這些傳送已傳送。接收工作階段未讀地捨棄了它們。
3841 4120
3842<h3 id="refusing-to-send-a-cross-session-message">4121<h3 id="refusing-to-send-a-cross-session-message">
3843 Refusing to send a cross-session message4122 拒絕傳送跨工作階段訊息
3844</h3>4123</h3>
3845 4124
3846在 Claude Code 將[跨工作階段訊息](/docs/zh-TW/cross-session-messaging)寫入此機器上您的另一個工作階段之前,它會檢查目標工作階段的收件箱通訊端是否是訊息定址到的端點。當檢查失敗時,Claude Code 在傳送工作階段中拒絕傳送,目標工作階段沒有收到任何內容。對於 Claude 傳送的訊息,拒絕出現在傳送工作階段的工具結果中:4125在 Claude Code 將[跨工作階段訊息](/docs/zh-TW/cross-session-messaging)寫入此機器上您的另一個工作階段之前,它會檢查目標工作階段的收件匣通訊端是否是訊息定址到的端點。當檢查失敗時,Claude Code 拒絕傳送,目標工作階段收不到任何內容。對於 Claude 傳送的訊息,拒絕出現在傳送工作階段的工具結果中:
3847 4126
3848```text theme={null}4127```text theme={null}
3849Failed to send to api-worker: Refusing to send: reply target is a symlink4128Failed to send to api-worker: Refusing to send: reply target is a symlink
3855* `cannot vet reply target`:Claude Code 根本無法檢查目標路徑,例如因為讀取失敗並出現權限錯誤。4134* `cannot vet reply target`:Claude Code 根本無法檢查目標路徑,例如因為讀取失敗並出現權限錯誤。
3856* `connected endpoint is not the expected process`:持有通訊端的程序不是訊息定址到的工作階段,因此位址已過時或另一個程序取代了通訊端。4135* `connected endpoint is not the expected process`:持有通訊端的程序不是訊息定址到的工作階段,因此位址已過時或另一個程序取代了通訊端。
3857* `connected endpoint identity could not be read`:Claude Code 已連接但無法讀取哪個程序持有另一端,因此無法確認目標。這可能是暫時的。4136* `connected endpoint identity could not be read`:Claude Code 已連接但無法讀取哪個程序持有另一端,因此無法確認目標。這可能是暫時的。
3858* `connected endpoint is not owned by this user`:持有通訊端的程序以不同的使用者帳戶執行,因此它不是您的其中一個工作階段。4137* `connected endpoint is not owned by this user`:持有通訊端的程序以不同的使用者帳戶執行,因此它不是您的工作階段之一。
3859* `connected endpoint owner could not be read`:Claude Code 已連接但無法讀取哪個使用者帳戶擁有另一端,因此無法確認端點是您的。4138* `connected endpoint owner could not be read`:Claude Code 已連接但無法讀取哪個使用者帳戶擁有另一端,因此無法確認端點是您的。
3860* `connected endpoint is a different process with the expected pid`:程序 ID 符合訊息定址到的 ID,但 Claude Code 無法確認它是相同的程序。通常該工作階段已退出,作業系統重新使用了其程序 ID,因此位址已過時。4139* `connected endpoint is a different process with the expected pid`:程序 ID 符合訊息定址到的 ID,但 Claude Code 無法確認它是相同的程序。通常該工作階段已退出,作業系統重新使用了其程序 ID,因此位址已過時。
3861 4140
3862**應該怎麼做:**4141**應該怎麼做:**
3863 4142
3864* 通常不需要做任何事:檢查會防止訊息到達定址到的工作階段以外的端點,沒有傳送任何內容4143* 通常無需做任何事:檢查會防止訊息到達定址到的工作階段以外的端點,沒有任何內容被傳送
3865* 要求 Claude 再次列出您的工作階段並重新傳送;由過時位址引起的拒絕在 Claude 傳送到目前的工作階段後會清除4144* 要求 Claude 再次列出您的工作階段並重新傳送;由過時位址引起的拒絕在 Claude 傳送到目前的工作階段後清除
3866* 如果 `reply target is a symlink` 對一個工作階段重複,請檢查在該工作階段的通訊端路徑建立連結的內容,顯示在其 `/status` 下的 `Peer address`4145* 如果 `reply target is a symlink` 對一個工作階段重複,檢查在該工作階段的通訊端路徑(顯示在其 `/status` 下的 `Peer address`)建立連結的內容
3867* 對於 `connected endpoint identity could not be read`,重新傳送;該條件可能是暫時的4146* 對於 `connected endpoint identity could not be read`,重新傳送;該條件可能是暫時的
3868* 如果 `connected endpoint is not owned by this user` 出現在共用機器上,該位址處的工作階段以另一個使用者的帳戶執行,因此 Claude 無法從您的帳戶訊息它4147* 如果 `connected endpoint is not owned by this user` 出現在共用機器上,該位址處的工作階段以另一使用者帳戶執行,因此 Claude 無法從您的帳戶訊息它
3869 4148
3870在 v2.1.248 之前,Claude Code 沒有檢查端點的擁有使用者或程序啟動時間,因此命名這些檢查的拒絕不會出現在較早的版本上。4149在 v2.1.248 之前,Claude Code 沒有檢查端點的擁有使用者或程序啟動時間,因此命名這些檢查的拒絕不會出現在較早的版本上。
3871 4150
3872<h3 id="refusing-after-a-symlink-changed">4151<h3 id="refusing-after-a-symlink-changed">
3873 Refusing to read, write, or search a path4152 拒絕讀取、寫入或搜尋路徑
3874</h3>4153</h3>
3875 4154
3876Claude Code 檢查檔案路徑的[權限規則](/docs/zh-TW/permissions#read-and-edit),然後在工具開啟檔案或啟動搜尋時再次確認該解析。當它無法確認路徑仍然導向檢查核准的位置時,Claude Code 拒絕該操作而不是跟隨它。拒絕出現在工具結果中:4155Claude Code 檢查檔案路徑的[權限規則](/docs/zh-TW/permissions#read-and-edit),然後在工具開啟檔案或啟動搜尋時再次確認該解析。當它無法確認路徑仍然導向檢查核准的位置時,Claude Code 拒絕操作而不是跟隨它。拒絕出現在工具結果中:
3877 4156
3878```text wrap theme={null}4157```text wrap theme={null}
3879Refusing to read /path/to/file: its symlink resolution changed after permission was checked (a link on the way now leads somewhere the check did not see). If a link in the working directory is being rewritten concurrently, stop that and retry.4158Refusing to read /path/to/file: its symlink resolution changed after permission was checked (a link on the way now leads somewhere the check did not see). If a link in the working directory is being rewritten concurrently, stop that and retry.
3881 4160
3882每個拒絕命名其原因:4161每個拒絕命名其原因:
3883 4162
3884* `its symlink resolution changed after permission was checked`:路徑上的符號連結或 Grep 或 Glob 搜尋根目錄在權限檢查和操作之間被取代。在讀取拒絕中,括號中的短語命名哪個比較失敗。4163* `its symlink resolution changed after permission was checked`:路徑上的符號連結或 Grep 或 Glob 搜尋根在權限檢查和操作之間被取代。在讀取拒絕中,括號中的短語命名哪個比較失敗。
3885* `its parent-directory symlink resolution changed after permission was checked`:寫入路徑通過的目錄不再解析為核准的位置4164* `its parent-directory symlink resolution changed after permission was checked`:寫入路徑通過的目錄不再解析為核准的位置
3886* `it is a symbolic link. Write to the link's target path instead`:符號連結位於核准的寫入位置本身,例如 `CLAUDE.md` 是 `AGENTS.md` 的符號連結;訊息指導 Claude 到連結的目標4165* `where it leads on disk could not be determined (a link on the way could not be examined, or the links do not resolve)`:Claude Code 無法跟隨路徑到磁碟上的最終位置,例如因為路徑上的符號連結形成迴圈
3887* `Refusing to write through symlink: <path>. Resolve the symlink and pass the real target path explicitly.`:相同的條件在另一個寫入器開啟檔案時被捕捉,例如寫入符號連結的 `.mcp.json`4166* `it is a symbolic link. Write to the link's target path instead`:符號連結位於核准的寫入位置本身,例如 `CLAUDE.md` 是 `AGENTS.md` 的符號連結;訊息將 Claude 導向連結的目標
3888* `Refusing to write into symlinked directory: <path>`:持有檔案的目錄本身是符號連結,例如專案的 `.claude/` 目錄連結到另一個位置4167* `Refusing to write through symlink: <path>. Resolve the symlink and pass the real target path explicitly.`:當另一個寫入器開啟檔案時捕獲的相同條件,例如寫入符號連結的 `.mcp.json`
4168* `Refusing to write into symlinked directory: <path>`:持有檔案的目錄本身是符號連結,例如專案的 `.claude/` 目錄連結到另一位置
3889* `a path one of its Read deny rules is written through changed while the search was being prepared. Retry.`:搜尋的 `Read` 拒絕規則命名通過符號連結的路徑,該連結在 Claude Code 準備搜尋時變更4169* `a path one of its Read deny rules is written through changed while the search was being prepared. Retry.`:搜尋的 `Read` 拒絕規則命名通過符號連結的路徑,該連結在 Claude Code 準備搜尋時變更
3890* `it could not be opened (EACCES) — it is unreadable, or is being replaced concurrently.`:搜尋根目錄存在但無法開啟;括號中的代碼是作業系統錯誤4170* `it could not be opened (EACCES) — it is unreadable, or is being replaced concurrently.`:搜尋根存在但無法開啟;括號中的代碼是作業系統錯誤
3891* `its permission check expired before it ran (too many concurrent file operations). Retry.`:Claude Code 在許多同時檔案操作下驅逐了核准記錄,然後工具使用它;重試執行新的權限檢查4171* `its permission check expired before it ran (too many concurrent file operations). Retry.`:Claude Code 在許多同時檔案操作下驅逐核准記錄,工具使用它之前;重試執行新鮮的權限檢查
3892* `ripgrep was found only by name on PATH, and a search outside the working directory cannot apply your Read deny rules in that configuration`:Claude Code 無法將 `rg` 二進位檔解析為絕對路徑,因此它拒絕在工作目錄外的搜尋,而不是執行您的拒絕規則不涵蓋的搜尋4172* `ripgrep was found only by name on PATH, and a search outside the working directory cannot apply your Read deny rules in that configuration`:Claude Code 無法將 `rg` 二進位檔解析為絕對路徑,因此它拒絕工作目錄外的搜尋,而不是執行您的拒絕規則不涵蓋的搜尋
3893 4173
3894**應該怎麼做:**4174**應該怎麼做:**
3895 4175
3896* 通常不需要做任何事:拒絕到達 Claude 作為工具結果,被拒絕的操作不執行4176* 通常無需做任何事:拒絕到達 Claude 作為工具結果,被拒絕的操作不執行
3897* 如果符號連結拒絕在一個路徑上重複,請找到持續重寫連結的內容,例如建置工具或檔案監視程式,或要求 Claude 使用檔案的已解析路徑而不是連結的路徑4177* 如果符號連結拒絕在一個路徑上重複,找到什麼持續重寫那裡的連結,例如建置工具或檔案監視程式,或要求 Claude 使用檔案的已解析路徑而不是連結的路徑
3898* 如果此拒絕在 Windows 上的 AppContainer 或受限權杖沙箱內執行 Claude Code 時出現在每個檔案上,請升級到 v2.1.265 或更新版本4178* 如果此拒絕在 Windows 上 Claude Code 在 AppContainer 或受限權杖沙箱內執行時出現,升級到 v2.1.265 或更新版本
3899* 如果讀取拒絕在 macOS 上出現在沒有任何內容重寫的檔案上,例如拖入提示的螢幕擷取畫面,請升級到 v2.1.273 或更新版本4179* 如果讀取拒絕在 macOS 上出現,針對沒有任何內容重寫的檔案,例如拖入提示的螢幕擷取畫面,升級到 v2.1.273 或更新版本
3900* 對於 ripgrep 拒絕,使用您的套件管理員安裝 ripgrep,以便 `rg` 在 `PATH` 上解析為絕對路徑,或將搜尋保留在工作目錄下4180* 對於 ripgrep 拒絕,使用您的套件管理員安裝 ripgrep,使 `rg` 解析為 `PATH` 上的絕對路徑,或將搜尋保留在工作目錄下
4181
4182在 v2.1.251 之前,Claude Code 僅針對檔案寫入重新檢查路徑的解析,因此在權限檢查後取代的連結可能會將讀取或搜尋重新導向到不同位置而沒有訊息。其中,只有父目錄、透過符號連結和符號連結目錄寫入拒絕出現在較早的版本上。
3901 4183
3902在 v2.1.251 之前,Claude Code 僅對檔案寫入重新檢查路徑的解析,因此在權限檢查後取代的連結可能會將讀取或搜尋重新導向到不同的位置,沒有訊息。在這些拒絕中,只有父目錄、透過符號連結和符號連結目錄寫入拒絕出現在較早的版本上。4184在 v2.1.280 之前,`where it leads on disk could not be determined` 拒絕沒有出現。
3903 4185
3904<h3 id="task-output-swap-refused">4186<h3 id="task-output-swap-refused">
3905 Task output swap refused4187 工作輸出交換被拒絕
3906</h3>4188</h3>
3907 4189
3908Claude Code 將每個 Bash 命令的輸出儲存到其暫存目錄下的檔案。每次它開啟其中一個檔案時,它都會檢查路徑是否仍然導向它建立的檔案,沒有符號連結、額外硬連結或移動的目錄重新導向它。此訊息表示該檢查失敗,因此 Claude Code 拒絕了該操作,而不是透過該路徑寫入或讀取輸出。該訊息出現在 Bash 工具結果中:4190Claude Code 將每個 Bash 命令的輸出儲存到其暫存目錄下的檔案。每次它開啟其中一個檔案時,它都會檢查路徑是否仍然導向它建立的檔案,沒有符號連結、額外硬連結或移動的目錄重新導向它。此訊息表示該檢查失敗,因此 Claude Code 拒絕操作而不是透過該路徑寫入或讀取輸出。訊息出現在 Bash 工具結果中:
3909 4191
3910```text wrap theme={null}4192```text wrap theme={null}
3911task output swap refused (tasks dir moved or linked): /private/tmp/claude-501/-Users-you-my-project/1f0e62dc-4b0a-4f5e-9c2d-8a7b6c5d4e3f/tasks/b7k2f9m3q.output. To recover: restart Claude Code with CLAUDE_CODE_TMPDIR set to a fresh directory; or, if /private/tmp/claude-501/-Users-you-my-project is a stray directory or a symbolic link that should not be there, remove that entry itself (not what it points to) and restart.4193task output swap refused (tasks dir moved or linked): /private/tmp/claude-501/-Users-you-my-project/1f0e62dc-4b0a-4f5e-9c2d-8a7b6c5d4e3f/tasks/b7k2f9m3q.output. To recover: restart Claude Code with CLAUDE_CODE_TMPDIR set to a fresh directory; or, if /private/tmp/claude-501/-Users-you-my-project is a stray directory or a symbolic link that should not be there, remove that entry itself (not what it points to) and restart.
3922**應該怎麼做:**4204**應該怎麼做:**
3923 4205
3924* 升級到 v2.1.260 或更新版本。較早的版本有時在沒有連結或移動目錄存在時顯示此訊息4206* 升級到 v2.1.260 或更新版本。較早的版本有時在沒有連結或移動目錄存在時顯示此訊息
3925* 使用設定為新目錄的 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 重新啟動 Claude Code4207* 使用 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 設定為新鮮目錄重新啟動 Claude Code
3926* 或檢查 Claude Code 暫存目錄下的專案目錄,範例訊息中的 `/private/tmp/claude-501/-Users-you-my-project`。如果該路徑是符號連結,或不應該存在的目錄,請移除連結或目錄本身而不是連結的目標,然後重新啟動 Claude Code4208* 或檢查您的專案在 Claude Code 暫存目錄下的目錄,範例訊息中的 `/private/tmp/claude-501/-Users-you-my-project`。如果該路徑是符號連結,或不應該在那裡的目錄,移除連結或目錄本身而不是連結的目標,並重新啟動 Claude Code
3927* 如果拒絕重複,程序在工作階段執行時會取代、連結或移除 Claude Code 暫存目錄下的項目。將 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 設定為沒有其他內容管理的目錄並重新啟動4209* 如果拒絕重複,程序在工作階段執行時替換、連結或移除 Claude Code 暫存目錄下的項目。將 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 設定為沒有其他內容管理的目錄並重新啟動
4210
4211<h3 id="disk-quota-or-temp-filesystem-is-full">
4212 磁碟配額或暫存檔案系統已滿
4213</h3>
4214
4215Claude Code 將每個 Bash 和 PowerShell 命令的輸出儲存到其暫存目錄下的檔案。當命令以非零代碼退出且完全沒有輸出時,Claude Code 會檢查持有該檔案的檔案系統是否空間不足或 inode 不足,或您在其上的磁碟配額是否已用完。如果是這樣,診斷會出現在命令的結果中,代替空輸出:
4216
4217```text wrap theme={null}
4218Your 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.
4219```
4220
4221訊息命名什麼用完了:
4222
4223* `Your disk quota is full ... (EDQUOT)`:您在該檔案系統上的配額已用完。配額可以在檔案系統仍顯示可用空間時已滿
4224* `The filesystem with Claude Code's temp directory ..., or your disk quota on it, is full (ENOSPC)`:檔案系統或您在其上的配額沒有空間剩餘
4225* `Command output was lost: the temp filesystem at ... is full` 或 `... is out of inodes`:檔案系統幾乎沒有可用空間剩餘,或 inode 即將用完
4226
4227**應該怎麼做:**
4228
4229* 刪除您在持有 Claude Code 暫存目錄的檔案系統上不再需要的檔案。對於 `EDQUOT`,刪除計入您自己配額的檔案。對於 `out of inodes`,刪除許多檔案而不是幾個大檔案,因為每個檔案佔用一個 inode,無論其大小如何
4230* 或使用 [`CLAUDE_CODE_TMPDIR`](/docs/zh-TW/env-vars) 設定為有空間的檔案系統上的目錄重新啟動 Claude Code
4231* 然後讓 Claude 再次執行命令。它列印的輸出已遺失,未被截斷
3928 4232
3929<h3 id="the-source-file-is-not-valid-utf-8-text">4233<h3 id="the-source-file-is-not-valid-utf-8-text">
3930 The source file is not valid UTF-8 text4234 來源檔案不是有效的 UTF-8 文字
3931</h3>4235</h3>
3932 4236
3933Claude 嘗試從位元組不解碼為文字的檔案發佈[成品](/docs/zh-TW/artifacts),或其文字已包含替換字元 `U+FFFD`,因此 Claude Code 在上傳任何內容之前拒絕發佈。該訊息出現在成品工具結果中,並命名要修正的第一個位置:4237Claude 嘗試從其位元組不解碼為文字的檔案發佈[成品](/docs/zh-TW/artifacts),或其文字已包含替換字元 `U+FFFD`,因此 Claude Code 拒絕發佈,未上傳任何內容。訊息出現在成品工具結果中,並命名要修正的第一個位置:
3934 4238
3935```text wrap theme={null}4239```text wrap theme={null}
3936file_path: the source file is not valid UTF-8 text (first invalid byte at line 12, column 40). It may be saved in another encoding or contain binary data. Rewrite it as UTF-8, then publish again. Nothing was published.4240file_path: the source file is not valid UTF-8 text (first invalid byte at line 12, column 40). It may be saved in another encoding or contain binary data. Rewrite it as UTF-8, then publish again. Nothing was published.
3938file_path: the source file has the replacement character U+FFFD at line 12, column 40, usually left where an earlier edit or paste lost a character. Replace it with the intended text (in HTML, write an intended U+FFFD as �), then publish again. Nothing was published.4242file_path: the source file has the replacement character U+FFFD at line 12, column 40, usually left where an earlier edit or paste lost a character. Replace it with the intended text (in HTML, write an intended U+FFFD as �), then publish again. Nothing was published.
3939```4243```
3940 4244
3941Claude Code 將檔案解碼為 UTF-8,或當它以小端 UTF-16 位元組順序標記開頭時解碼為 UTF-16。當這樣的 UTF-16 檔案無法解碼時,第一個訊息命名 `UTF-16` 並仍然告訴您將檔案重寫為 UTF-8。當更多位置跟隨命名的位置時,訊息在位置之後新增計數,例如 `(+2 more)`。4245Claude Code 將檔案解碼為 UTF-8,或當它以小端 UTF-16 位元組順序標記開始時解碼為 UTF-16。當這樣的 UTF-16 檔案不解碼時,第一個訊息命名 `UTF-16` 並仍然告訴您將檔案重寫為 UTF-8。當更多位置跟隨命名的位置時,訊息在位置後新增計數,例如 `(+2 more)`。
3942 4246
3943**應該怎麼做:**4247**應該怎麼做:**
3944 4248
3945* 通常不需要做任何事:Claude 重寫檔案並再次發佈4249* 通常無需做任何事:Claude 重寫檔案並再次發佈
3946* 如果檔案是您寫入或匯出的,請再次將其儲存為 UTF-8,並將每個 `U+FFFD` 取代為較早的編輯、貼上或轉換遺失的字元4250* 如果檔案是您寫入或匯出的,再次將其儲存為 UTF-8,並將每個 `U+FFFD` 替換為較早的編輯、貼上或轉換遺失的字元
3947* 若要在頁面上顯示有意的 `U+FFFD`,請在 HTML 中將其寫為 `�` 而不是字面字元4251* 若要在頁面上顯示有意的 `U+FFFD`,請在 HTML 中將其寫為 `�` 而不是字面字元
3948 4252
3949在 v2.1.267 之前,Claude Code 上傳這樣的檔案而不檢查它,伺服器改為拒絕發佈。4253在 v2.1.267 之前,Claude Code 上傳這樣的檔案而不檢查它,伺服器改為拒絕發佈。
3950 4254
3951<h3 id="reading-a-local-file-from-outside-the-connected-folders">4255<h3 id="reading-a-local-file-from-outside-the-connected-folders">
3952 Reading a local file from outside the connected folders in a Cowork session4256 在 Cowork 工作階段中從連接的資料夾外讀取本機檔案
3953</h3>4257</h3>
3954 4258
3955在 Claude Desktop 應用程式中在您的機器上執行的 [Cowork](https://claude.com/docs/cowork/overview) 工作階段中,Claude 為[成品](/docs/zh-TW/artifacts)命名了本機檔案。Claude Code 無法確認檔案是工作階段連接資料夾內的純檔案:路徑位於這些資料夾外、通過符號連結或以可能命名不同檔案的方式拼寫。讀取這樣的檔案需要您的核准,在無法向您顯示核准卡的工作階段中,例如設定為跳過所有核准的工作階段,Claude Code 拒絕讀取。4259在 Claude Desktop 應用程式中在您的機器上執行的 [Cowork](https://claude.com/docs/cowork/overview) 工作階段中,Claude 命名了[成品](/docs/zh-TW/artifacts)的本機檔案。Claude Code 無法確認檔案是工作階段連接資料夾內的純檔案:路徑位於這些資料夾外、通過符號連結或以可能命名不同檔案的方式拼寫。讀取這樣的檔案需要您的核准,在無法向您顯示核准卡的工作階段中,例如設定為跳過所有核准的工作階段,Claude Code 拒絕讀取。
3956 4260
3957拒絕出現在成品工具結果中;當檔案根本無法檢查時,它改為命名該失敗:4261拒絕出現在成品工具結果中;當檔案根本無法檢查時,它改為命名該失敗:
3958 4262
3964 4268
3965**應該怎麼做:**4269**應該怎麼做:**
3966 4270
3967* 通常不需要做任何事:訊息告訴 Claude 改為使用連接資料夾內的純檔案4271* 通常無需做任何事:訊息告訴 Claude 改為使用連接資料夾內的純檔案
3968* 若要將該確切檔案放在成品中,請將其複製到工作階段的其中一個連接資料夾中作為常規檔案(不是符號連結),然後再次詢問4272* 若要將該確切檔案放在成品中,將其複製到工作階段的連接資料夾之一中作為常規檔案(不是符號連結),並再次詢問
3969 4273
3970<h3 id="webfetch-cannot-fetch-localhost">4274<h3 id="webfetch-cannot-fetch-localhost">
3971 WebFetch cannot fetch localhost4275 WebFetch 無法擷取 localhost
3972</h3>4276</h3>
3973 4277
3974Claude 呼叫了 [WebFetch](/docs/zh-TW/tools-reference#webfetch-tool-behavior),其 URL 的主機名沒有點,例如 `http://localhost:3000` 或裸內部網路名稱如 `http://wiki/`。WebFetch 在進行任何要求之前拒絕這些 URL:4278Claude 呼叫了 [WebFetch](/docs/zh-TW/tools-reference#webfetch-tool-behavior),其 URL 的主機名沒有點,例如 `http://localhost:3000` 或裸內部網路名稱如 `http://wiki/`。WebFetch 在進行任何要求之前拒絕這些 URL:
3979 4283
3980**應該怎麼做:**4284**應該怎麼做:**
3981 4285
3982* 通常不需要做任何事:訊息將 Claude 指向透過 Bash 工具的 `curl`,它可以到達本機和內部網路伺服器4286* 通常無需做任何事:訊息將 Claude 指向透過 Bash 工具的 `curl`,它可以到達本機和內部網路伺服器
3983 4287
3984在 v2.1.268 之前,WebFetch 使用通用 `Invalid URL` 錯誤報告這些 URL。4288在 v2.1.268 之前,WebFetch 報告這些 URL 時出現通用 `Invalid URL` 錯誤。
3985 4289
3986<h2 id="background-session-errors">4290<h2 id="background-session-errors">
3987 背景工作階段錯誤4291 背景工作階段錯誤
4275 4579
4276在某些帳戶上,訊息在 `daemon` 位置說 `background service`。4580在某些帳戶上,訊息在 `daemon` 位置說 `background service`。
4277 4581
4278在 npm 安裝上,在 `npm install -g @anthropic-ai/claude-code` 替換二進位檔案時出現的 `EUNKNOWN` 與[重新安裝期間的 `EACCES`](#eacces-when-starting-a-background-session) 有相同的原因,並在您在安裝完成後重試時清除。4582在 npm 安裝上,在 `npm install -g @anthropic-ai/claude-code` 替換二進位檔案時出現的 `EUNKNOWN` 與[重新安裝期間的 `EACCES`](#eacces-when-starting-a-background-session)有相同的原因,並在您在安裝完成後重試時清除。
4279 4583
4280Claude Code 透過 PowerShell 啟動背景服務,以便服務在關閉終端時存活,在安裝時使用 PowerShell 7,否則使用 Windows PowerShell 5.1。當兩個 PowerShell 都無法執行時,Claude Code 改為直接啟動服務,因此只阻止 PowerShell 的原則不會導致此錯誤。如果您在沒有 npm 安裝執行時看到它,原則會阻止 Claude Code 可執行檔本身。4584Claude Code 透過 PowerShell 啟動背景服務,以便服務在關閉終端時存活,在安裝時使用 PowerShell 7,否則使用 Windows PowerShell 5.1。當兩個 PowerShell 都無法執行時,Claude Code 改為直接啟動服務,因此只阻止 PowerShell 的原則不會導致此錯誤。如果您在沒有 npm 安裝執行時看到它,原則會阻止 Claude Code 可執行檔本身。
4281 4585
4341 啟動背景工作階段時工作目錄不再存在4645 啟動背景工作階段時工作目錄不再存在
4342</h3>4646</h3>
4343 4647
4344您嘗試在不再存在的目錄中啟動[背景工作階段](/docs/zh-TW/agent-view)。當您從代理檢視分派或在您工作的目錄被刪除或移動後執行 `/background` 時,會發生這種情況。當您附加到或重新啟動其程序已退出且其目錄已消失的工作階段時,也會發生這種情況,因為新程序會在相同目錄中啟動。Claude Code 不啟動工作階段,訊息命名遺漏的目錄:4648您嘗試在不再存在的目錄中啟動[背景工作階段](/docs/zh-TW/agent-view)。Claude Code 不啟動工作階段,訊息命名遺漏的目錄:
4345 4649
4346```text theme={null}4650```text theme={null}
4347Couldn't start a background session (working directory no longer exists or is not accessible: /tmp/demo)4651Couldn't start a background session (working directory no longer exists or is not accessible: /tmp/demo)
4353 4657
4354* 重新建立訊息命名的目錄,或從存在的目錄分派,然後再試一次4658* 重新建立訊息命名的目錄,或從存在的目錄分派,然後再試一次
4355 4659
4660<h3 id="workspace-not-trusted-when-dispatching-a-background-session">
4661 分派背景工作階段時工作區未信任
4662</h3>
4663
4664您在未[信任](/docs/zh-TW/permissions#project-allow-rules-and-workspace-trust)的目錄中啟動或重新啟動[背景工作階段](/docs/zh-TW/agent-view),工作區信任對話無法出現以詢問您。Claude Code 不啟動工作階段:
4665
4666```text theme={null}
4667Workspace not trusted. Run `claude` in /path/to/project once and accept the trust prompt, then retry.
4668```
4669
4670從工作階段自己的目錄中的終端,相同的命令改為顯示信任對話並在您接受後啟動工作階段。此訊息出現在沒有對話可以出現的地方,例如在指令碼中,或當您從不同於其自己的目錄重新啟動工作階段時。
4671
4672兩個變體命名不同的原因:
4673
4674* **`The home directory is trusted one session at a time`**:工作階段的目錄是您的主目錄。Claude Code 永遠不會儲存主目錄的信任,因此在較早的工作階段中在那裡接受對話不計算。
4675* **`<path> could not be resolved on disk`**:Claude Code 無法在磁碟上找到工作階段的目錄。
4676
4677**該怎麼做:**
4678
4679* 在訊息命名的目錄中執行 `claude` 並接受信任對話,然後再次執行命令
4680* 對於主目錄訊息,從您主目錄中的終端執行命令,以便對話可以出現,或改為從專案目錄啟動工作階段
4681* 對於 `could not be resolved on disk` 訊息,重新建立目錄,或從存在的目錄啟動新工作階段
4682
4356<h2 id="wrapper-and-ide-errors">4683<h2 id="wrapper-and-ide-errors">
4357 包裝程式和 IDE 錯誤4684 包裝程式和 IDE 錯誤
4358</h2>4685</h2>
4585* 縮短您的代理程式檔案的 `description` frontmatter,或要求 Claude 為您修剪它們。4912* 縮短您的代理程式檔案的 `description` frontmatter,或要求 Claude 為您修剪它們。
4586* 移除您不再使用的代理程式檔案。4913* 移除您不再使用的代理程式檔案。
4587 4914
4915<h3 id="a-skill-command-or-workflow-wasnt-loaded-because-its-name-is-reserved">
4916 技能、命令或工作流程未被載入,因為其名稱已保留
4917</h3>
4918
4919技能資料夾、frontmatter `name`、`.claude/commands/` 中的檔案或子資料夾,或[已儲存的工作流程](/docs/zh-TW/workflows#save-the-workflow-for-reuse)使用名稱 `anthropic-skills` 或以 `anthropic-skills:` 開頭的名稱。Claude Code [保留該名稱用於從 claude.ai 同步的技能](/docs/zh-TW/skills#names-reserved-for-synced-skills),不會載入該項目。
4920
4921Claude Code 在對話檢視中顯示此警告作為啟動通知,而不是在 stderr 上:
4922
4923```text theme={null}
4924未載入:重新命名 .claude/skills/anthropic-skills,然後重新啟動 — 其名稱使用 "anthropic-skills",這是為從您的 claude.ai 帳戶同步的技能保留的名稱
4925```
4926
4927通知命名它拒絕的第一個項目要變更的內容:要重新命名的資料夾或檔案、要編輯的 `name:` 行,或要重新命名的工作流程。當拒絕了多個項目時,通知以計數結尾,例如 `· 2 more`,[偵錯日誌](/docs/zh-TW/debug-your-config)命名每一個。
4928
4929**該怎麼做:**
4930
4931* 重新命名通知命名的項目,或編輯它指向的 `name:` 行,然後重新啟動工作階段。
4932
4933在 v2.1.282 之前,Claude Code 載入了具有這些名稱的技能和命令。
4934
4588<h3 id="workspace-has-not-been-trusted">4935<h3 id="workspace-has-not-been-trusted">
4589 工作區尚未受信任4936 工作區尚未受信任
4590</h3>4937</h3>
4631 遠端受管設定無法載入4978 遠端受管設定無法載入
4632</h3>4979</h3>
4633 4980
4634您的工作階段符合[伺服器受管設定](/docs/zh-TW/server-managed-settings)的資格,但 Claude Code 無法擷取它們,因此在互動工作階段中顯示此警告。括號中的原因命名失敗的內容,例如 `network error`、`request timed out` 或 `authentication rejected (401)`,行的其餘部分說明工作階段執行的策略:4981您的工作階段符合[伺服器受管設定](/docs/zh-TW/server-managed-settings)的資格,但 Claude Code 無法擷取它們或無法應用伺服器傳回的內容,因此在互動工作階段中顯示此警告。
4982
4983括號中的原因命名失敗的內容,例如 `network error`、`request timed out` 或 `authentication rejected (401)`。原因 `no setting in the server response could be applied as written` 表示伺服器已回應,但它傳回的設定都未通過[驗證](/docs/zh-TW/server-managed-settings#invalid-entries-in-delivered-settings)。在 v2.1.282 之前,此原因讀作 `server returned invalid settings`。
4984
4985行的其餘部分說明工作階段執行的策略:
4635 4986
4636* **從較早成功擷取快取的設定**:Claude Code 在該快取策略上執行工作階段,除了[隱藏的環境變數](/docs/zh-TW/server-managed-settings#fetch-and-caching-behavior),行讀取 `using cached policy`。4987* **從較早成功擷取快取的設定**:Claude Code 在該快取策略上執行工作階段,除了[隱藏的環境變數](/docs/zh-TW/server-managed-settings#fetch-and-caching-behavior),行讀取 `using cached policy`。
4637* **無快取**:Claude Code 在沒有伺服器受管設定的情況下執行工作階段,行讀取 `no remote policy applied`。4988* **無快取**:Claude Code 在沒有伺服器受管設定的情況下執行工作階段,行讀取 `no remote policy applied`。
4639**該怎麼做:**4990**該怎麼做:**
4640 4991
4641* 對訊息命名的原因採取行動:對於網路原因,檢查此機器是否可以到達 `api.anthropic.com`;對於驗證原因,使用 `/status` 檢查您的登入4992* 對訊息命名的原因採取行動:對於網路原因,檢查此機器是否可以到達 `api.anthropic.com`;對於驗證原因,使用 `/status` 檢查您的登入
4993* 對於 `no setting in the server response could be applied as written`,要求您的管理員更正伺服器上的設定
4642* 執行 `/status` 或 `claude doctor` 以取得完整診斷4994* 執行 `/status` 或 `claude doctor` 以取得完整診斷
4643 4995
4644在 v2.1.248 之前,Claude Code 僅在偵錯日誌中報告設定擷取失敗。4996在 v2.1.248 之前,Claude Code 僅在偵錯日誌中報告設定擷取失敗。
4658* 再次啟動 Claude Code 並批准對話以在您的組織設定下繼續。拒絕的對話不會被記住,因此在下次啟動時會再次出現。5010* 再次啟動 Claude Code 並批准對話以在您的組織設定下繼續。拒絕的對話不會被記住,因此在下次啟動時會再次出現。
4659* 如果您對對話列出的設定不確定,在批准前詢問維護您的組織受管設定的人5011* 如果您對對話列出的設定不確定,在批准前詢問維護您的組織受管設定的人
4660 5012
5013<h3 id="managed-settings-block-the-default-model">
5014 受管設定阻止預設模型
5015</h3>
5016
5017您的組織的[受管設定](/docs/zh-TW/managed-settings)阻止預設選項解析為的模型以及它可以降級到的每個模型。將在預設選項上啟動的工作階段在啟動時退出,而不是執行被阻止的模型。您看到的訊息取決於阻止它的設定。當 [`deniedModels`](/docs/zh-TW/model-config#block-specific-models-or-versions) 清單阻止它時,訊息讀作:
5018
5019```text theme={null}
5020Claude Code 無法啟動:您的組織的受管設定在 "deniedModels" 中阻止預設模型 (claude-opus-5-5),且它們允許的模型都無法用作預設模型。要求您的管理員更新 "deniedModels" 或 "availableModels"。
5021```
5022
5023當 `availableModels` 清單且 [`availableModelsMatch`](/docs/zh-TW/settings-reference#availablemodelsmatch) 設定為 `"exact"` 時省略它,訊息讀作:
5024
5025```text theme={null}
5026Claude Code 無法啟動:您的組織僅允許 "availableModels" 中列出的模型,且它們都無法用作預設模型 (claude-opus-5-5 未列出)。要求您的管理員更新 "availableModels"。
5027```
5028
5029**該怎麼做:**
5030
5031* 如果您管理設定,將您的使用者可以執行的模型新增到 `availableModels`,或縮小阻止每個後備的 `deniedModels` 項目。[阻止特定模型或版本](/docs/zh-TW/model-config#block-specific-models-or-versions)描述預設選項如何降級
5032* 如果您不管理它們,將訊息傳送給您的管理員。您自己的設定檔案無法擴大受管 `availableModels` 或 `deniedModels` 清單
5033
4661<h3 id="mcp-server-is-blocked-by-enterprise-managed-policy">5034<h3 id="mcp-server-is-blocked-by-enterprise-managed-policy">
4662 MCP 伺服器被企業受管策略阻止5035 MCP 伺服器被企業受管策略阻止
4663</h3>5036</h3>
4927 5300
4928* 配置的 [`--fallback-model`](/docs/zh-TW/cli-reference#cli-flags) 在可用性錯誤後接管該輪次,並在文字記錄中顯示通知5301* 配置的 [`--fallback-model`](/docs/zh-TW/cli-reference#cli-flags) 在可用性錯誤後接管該輪次,並在文字記錄中顯示通知
4929* Amazon Bedrock 或 Google Cloud 的 Agent Platform 啟動檢查發現您的預設模型不可用5302* Amazon Bedrock 或 Google Cloud 的 Agent Platform 啟動檢查發現您的預設模型不可用
4930* [自動模型備用](/docs/zh-TW/model-config#automatic-model-fallback)在 Fable 5.1、Fable 5、Opus 5.5 和 Opus 5 上將工作階段移至標記類別的備用模型(當該類別有備用模型時),並在文字記錄中顯示通知5303* [自動模型備用](/docs/zh-TW/model-config#automatic-model-fallback)在 Fable 5.1、Fable 5、Opus 5.5、Sonnet 5.5 和 Opus 5 上將工作階段移至標記類別的備用模型(當該類別有備用模型時),並在文字記錄中顯示通知
4931 5304
4932下面的模型選擇檢查可以捕捉第二和第三種情況;第一種情況顯示為文字記錄通知而非 `/model` 變更。[模型設定](/docs/zh-TW/model-config)說明每個備用何時適用。5305下面的模型選擇檢查可以捕捉第二和第三種情況;第一種情況顯示為文字記錄通知而非 `/model` 變更。[模型設定](/docs/zh-TW/model-config)說明每個備用何時適用。
4933 5306