55| `spend limit reached` / `spend limit unavailable` | [用量上限](#spend-limit-reached) |55| `spend limit reached` / `spend limit unavailable` | [用量上限](#spend-limit-reached) |
56| `Not logged in · Please run /login` | [身分驗證](#not-logged-in) |56| `Not logged in · Please run /login` | [身分驗證](#not-logged-in) |
57| `Couldn't save your login` | [身分驗證](#couldnt-save-your-login) |57| `Couldn't save your login` | [身分驗證](#couldnt-save-your-login) |
58| `Sign in again to take your previous account or API key off the config file.` | [身分驗證](#sign-in-again-to-take-your-previous-account-or-api-key-off-the-config-file) |
59| `Your account or API key may still be in the config file. Run claude auth logout.` | [身分驗證](#your-account-or-api-key-may-still-be-in-the-config-file) |
58| `Authentication required · Sign in again to continue` | [身分驗證](#not-logged-in) |60| `Authentication required · Sign in again to continue` | [身分驗證](#not-logged-in) |
59| `Could not resolve authentication method` | [身分驗證](#could-not-resolve-authentication-method) |61| `Could not resolve authentication method` | [身分驗證](#could-not-resolve-authentication-method) |
60| `Invalid API key` | [身分驗證](#invalid-api-key) |62| `Invalid API key` | [身分驗證](#invalid-api-key) |
82| `Couldn't verify your organization's policy for remote control` | [疑難排解 Remote Control](https://code.claude.com/docs/zh-TW/remote-control.md#couldnt-verify-your-organizations-policy-for-remote-control) |84| `Couldn't verify your organization's policy for remote control` | [疑難排解 Remote Control](https://code.claude.com/docs/zh-TW/remote-control.md#couldnt-verify-your-organizations-policy-for-remote-control) |
83| `Remote Control is disabled by your organization's policy` | [疑難排解 Remote Control](https://code.claude.com/docs/zh-TW/remote-control.md#remote-control-is-disabled-by-your-organizations-policy) |85| `Remote Control is disabled by your organization's policy` | [疑難排解 Remote Control](https://code.claude.com/docs/zh-TW/remote-control.md#remote-control-is-disabled-by-your-organizations-policy) |
84| `Remote Control was turned off by your organization's policy` | [疑難排解 Remote Control](https://code.claude.com/docs/zh-TW/remote-control.md#remote-control-was-turned-off-by-your-organizations-policy) |86| `Remote Control was turned off by your organization's policy` | [疑難排解 Remote Control](https://code.claude.com/docs/zh-TW/remote-control.md#remote-control-was-turned-off-by-your-organizations-policy) |
87| `Session failed: working folder not found:` | [Remote Control 疑難排解](https://code.claude.com/docs/zh-TW/remote-control.md#working-folder-not-found) |
88| `The program file this Remote Control started from is gone` | [Remote Control 疑難排解](https://code.claude.com/docs/zh-TW/remote-control.md#program-file-is-gone) |
89| `Session failed: spawn error:`,後接 `ENOENT` 訊息 | [Remote Control 疑難排解](https://code.claude.com/docs/zh-TW/remote-control.md#program-file-is-gone) |
85| `OAuth token revoked` / `OAuth token has expired` | [身分驗證](#oauth-token-revoked-or-expired) |90| `OAuth token revoked` / `OAuth token has expired` | [身分驗證](#oauth-token-revoked-or-expired) |
86| `Failed to authenticate: OAuth token revoked` | [身分驗證](#oauth-token-revoked-or-expired) |91| `Failed to authenticate: OAuth token revoked` | [身分驗證](#oauth-token-revoked-or-expired) |
87| `Your account does not have access to Claude. Please login again or contact your administrator.` | [身分驗證](#oauth-token-revoked-or-expired) |92| `Your account does not have access to Claude. Please login again or contact your administrator.` | [身分驗證](#oauth-token-revoked-or-expired) |
165| `Request too large for the API's 32MB request limit` | [請求錯誤](#request-too-large) |170| `Request too large for the API's 32MB request limit` | [請求錯誤](#request-too-large) |
166| `Image was too large` | [請求錯誤](#image-was-too-large) |171| `Image was too large` | [請求錯誤](#image-was-too-large) |
167| `API Error: an image in the conversation could not be processed and was removed` | [請求錯誤](#image-was-too-large) |172| `API Error: an image in the conversation could not be processed and was removed` | [請求錯誤](#image-was-too-large) |
173| `An image in the conversation exceeds the dimension limit for many-image requests` | [請求錯誤](#image-was-too-large) |
168| `Unable to resize image` | [請求錯誤](#unable-to-resize-image) |174| `Unable to resize image` | [請求錯誤](#unable-to-resize-image) |
169| `Request rejected as unprocessable by the model` | [請求錯誤](#request-rejected-as-unprocessable-by-the-model) |175| `Request rejected as unprocessable by the model` | [請求錯誤](#request-rejected-as-unprocessable-by-the-model) |
170| `PDF too large` / `PDF is password protected` / `pdftoppm is not installed` | [請求錯誤](#pdf-errors) |176| `PDF too large` / `PDF is password protected` / `pdftoppm is not installed` | [請求錯誤](#pdf-errors) |
229| `Error: --agents takes a JSON object, or a file path only with --print (-p)` | [命令列錯誤](#invalid-agents-configuration) |235| `Error: --agents takes a JSON object, or a file path only with --print (-p)` | [命令列錯誤](#invalid-agents-configuration) |
230| `Error: --agents file not found` | [命令列錯誤](#invalid-agents-configuration) |236| `Error: --agents file not found` | [命令列錯誤](#invalid-agents-configuration) |
231| `Error: Settings file exceeds the 2MiB limit` | [命令列錯誤](#settings-file-exceeds-the-2mib-limit) |237| `Error: Settings file exceeds the 2MiB limit` | [命令列錯誤](#settings-file-exceeds-the-2mib-limit) |
238| `Configuration error in` | [命令列錯誤](#configuration-error-in-claude-json) |
239| `Claude configuration file at <path> was empty and no backup holds anything: starting with defaults.` | [命令列錯誤](#claude-configuration-file-was-empty) |
232| `The current directory no longer exists (it was deleted or moved)` / `Can't read the current directory` | [命令列錯誤](#the-current-directory-no-longer-exists) |240| `The current directory no longer exists (it was deleted or moved)` / `Can't read the current directory` | [命令列錯誤](#the-current-directory-no-longer-exists) |
233| `Temp directory <dir> ... Refusing to use it` / `Claude Code's temporary directory <dir> could not be created` | [命令列錯誤](#temp-directory-refused-or-cannot-be-created) |241| `Temp directory <dir> ... Refusing to use it` / `Claude Code's temporary directory <dir> could not be created` | [命令列錯誤](#temp-directory-refused-or-cannot-be-created) |
234| `ENOSPC: no space left on device, mkdir '<dir>'` | [命令列錯誤](#temp-directory-refused-or-cannot-be-created) |242| `ENOSPC: no space left on device, mkdir '<dir>'` | [命令列錯誤](#temp-directory-refused-or-cannot-be-created) |
252| `Error: MCP tool <name> (passed via --permission-prompt-tool) not found` | [命令列錯誤](#mcp-permission-prompt-tool-not-found) |260| `Error: MCP tool <name> (passed via --permission-prompt-tool) not found` | [命令列錯誤](#mcp-permission-prompt-tool-not-found) |
253| `OAuth callback port <port> is already in use — another process may be holding it` | [命令列錯誤](#oauth-callback-port-is-already-in-use) |261| `OAuth callback port <port> is already in use — another process may be holding it` | [命令列錯誤](#oauth-callback-port-is-already-in-use) |
254| `No available ports for OAuth redirect` | [命令列錯誤](#no-available-ports-for-oauth-redirect) |262| `No available ports for OAuth redirect` | [命令列錯誤](#no-available-ports-for-oauth-redirect) |
255| 來自 `/security-review` 或任何注入動態上下文之 skill 的 `Shell command failed for pattern "..."` | [命令列錯誤](#security-review-fails-without-origin-head) |263| `Shell command failed for pattern "..."`,來自 `/security-review` 或任何注入動態上下文的 skill | [命令列錯誤](#security-review-fails-without-origin-head) |
256| 來自注入動態上下文之 skill 的 `Shell command permission check failed for pattern "..."` | [命令列錯誤](#security-review-fails-without-origin-head) |264| 來自注入動態上下文之 skill 的 `Shell command permission check failed for pattern "..."` | [命令列錯誤](#security-review-fails-without-origin-head) |
257| ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`` | [命令列錯誤](#security-review-fails-without-origin-head) |265| ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`` | [命令列錯誤](#security-review-fails-without-origin-head) |
258| `No shell command in <name> was run, because the <tool> tool does not accept one of them` | [命令列錯誤](#no-shell-command-was-run) |266| `No shell command in <name> was run, because the <tool> tool does not accept one of them` | [命令列錯誤](#no-shell-command-was-run) |
334| `cannot contain null bytes (\0)` | [工具錯誤](#path-cannot-contain-null-bytes) |342| `cannot contain null bytes (\0)` | [工具錯誤](#path-cannot-contain-null-bytes) |
335| `Path contains null bytes` | [工具錯誤](#path-cannot-contain-null-bytes) |343| `Path contains null bytes` | [工具錯誤](#path-cannot-contain-null-bytes) |
336| `command contains the invisible character U+FEFF (byte order mark) or U+180E (Mongolian vowel separator), and was not run` | [工具錯誤](#command-contains-an-invisible-character) |344| `command contains the invisible character U+FEFF (byte order mark) or U+180E (Mongolian vowel separator), and was not run` | [工具錯誤](#command-contains-an-invisible-character) |
345| `This call was not run. The command was approved before Claude Code restarted` | [工具錯誤](#command-approved-before-a-restart-was-not-run) |
337| `File is too large to read as an image (the limit is 128MB)` | [工具錯誤](#file-is-too-large-to-read-as-an-image) |346| `File is too large to read as an image (the limit is 128MB)` | [工具錯誤](#file-is-too-large-to-read-as-an-image) |
338| `Cannot read this as an image: <path> is a pipe or a device` | [工具錯誤](#file-is-too-large-to-read-as-an-image) |347| `Cannot read this as an image: <path> is a pipe or a device` | [工具錯誤](#file-is-too-large-to-read-as-an-image) |
339| `subagent_type is required: the general-purpose agent is not available in this session` | [工具錯誤](#subagent-type-is-required) |348| `subagent_type is required: the general-purpose agent is not available in this session` | [工具錯誤](#subagent-type-is-required) |
420| `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) |429| `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) |
421| `N skill or command names refused: run with --debug to see which ([names]), rename, then restart` | [設定警告](#skill-or-command-name-refused) |430| `N skill or command names refused: run with --debug to see which ([names]), rename, then restart` | [設定警告](#skill-or-command-name-refused) |
422| `Ignoring N permissions.allow entries from ... this workspace has not been trusted` | [設定警告](#workspace-has-not-been-trusted) |431| `Ignoring N permissions.allow entries from ... this workspace has not been trusted` | [設定警告](#workspace-has-not-been-trusted) |
432| `Make this change again later: <path> could not be updated, so it applies to this session only` | [設定警告](#make-this-change-again-later) |
423| `is a network path, which cannot be added as a working directory` | [設定警告](#working-directory-is-a-network-path) |433| `is a network path, which cannot be added as a working directory` | [設定警告](#working-directory-is-a-network-path) |
424| `Remote managed settings failed to load (<cause>)` | [設定警告](#remote-managed-settings-failed-to-load) |434| `Remote managed settings failed to load (<cause>)` | [設定警告](#remote-managed-settings-failed-to-load) |
435| `Your organization requires remote managed settings to load, but they could not be loaded` | [強制採用失敗即關閉的啟動方式](https://code.claude.com/docs/zh-TW/server-managed-settings.md#enforce-fail-closed-startup) |
436| `Remote managed settings are still loading` | [設定警告](#remote-managed-settings-failed-to-load) |
437| `Remote managed settings did not load` | [設定警告](#remote-managed-settings-failed-to-load) |
438| `Claude Code couldn't load your organization's settings` / `Claude Code couldn't reach Anthropic to load your organization's settings` / `requires them before a session can start` | [設定警告](#couldnt-load-your-organizations-settings) |
439| `Claude Code can't start this session yet` | [設定警告](#couldnt-load-your-organizations-settings) |
440| `Your Claude session has expired. Sign in again to continue (claude auth login).` | [設定警告](#couldnt-load-your-organizations-settings) |
425| `Managed settings were not approved; exiting without applying them.` | [設定警告](#managed-settings-were-not-approved) |441| `Managed settings were not approved; exiting without applying them.` | [設定警告](#managed-settings-were-not-approved) |
426| `Your organization's managed settings need your approval, which couldn't be asked for here.` | [設定警告](#managed-settings-need-your-approval) |442| `Your organization's managed settings need your approval, which couldn't be asked for here.` | [設定警告](#managed-settings-need-your-approval) |
427| `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) |443| `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) |
454| `is ignored — managed settings set allowManagedReadPathsOnly` / `is ignored — managed settings set allowManagedDomainsOnly` | [設定警告](#sandbox-allow-entries-are-ignored-under-a-managed-lock) |470| `is ignored — managed settings set allowManagedReadPathsOnly` / `is ignored — managed settings set allowManagedDomainsOnly` | [設定警告](#sandbox-allow-entries-are-ignored-under-a-managed-lock) |
455| `Sandbox mask files left behind at write-deny paths` | [設定警告](#stale-sandbox-mask-files-left-by-a-killed-session) |471| `Sandbox mask files left behind at write-deny paths` | [設定警告](#stale-sandbox-mask-files-left-by-a-killed-session) |
456| `Stale sandbox mask files left by a killed session` | [設定警告](#stale-sandbox-mask-files-left-by-a-killed-session) |472| `Stale sandbox mask files left by a killed session` | [設定警告](#stale-sandbox-mask-files-left-by-a-killed-session) |
473| `Ubuntu's AppArmor restriction on user namespaces stops bubblewrap here` | [沙箱機制疑難排解](https://code.claude.com/docs/zh-TW/sandboxing.md#apparmor-restriction-stops-bubblewrap) |
474| `bwrap: setting up uid map: Permission denied` / `bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted` | [沙箱機制疑難排解](https://code.claude.com/docs/zh-TW/sandboxing.md#bwrap-uid-map-permission-denied) |
457| 回應品質似乎比平常低 | [回應品質](#responses-seem-lower-quality-than-usual) |475| 回應品質似乎比平常低 | [回應品質](#responses-seem-lower-quality-than-usual) |
458 476
459## 自動重試477## 自動重試
1031* 執行 `/login`,以您的 Claude 訂閱或 Console 帳戶進行身分驗證1049* 執行 `/login`,以您的 Claude 訂閱或 Console 帳戶進行身分驗證
1032* 如果您預期由環境變數進行身分驗證,請確認 `ANTHROPIC_API_KEY` 已在您啟動 `claude` 的 shell 中設定並匯出1050* 如果您預期由環境變數進行身分驗證,請確認 `ANTHROPIC_API_KEY` 已在您啟動 `claude` 的 shell 中設定並匯出
1033* 對於無法進行互動式登入的 CI 或自動化作業,請設定一個 [`apiKeyHelper`](https://code.claude.com/docs/zh-TW/settings-reference#apikeyhelper) 指令碼,在啟動時取得金鑰1051* 對於無法進行互動式登入的 CI 或自動化作業,請設定一個 [`apiKeyHelper`](https://code.claude.com/docs/zh-TW/settings-reference#apikeyhelper) 指令碼,在啟動時取得金鑰
1052* 如果有人重新登入同一個 claude.ai 帳戶和組織時,`claude -p` 工作會以此訊息結束,請更新執行該登入之處的 Claude Code。在 v2.1.318 之前,Claude Code 會在該登入過程中、儲存新登入之前,移除已儲存的登入。
1034* 請參閱[身分驗證優先順序](https://code.claude.com/docs/zh-TW/authentication.md#authentication-precedence),了解存在多個憑證時 Claude Code 會使用哪一個1053* 請參閱[身分驗證優先順序](https://code.claude.com/docs/zh-TW/authentication.md#authentication-precedence),了解存在多個憑證時 Claude Code 會使用哪一個
1035 1054
1036如果您反覆被要求登入,請參閱[未登入或 token 已過期](https://code.claude.com/docs/zh-TW/troubleshoot-install.md#not-logged-in-or-token-expired),了解系統時鐘檢查與 macOS 憑證儲存的復原步驟。1055如果您反覆被要求登入,請參閱[未登入或 token 已過期](https://code.claude.com/docs/zh-TW/troubleshoot-install.md#not-logged-in-or-token-expired),了解系統時鐘檢查與 macOS 憑證儲存的復原步驟。
1441* 在其他平台上,再次執行 `/login`1460* 在其他平台上,再次執行 `/login`
1442* 如果登入仍無法儲存,請參閱[未登入或 token 已過期](https://code.claude.com/docs/zh-TW/troubleshoot-install.md#not-logged-in-or-token-expired),了解鑰匙圈解鎖命令及其他憑證儲存復原步驟1461* 如果登入仍無法儲存,請參閱[未登入或 token 已過期](https://code.claude.com/docs/zh-TW/troubleshoot-install.md#not-logged-in-or-token-expired),了解鑰匙圈解鎖命令及其他憑證儲存復原步驟
1443 1462
1463### Sign in again to take your previous account or API key off the config file
1464
1465登入後出現此警告,表示您先前登入過的任何帳戶可能仍儲存在 [`~/.claude.json`](https://code.claude.com/docs/zh-TW/claude-directory#ce-claude-json) 中:
1466
1467```text theme={null}
1468Sign in again to take your previous account or API key off the config file.
1469```
1470
1471如果在 Linux 或 Windows 上曾有 Console 登入建立了 API 金鑰,該金鑰也可能仍在 `~/.claude.json` 中。
1472
1473**處理方式:**
1474
1475* 在您的 shell 中執行 `claude auth login` 重新登入。Claude Code 接著會重試那次將被取代的帳戶或 API 金鑰從檔案中移除的儲存作業。
1476
1477### Your account or API key may still be in the config file
1478
1479您執行了 `/logout` 或 `claude auth logout`,Claude Code 已讓此程序登出,但無法確認 [`~/.claude.json`](https://code.claude.com/docs/zh-TW/claude-directory#ce-claude-json) 中已不再保存您的帳戶。可能是儲存作業沒有生效,或是無法讀回檔案進行檢查。
1480
1481```text theme={null}
1482Your account or API key may still be in the config file. Run claude auth logout.
1483```
1484
1485如果在 Linux 或 Windows 上曾有 Console 登入建立了 API 金鑰,該金鑰也可能仍在 `~/.claude.json` 中。
1486
1487**處理方式:**
1488
1489* 在您的 shell 中執行 `claude auth logout` 再次嘗試儲存。儲存成功時,命令會輸出 `Successfully logged out from your Anthropic account.`
1490
1444### Couldn't start the local listener that receives the browser sign-in1491### Couldn't start the local listener that receives the browser sign-in
1445 1492
1446來自 `/login`、`claude auth login` 或 `claude setup-token` 的這些訊息,都表示 Claude Code 無法開啟 `127.0.0.1` 上讓瀏覽器傳回登入結果的連接埠。1493來自 `/login`、`claude auth login` 或 `claude setup-token` 的這些訊息,都表示 Claude Code 無法開啟 `127.0.0.1` 上讓瀏覽器傳回登入結果的連接埠。
2420Image was too large. Double press esc to go back and try again with a smaller image.2467Image was too large. Double press esc to go back and try again with a smaller image.
2421API Error: 400 ... image dimensions exceed max allowed size2468API Error: 400 ... image dimensions exceed max allowed size
2422API Error: an image in the conversation could not be processed and was removed.2469API Error: an image in the conversation could not be processed and was removed.
2470An image in the conversation exceeds the dimension limit for many-image requests (3000px). Run /compact to remove old images from context, or start a new session.
2423```2471```
2424 2472
2425`could not be processed and was removed` 這一行表示 API 拒絕了對話中的某張圖片,例如超過大小或尺寸上限的圖片。2473`could not be processed and was removed` 這一行表示 API 拒絕了對話中的某張圖片,例如超過大小或尺寸上限的圖片。
2434 2482
2435* 在貼上之前調整影像大小。API 接受單個影像最長邊最多 8000 像素的影像,或當上下文中有超過 20 張影像時最多 3000 像素。2483* 在貼上之前調整影像大小。API 接受單個影像最長邊最多 8000 像素的影像,或當上下文中有超過 20 張影像時最多 3000 像素。
2436* 拍攝相關區域的更緊密螢幕截圖,而不是整個螢幕2484* 拍攝相關區域的更緊密螢幕截圖,而不是整個螢幕
2485* 對於 `dimension limit for many-image requests` 訊息,若訊息有提及,請在 Claude Code 提示字元中執行 `/compact`,或以較少圖片開始新的工作階段
2486
2487`dimension limit for many-image requests` 訊息會顯示 API 錯誤中列出的像素上限。
2437 2488
2438### Unable to resize image2489### Unable to resize image
2439 2490
3223 3274
3224* 將 `--settings` 指向小於 2 MiB 的一般 JSON 設定檔。格式請參閱[設定](https://code.claude.com/docs/zh-TW/settings.md)。3275* 將 `--settings` 指向小於 2 MiB 的一般 JSON 設定檔。格式請參閱[設定](https://code.claude.com/docs/zh-TW/settings.md)。
3225 3276
3277### Configuration error in \~/.claude.json
3278
3279Claude Code 無法解析 `~/.claude.json`,這是存放您帳戶詳細資料、MCP 伺服器與各專案狀態的檔案。您的檔案並未變更。`claude -p` 等[非互動](https://code.claude.com/docs/zh-TW/headless.md)啟動每次都會以退出碼 1 結束,直到您修復該檔案為止。
3280
3281當 Claude Code 找到[備份](https://code.claude.com/docs/zh-TW/claude-directory.md#cleaned-up-automatically)時,輸出會指名該備份,並輸出一行將其複製回來的 `cp` 命令:
3282
3283```text wrap theme={null}
3284Claude configuration file at /home/user/.claude.json is corrupted: <JSON parser's message>
3285The corrupted file has been backed up to: /home/user/.claude/backups/.claude.json.corrupted.1793664000000
3286A backup file exists at: /home/user/.claude/backups/.claude.json.backup.1793660400000
3287You can manually restore it by running: cp -f "/home/user/.claude/backups/.claude.json.backup.1793660400000" "/home/user/.claude.json"
3288
3289Configuration error in /home/user/.claude.json: <JSON parser's message>
3290```
3291
3292**處理方式:**
3293
3294* **輸出中有 `cp` 行**:在終端機中執行該行。在 Windows 上,請在 PowerShell 中執行。它會以備份(`~/.claude.json` 的較早版本)取代損壞的檔案。
3295* **輸出中沒有 `cp` 行,或執行後錯誤再次出現**:修正 `~/.claude.json` 中的 JSON;如果 [`~/.claude/backups/`](https://code.claude.com/docs/zh-TW/claude-directory#cleaned-up-automatically) 中有其他 `.claude.json.backup.<timestamp>` 檔案,可將其複製覆蓋該檔案;或將該檔案重新命名。當 `~/.claude.json` 不存在時,Claude Code 會以預設設定啟動,且不含該檔案原本保存的任何內容。
3296
3297在 v2.1.318 之前,非互動啟動輸出此錯誤後,`~/.claude.json` 中只會留下預設值,因此下次啟動時不會套用您的設定。
3298
3299### Claude configuration file was empty and no backup holds anything
3300
3301啟動時出現此訊息,表示其所指名的檔案是空白的,且該檔案的所有 [`.backup` 副本](https://code.claude.com/docs/zh-TW/claude-directory#cleaned-up-automatically)都沒有任何內容。Claude Code 已針對該檔案保存的內容使用預設值啟動。您的 `settings.json` 檔案與 `.mcp.json` 是獨立的檔案。
3302
3303```text wrap theme={null}
3304Claude configuration file at /home/user/.claude.json was empty and no backup holds anything: starting with defaults.
3305```
3306
3307**處理方式:**
3308
3309* 重新設定您原本在該檔案中設定的內容。例如,從終端機使用 `claude mcp add` 新增您 `user` 與 `local` 範圍的 [MCP 伺服器](https://code.claude.com/docs/zh-TW/mcp.md#mcp-installation-scopes)。
3310* 如果 Claude Code 要求您重新登入,請重新登入
3311
3312在 v2.1.318 之前,Claude Code 會將沒有備份的空白檔案回報為[已損壞](#configuration-error-in-claude-json)。
3313
3226### 目前的目錄已不存在3314### 目前的目錄已不存在
3227 3315
3228您從一個在 shell 進入後被刪除或移動的目錄啟動了 `claude`,例如被另一個 shell 移除的 worktree 或暫存目錄。Claude Code 無法讀取其工作目錄,因此在啟動工作階段之前就會以退出碼 1 結束,互動模式與[非互動](https://code.claude.com/docs/zh-TW/headless.md)模式皆然。在 v2.1.239 之前,Claude Code 會當機,並在 stderr 上輸出壓縮過的 bundle 原始碼與原始的 `ENOENT ... uv_cwd` 堆疊,而不是此訊息。3316您從一個在 shell 進入後被刪除或移動的目錄啟動了 `claude`,例如被另一個 shell 移除的 worktree 或暫存目錄。Claude Code 無法讀取其工作目錄,因此在啟動工作階段之前就會以退出碼 1 結束,互動模式與[非互動](https://code.claude.com/docs/zh-TW/headless.md)模式皆然。在 v2.1.239 之前,Claude Code 會當機,並在 stderr 上輸出壓縮過的 bundle 原始碼與原始的 `ENOENT ... uv_cwd` 堆疊,而不是此訊息。
3334* **`Error: Workspace not trusted. <folder> is your home directory`**:由於對家目錄的信任永遠不會被儲存,先在那裡執行 `claude` 並沒有幫助。請改從專案目錄執行 `claude ultrareview`(事先在那裡執行一次 `claude` 以接受信任對話框),或附加 `--trust-workspace`。3422* **`Error: Workspace not trusted. <folder> is your home directory`**:由於對家目錄的信任永遠不會被儲存,先在那裡執行 `claude` 並沒有幫助。請改從專案目錄執行 `claude ultrareview`(事先在那裡執行一次 `claude` 以接受信任對話框),或附加 `--trust-workspace`。
3335* **`No answer in time.` 後接 `Error: Workspace not trusted`**:`Trust <folder>? [y/N]` 問題在 5 分鐘內未獲回答。請再次執行 `claude ultrareview` 並回答它。3423* **`No answer in time.` 後接 `Error: Workspace not trusted`**:`Trust <folder>? [y/N]` 問題在 5 分鐘內未獲回答。請再次執行 `claude ultrareview` 並回答它。
3336* **`Ultrareview did not start: <folder> is not trusted`**:您在 `Trust <folder>? [y/N]` 問題中拒絕了,例如回答 `n` 或按下 Enter。若要啟動審查,請再次執行 `claude ultrareview` 並回答 `y`。3424* **`Ultrareview did not start: <folder> is not trusted`**:您在 `Trust <folder>? [y/N]` 問題中拒絕了,例如回答 `n` 或按下 Enter。若要啟動審查,請再次執行 `claude ultrareview` 並回答 `y`。
3337* **``Ultrareview did not start: `--trust-workspace` takes no value``**:`--trust-workspace` 後面接了非旗標的內容,例如 PR 編號或 `false`。如果您不信任該資料夾,請省略此旗標。若要在本次執行中信任它,請將 PR 編號或基底分支放在旗標之前:`claude ultrareview 1234 --trust-workspace`。3425* **``Ultrareview did not start: `--trust-workspace` takes no value``**:`--trust-workspace` 後面接了非旗標的內容,例如 PR 編號或 `false`。如果您不信任該資料夾,請省略此旗標。若要在此次執行中信任該資料夾,請將 PR 編號或基準分支放在旗標之前:`claude ultrareview 1234 --trust-workspace`。
3338 3426
3339在 v2.1.309 之前,`claude ultrareview` 不接受 `--trust-workspace`。3427在 v2.1.309 之前,`claude ultrareview` 不接受 `--trust-workspace`。
3340 3428
3626 3714
3627以下同類字串會在命令執行之前就觸發:3715以下同類字串會在命令執行之前就觸發:
3628 3716
3629* `Shell command permission check failed for pattern "..."`:該命令的權限檢查不允許它執行。[注入命令的權限檢查](https://code.claude.com/docs/zh-TW/skills.md#permission-checks-on-injected-commands)說明了在各權限模式下哪些結果會中止,以及如何使用 `allowed-tools` 預先核准命令3717* `Shell command permission check failed for pattern "..."`:命令的權限檢查不允許該命令。[注入命令的權限檢查](https://code.claude.com/docs/zh-TW/skills.md#permission-checks-on-injected-commands)說明了在各權限模式下哪些結果會中止,以及如何使用 `allowed-tools` 預先核准命令
3630* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``:該 skill 的 frontmatter 要求 bash,但電腦上沒有 bash。請安裝 Git for Windows,或將 frontmatter 改為 `shell: powershell`。請參閱[注入命令的執行方式](https://code.claude.com/docs/zh-TW/skills.md#how-injected-commands-run)3718* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``:skill 的 frontmatter 要求 bash,但機器上沒有 bash。請安裝 Git for Windows,或將 frontmatter 改為 `shell: powershell`。請參閱[注入命令的執行方式](https://code.claude.com/docs/zh-TW/skills.md#how-injected-commands-run)
3631 3719
3632**處理方式:**3720**處理方式:**
3633 3721
3780 3868
3781* **您沒有傳入基底分支**:Claude Code 與儲存庫的預設分支進行比較,並建議您明確傳入基底分支,如上例所示3869* **您沒有傳入基底分支**:Claude Code 與儲存庫的預設分支進行比較,並建議您明確傳入基底分支,如上例所示
3782* **您傳入的基底分支已存在於您的複製中**:提示內容為 ``Make sure <branch> exists locally or on origin (try `git fetch origin <branch>`)``3870* **您傳入的基底分支已存在於您的複製中**:提示內容為 ``Make sure <branch> exists locally or on origin (try `git fetch origin <branch>`)``
3783* **您傳入的基礎分支不在您的複製中**:Claude Code 在比較前會先從 origin 擷取該分支。提示內容為 ``<branch> was fetched from origin but shares no history with HEAD. If another branch is your real base, pass it explicitly (`/code-review ultra <branch>`)``;當 Claude Code 無法判斷您的複製是否為淺層複製時,則會改為建議 `git fetch --unshallow origin`。在 v2.1.221 之前,提示會對每個擷取的基礎分支都建議 `git fetch --unshallow origin`,而在完整的複製上,該命令會失敗並顯示 `fatal: --unshallow on a complete repository does not make sense`。3871* **您傳入的基礎分支不在您的複製中**:Claude Code 在比較前從 origin 擷取了它。提示為 ``<branch> was fetched from origin but shares no history with HEAD. If another branch is your real base, pass it explicitly (`/code-review ultra <branch>`)``;當 Claude Code 無法判斷您的複製是否為淺層複製時,會改為建議 `git fetch --unshallow origin`。在 v2.1.221 之前,提示會對每個擷取的基礎分支建議 `git fetch --unshallow origin`,而在完整的複製上,該命令會以 `fatal: --unshallow on a complete repository does not make sense` 失敗。
3784 3872
3785**處理方式:**3873**處理方式:**
3786 3874
4666* **對於 Claude 撰寫的命令**:您無需修正任何內容。訊息會告知 Claude 如何改寫該命令。4754* **對於 Claude 撰寫的命令**:您無需修正任何內容。訊息會告知 Claude 如何改寫該命令。
4667* **對於 skill 或命令檔案**:訊息會接在 `No shell command in <name> was run` 之後。請參閱 [在何處找到該字元並將其移除](#no-shell-command-was-run)。4755* **對於 skill 或命令檔案**:訊息會接在 `No shell command in <name> was run` 之後。請參閱 [在何處找到該字元並將其移除](#no-shell-command-was-run)。
4668 4756
4757### Command approved before Claude Code restarted was not run
4758
4759您核准的 shell 命令未執行,Claude 會收到此訊息作為該命令的結果:
4760
4761```text wrap theme={null}
4762This call was not run. The command was approved before Claude Code restarted, and Claude Code could not confirm that the shell is back in the directory where it was approved. That directory may be gone or replaced, lie outside the directory where the session started, or be one that Claude Code needs approval to enter or is not allowed to examine. The shell's directory is <directory>. If the command still makes sense, cd to the directory it was meant for and make the call again; it may need approval again.
4763```
4764
4765訊息的第三句也可能改為 `It does not keep track of that directory across a restart in a session that has been in a worktree.`
4766
4767**處理方式:**
4768
4769* 讓 Claude 繼續進行,若系統要求您再次核准該命令,請回應該提示。
4770
4669### File is too large to read as an image4771### File is too large to read as an image
4670 4772
4671Claude 嘗試使用 [Read 工具](https://code.claude.com/docs/zh-TW/tools-reference.md#read-tool-behavior) 將檔案作為圖片讀取,而該檔案大於 128 MB,也就是 Read 從圖片檔案載入的上限。沒有讀取任何內容,Claude 會收到此錯誤作為工具結果:4773Claude 嘗試使用 [Read 工具](https://code.claude.com/docs/zh-TW/tools-reference.md#read-tool-behavior) 將檔案作為圖片讀取,而該檔案大於 128 MB,也就是 Read 從圖片檔案載入的上限。沒有讀取任何內容,Claude 會收到此錯誤作為工具結果:
5818 5920
5819### Remote managed settings failed to load5921### Remote managed settings failed to load
5820 5922
5821您的工作階段符合使用[伺服器管理設定](https://code.claude.com/docs/zh-TW/server-managed-settings.md)的資格,但 Claude Code 無法擷取這些設定,或無法套用伺服器回傳的內容,因此會在互動式工作階段中顯示此警告。5923您的工作階段符合使用[伺服器管理設定](https://code.claude.com/docs/zh-TW/server-managed-settings.md)的資格,但 Claude Code 無法擷取這些設定,或無法套用伺服器回傳的內容,因此會在互動式工作階段及 Claude Desktop 的 Code 分頁中顯示此警告。
5822 5924
5823括號內的原因會指出失敗的項目,例如 `network error`、`request timed out` 或 `authentication rejected (401)`。原因 `no setting in the server response could be applied as written` 表示伺服器有回應,但其回傳的設定沒有任何一項通過[驗證](https://code.claude.com/docs/zh-TW/server-managed-settings.md#invalid-entries-in-delivered-settings)。在 v2.1.282 之前,此原因顯示為 `server returned invalid settings`。5925括號內的原因會指出失敗的項目,例如 `network error`、`request timed out` 或 `authentication rejected (401)`。原因 `no setting in the server response could be applied as written` 表示伺服器有回應,但其回傳的設定沒有任何一項通過[驗證](https://code.claude.com/docs/zh-TW/server-managed-settings.md#invalid-entries-in-delivered-settings)。在 v2.1.282 之前,此原因顯示為 `server returned invalid settings`。
5824 5926
5827* **有先前成功擷取時快取的設定**:Claude Code 會以該快取政策執行工作階段([保留的環境變數](https://code.claude.com/docs/zh-TW/server-managed-settings.md#fetch-and-caching-behavior)除外),該行顯示 `using cached policy`。5929* **有先前成功擷取時快取的設定**:Claude Code 會以該快取政策執行工作階段([保留的環境變數](https://code.claude.com/docs/zh-TW/server-managed-settings.md#fetch-and-caching-behavior)除外),該行顯示 `using cached policy`。
5828* **沒有快取**:Claude Code 會在沒有伺服器管理設定的情況下執行工作階段,該行顯示 `no remote policy applied`。5930* **沒有快取**:Claude Code 會在沒有伺服器管理設定的情況下執行工作階段,該行顯示 `no remote policy applied`。
5829 5931
5932在 Code 分頁中,當您傳送訊息時,警告會以對話中的一行出現,而當擷取的狀態改變時,會出現新的一行。三則相關訊息也會以相同方式出現:
5933
5934* `Remote managed settings are still loading`:工作階段繼續進行時,擷取仍在執行中
5935* `Remote managed settings did not load`:擷取結束但沒有得到回應
5936* `Remote managed settings have now loaded`:設定在上述其中一則警告之後載入完成,該行其餘部分會說明是否套用了遠端政策
5937
5830**處理方式:**5938**處理方式:**
5831 5939
5832* 針對訊息所指的原因採取行動:若為網路原因,請確認此機器能連線到 `api.anthropic.com`;若為身分驗證原因,請以 `/status` 檢查您的登入狀態5940* 針對訊息所指的原因採取行動:若為網路原因,請確認此機器能連線到 `api.anthropic.com`;若為身分驗證原因,請以 `/status` 檢查您的登入狀態
5835 5943
5836在 v2.1.248 之前,Claude Code 只會在除錯日誌中回報設定擷取失敗。5944在 v2.1.248 之前,Claude Code 只會在除錯日誌中回報設定擷取失敗。
5837 5945
5946### Claude Code 無法載入您組織的設定
5947
5948您的工作階段尚未啟動,因為您組織的設定(包括其[伺服器管理設定](https://code.claude.com/docs/zh-TW/server-managed-settings.md))必須先載入,而 Claude Code 無法載入這些設定。例如:
5949
5950```text theme={null}
5951Claude Code couldn't reach Anthropic to load your organization's settings (could not connect). <Organization name> requires them before a session can start.
5952```
5953
5954若訊息出現在標題為 `Claude Code can't start this session yet` 的對話框中,設定一載入完成,對話框就會關閉,工作階段隨即啟動。
5955
5956在[非互動模式](https://code.claude.com/docs/zh-TW/headless.md)和[背景工作階段](https://code.claude.com/docs/zh-TW/agent-view.md)中,Claude Code 則會印出訊息並以狀態 1 結束。
5957
5958**處理方式:**
5959
5960* **`could not connect`,或 `the reply came from a network proxy, not Anthropic`**:請檢查您的網路連線;若在企業網路中,請請 IT 允許對 `api.anthropic.com/api/claude_code/policy_limits` 和 `api.anthropic.com/api/claude_code/settings` 的 HTTPS 連線。然後選取 **Retry now**,或再次執行您的命令。
5961* **`timed out`、`Anthropic returned an error` 或 `Anthropic asked it to retry shortly`**:讓對話框重試,或稍後再次執行您的命令。若持續發生,請查看 [status.anthropic.com](https://status.anthropic.com)。
5962* **`still loading`,或 `couldn't verify your sign-in with Anthropic yet`**:讓對話框重試,或再次執行您的命令。若登入訊息持續出現,請在您的 shell 中執行 `claude auth login` 重新登入。
5963* **`Your Claude session has expired`**:此機器上儲存的登入已不再有效,因此重試無濟於事。請在對話框中選取 **Sign in again** 以關閉 Claude Code;接著在您的 shell 中執行 `claude auth login`,即使在工作階段無法啟動時,此命令仍可運作。
5964* **`none of the settings the server returned could be applied as written`**:請請您的管理員修正組織的[伺服器管理設定](https://code.claude.com/docs/zh-TW/server-managed-settings.md#invalid-entries-in-delivered-settings),然後重試。
5965
5838### Managed settings were not approved5966### Managed settings were not approved
5839 5967
5840您組織的[伺服器管理設定](https://code.claude.com/docs/zh-TW/server-managed-settings.md)包含需要您核准的設定,而您拒絕了[安全性核准對話框](https://code.claude.com/docs/zh-TW/server-managed-settings.md#security-approval-dialogs),因此 Claude Code 會在不套用這些設定的情況下結束:5968您組織的[伺服器管理設定](https://code.claude.com/docs/zh-TW/server-managed-settings.md)包含需要您核准的設定,而您拒絕了[安全性核准對話框](https://code.claude.com/docs/zh-TW/server-managed-settings.md#security-approval-dialogs),因此 Claude Code 會在不套用這些設定的情況下結束:
6294 6422
6295在 v2.1.257 之前,`claude doctor` 不會標示這些檔案;較早的版本在工作階段被終止時也會留下相同的佔位檔案。6423在 v2.1.257 之前,`claude doctor` 不會標示這些檔案;較早的版本在工作階段被終止時也會留下相同的佔位檔案。
6296 6424
6425### Make this change again later: \~/.claude.json could not be updated
6426
6427stderr 上的此通知表示對 [`~/.claude.json`](https://code.claude.com/docs/zh-TW/claude-directory#ce-claude-json) 的變更(例如登入或對信任提示的回答)未儲存到該檔案:
6428
6429```text theme={null}
6430Make this change again later: /home/user/.claude.json could not be updated, so it applies to this session only.
6431```
6432
6433**處理方式:**
6434
6435* 在之後的工作階段中再次進行此變更。例如,再次執行 `/login`,或再次回答信任提示。
6436
6297## 回應品質似乎低於預期6437## 回應品質似乎低於預期
6298 6438
6299如果 Claude 的回答似乎不如您預期的那樣有能力,但沒有顯示錯誤,原因通常是對話狀態而非模型本身。Claude Code 不會無聲地更改模型版本。它只能在這些情況下切換到備用模型:6439如果 Claude 的回答似乎不如您預期的那樣有能力,但沒有顯示錯誤,原因通常是對話狀態而非模型本身。Claude Code 不會無聲地更改模型版本。它只能在這些情況下切換到備用模型: