72| `Claude.ai login was rejected — run /login, then /remote-control` | [認証](#remote-control-couldnt-refresh-your-login) |72| `Claude.ai login was rejected — run /login, then /remote-control` | [認証](#remote-control-couldnt-refresh-your-login) |
73| `OAuth token unavailable — run /login to restore Remote Control` | [認証](#remote-control-couldnt-refresh-your-login) |73| `OAuth token unavailable — run /login to restore Remote Control` | [認証](#remote-control-couldnt-refresh-your-login) |
74| `Signed out of Claude — run /login, then /remote-control` | [認証](#remote-control-couldnt-refresh-your-login) |74| `Signed out of Claude — run /login, then /remote-control` | [認証](#remote-control-couldnt-refresh-your-login) |
75| `Remote Control could not renew this computer's connection` | [認証](#remote-control-could-not-renew-this-computers-connection) |
75| `signed-in claude.ai account or organization changed on this machine` | [認証](#remote-control-stopped-because-the-signed-in-account-changed) |76| `signed-in claude.ai account or organization changed on this machine` | [認証](#remote-control-stopped-because-the-signed-in-account-changed) |
76| `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) |77| `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) |
77| `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) |78| `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) |
153| `Request too large` | [リクエストエラー](#request-too-large) |154| `Request too large` | [リクエストエラー](#request-too-large) |
154| `Request too large for the API's 32MB request limit` | [リクエストエラー](#request-too-large) |155| `Request too large for the API's 32MB request limit` | [リクエストエラー](#request-too-large) |
155| `Image was too large` | [リクエストエラー](#image-was-too-large) |156| `Image was too large` | [リクエストエラー](#image-was-too-large) |
157| `API Error: an image in the conversation could not be processed and was removed` | [リクエストエラー](#image-was-too-large) |
156| `Unable to resize image` | [リクエストエラー](#unable-to-resize-image) |158| `Unable to resize image` | [リクエストエラー](#unable-to-resize-image) |
157| `Request rejected as unprocessable by the model` | [リクエストエラー](#request-rejected-as-unprocessable-by-the-model) |159| `Request rejected as unprocessable by the model` | [リクエストエラー](#request-rejected-as-unprocessable-by-the-model) |
158| `PDF too large` / `PDF is password protected` / `pdftoppm is not installed` | [リクエストエラー](#pdf-errors) |160| `PDF too large` / `PDF is password protected` / `pdftoppm is not installed` | [リクエストエラー](#pdf-errors) |
179| `Effort '<level>' isn't available with thinking turned off on this model` | [リクエストエラー](#effort-isnt-available-with-thinking-turned-off) |181| `Effort '<level>' isn't available with thinking turned off on this model` | [リクエストエラー](#effort-isnt-available-with-thinking-turned-off) |
180| `effort '<level>' is not supported when thinking is disabled` | [リクエストエラー](#effort-isnt-available-with-thinking-turned-off) |182| `effort '<level>' is not supported when thinking is disabled` | [リクエストエラー](#effort-isnt-available-with-thinking-turned-off) |
181| `max_tokens must be greater than thinking.budget_tokens` | [リクエストエラー](#thinking-budget-exceeds-output-limit) |183| `max_tokens must be greater than thinking.budget_tokens` | [リクエストエラー](#thinking-budget-exceeds-output-limit) |
184| `Claude's response exceeded the ... output token maximum` | [リクエストエラー](#response-exceeded-the-output-token-maximum) |
182| `API Error: 400 due to tool use concurrency issues` | [リクエストエラー](#tool-use-or-thinking-block-mismatch) |185| `API Error: 400 due to tool use concurrency issues` | [リクエストエラー](#tool-use-or-thinking-block-mismatch) |
183| `API Error: 400 orphaned tool_result in conversation history` | [リクエストエラー](#tool-use-or-thinking-block-mismatch) |186| `API Error: 400 orphaned tool_result in conversation history` | [リクエストエラー](#tool-use-or-thinking-block-mismatch) |
184| `API Error: 400 duplicate tool_use ID in conversation history` | [リクエストエラー](#tool-use-or-thinking-block-mismatch) |187| `API Error: 400 duplicate tool_use ID in conversation history` | [リクエストエラー](#tool-use-or-thinking-block-mismatch) |
199| `The connection dropped while downloading the update` | [インストールとログインのトラブルシューティング](/docs/ja/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |202| `The connection dropped while downloading the update` | [インストールとログインのトラブルシューティング](/docs/ja/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |
200| `Download timed out: exceeded the total deadline` | [インストールとログインのトラブルシューティング](/docs/ja/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |203| `Download timed out: exceeded the total deadline` | [インストールとログインのトラブルシューティング](/docs/ja/troubleshoot-install#the-connection-dropped-while-downloading-the-update) |
201| `--bg and --print conflict` | [コマンドラインエラー](#conflict-between-bg-and-print) |204| `--bg and --print conflict` | [コマンドラインエラー](#conflict-between-bg-and-print) |
205| `Couldn't tell whether --bg is a flag or text here, so nothing was started` | [コマンドラインエラー](#couldnt-tell-whether-bg-is-a-flag-or-text) |
202| `Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.` | [コマンドラインエラー](#conflict-between-a-system-prompt-flag-and-its-file-form) |206| `Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.` | [コマンドラインエラー](#conflict-between-a-system-prompt-flag-and-its-file-form) |
203| `Cloud sessions cannot be created from a --restricted session` | [コマンドラインエラー](#cloud-sessions-cannot-be-created-from-a-restricted-session) |207| `Cloud sessions cannot be created from a --restricted session` | [コマンドラインエラー](#cloud-sessions-cannot-be-created-from-a-restricted-session) |
204| `Cloud sessions are disabled by your organization's policy` | [コマンドラインエラー](#cloud-sessions-are-disabled-by-your-organizations-policy) |208| `Cloud sessions are disabled by your organization's policy` | [コマンドラインエラー](#cloud-sessions-are-disabled-by-your-organizations-policy) |
217| `couldn't be resolved to a real location, so its skills, commands, and agents weren't loaded` | [コマンドラインエラー](#directory-couldnt-be-resolved-to-a-real-location) |221| `couldn't be resolved to a real location, so its skills, commands, and agents weren't loaded` | [コマンドラインエラー](#directory-couldnt-be-resolved-to-a-real-location) |
218| `Error: Workspace not trusted` when starting Remote Control | [コマンドラインエラー](#workspace-not-trusted-when-starting-remote-control) |222| `Error: Workspace not trusted` when starting Remote Control | [コマンドラインエラー](#workspace-not-trusted-when-starting-remote-control) |
219| `` `<flag>` before `remote-control` is not carried over to the sessions Remote Control starts `` | [コマンドラインエラー](#not-carried-over-to-the-sessions-remote-control-starts) |223| `` `<flag>` before `remote-control` is not carried over to the sessions Remote Control starts `` | [コマンドラインエラー](#not-carried-over-to-the-sessions-remote-control-starts) |
224| `--sandbox is not supported by claude remote-control` / `--no-sandbox is not supported by claude remote-control` | [コマンドラインエラー](#sandbox-is-not-supported-by-claude-remote-control) |
220| `` `claude import` is not yet available in this build `` | [コマンドラインエラー](#claude-import-is-not-yet-available-in-this-build) |225| `` `claude import` is not yet available in this build `` | [コマンドラインエラー](#claude-import-is-not-yet-available-in-this-build) |
221| `Could not read Claude Code config` | [コマンドラインエラー](#could-not-read-claude-code-config) |226| `Could not read Claude Code config` | [コマンドラインエラー](#could-not-read-claude-code-config) |
222| `Could not import <server>: <reason>` | [コマンドラインエラー](#could-not-import-a-server-from-claude-desktop) |227| `Could not import <server>: <reason>` | [コマンドラインエラー](#could-not-import-a-server-from-claude-desktop) |
233| `Shell command failed for pattern "..."`, from `/security-review` or any skill that injects dynamic context | [コマンドラインエラー](#security-review-fails-without-origin-head) |238| `Shell command failed for pattern "..."`, from `/security-review` or any skill that injects dynamic context | [コマンドラインエラー](#security-review-fails-without-origin-head) |
234| `Shell command permission check failed for pattern "..."`, from a skill that injects dynamic context | [コマンドラインエラー](#security-review-fails-without-origin-head) |239| `Shell command permission check failed for pattern "..."`, from a skill that injects dynamic context | [コマンドラインエラー](#security-review-fails-without-origin-head) |
235| ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`` | [コマンドラインエラー](#security-review-fails-without-origin-head) |240| ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`` | [コマンドラインエラー](#security-review-fails-without-origin-head) |
241| `No shell command in <name> was run, because the <tool> tool does not accept one of them` | [コマンドラインエラー](#no-shell-command-was-run) |
236| `Input must be provided either through stdin or as a prompt argument when using --print` | [コマンドラインエラー](#input-must-be-provided-when-using-print) |242| `Input must be provided either through stdin or as a prompt argument when using --print` | [コマンドラインエラー](#input-must-be-provided-when-using-print) |
237| `Claude Code can't read the keyboard here: stdin is not a terminal` | [コマンドラインエラー](#claude-code-cant-read-the-keyboard-here) |243| `Claude Code can't read the keyboard here: stdin is not a terminal` | [コマンドラインエラー](#claude-code-cant-read-the-keyboard-here) |
238| `Error: Input contained only whitespace` | [コマンドラインエラー](#input-contained-only-whitespace) |244| `Error: Input contained only whitespace` | [コマンドラインエラー](#input-contained-only-whitespace) |
367| `Claude Code exited after an unrecoverable interface error (...)` | [設定の警告](#exited-after-an-unrecoverable-interface-error) |373| `Claude Code exited after an unrecoverable interface error (...)` | [設定の警告](#exited-after-an-unrecoverable-interface-error) |
368| `Agent descriptions are over the 15.0k-token limit` | [設定の警告](#agent-descriptions-are-over-the-15000-token-limit) |374| `Agent descriptions are over the 15.0k-token limit` | [設定の警告](#agent-descriptions-are-over-the-15000-token-limit) |
369| `hook needs quotes around a path with a space` | [設定の警告](#hook-needs-quotes-around-a-path-with-a-space) |375| `hook needs quotes around a path with a space` | [設定の警告](#hook-needs-quotes-around-a-path-with-a-space) |
376| `Instruction file not loaded` | [設定の警告](#instruction-file-not-loaded) |
370| `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) |377| `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) |
371| `N skill or command names refused: run with --debug to see which ([names]), rename, then restart` | [設定の警告](#skill-or-command-name-refused) |378| `N skill or command names refused: run with --debug to see which ([names]), rename, then restart` | [設定の警告](#skill-or-command-name-refused) |
372| `Ignoring N permissions.allow entries from ... this workspace has not been trusted` | [設定の警告](#workspace-has-not-been-trusted) |379| `Ignoring N permissions.allow entries from ... this workspace has not been trusted` | [設定の警告](#workspace-has-not-been-trusted) |
377| `Your organization's managed settings allow Claude Code to use: <providers>` | [設定の警告](#managed-settings-dont-allow-this-api-provider) |384| `Your organization's managed settings allow Claude Code to use: <providers>` | [設定の警告](#managed-settings-dont-allow-this-api-provider) |
378| `Your organization's managed settings allow Claude Code to use no API provider at all` | [設定の警告](#managed-settings-dont-allow-this-api-provider) |385| `Your organization's managed settings allow Claude Code to use no API provider at all` | [設定の警告](#managed-settings-dont-allow-this-api-provider) |
379| `MCP server <name> is blocked by enterprise managed policy` | [設定の警告](#mcp-server-is-blocked-by-enterprise-managed-policy) |386| `MCP server <name> is blocked by enterprise managed policy` | [設定の警告](#mcp-server-is-blocked-by-enterprise-managed-policy) |
387| `"<name>" is a reserved MCP server name and was not loaded` | [設定の警告](#mcp-server-name-is-reserved) |
380| `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) |388| `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) |
381| `Managed settings drop-in directory could not be read` | [設定の警告](#managed-settings-document-could-not-be-parsed) |389| `Managed settings drop-in directory could not be read` | [設定の警告](#managed-settings-document-could-not-be-parsed) |
382| `Unable to read managed policy settings` | [設定の警告](#unable-to-read-managed-policy-settings) |390| `Unable to read managed policy settings` | [設定の警告](#unable-to-read-managed-policy-settings) |
391| `Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded; fix or remove each entry:` | [設定の警告](#managed-settings-hooks-not-loaded) |
383| `otelHeadersHelper failed; telemetry is not being exported. See /status: ...` | [設定の警告](#otelheadershelper-failed) |392| `otelHeadersHelper failed; telemetry is not being exported. See /status: ...` | [設定の警告](#otelheadershelper-failed) |
384| `"crossSessionInbound" must be one of "accept", "hold", "refuse"` | [設定の警告](#crosssessioninbound-must-be-one-of-accept-hold-refuse) |393| `"crossSessionInbound" must be one of "accept", "hold", "refuse"` | [設定の警告](#crosssessioninbound-must-be-one-of-accept-hold-refuse) |
385| `API Error: ANTHROPIC_FOUNDRY_RESOURCE must be a Foundry resource name` | [設定の警告](#anthropic-foundry-resource-must-be-a-foundry-resource-name) |394| `API Error: ANTHROPIC_FOUNDRY_RESOURCE must be a Foundry resource name` | [設定の警告](#anthropic-foundry-resource-must-be-a-foundry-resource-name) |
389| `... has a wildcard before the rest of the command` | [設定の警告](#has-a-wildcard-before-the-rest-of-the-command) |398| `... has a wildcard before the rest of the command` | [設定の警告](#has-a-wildcard-before-the-rest-of-the-command) |
390| `Denying Bash also turns off the PowerShell tool, so Claude has neither` | [設定の警告](#denying-bash-also-turns-off-the-powershell-tool) |399| `Denying Bash also turns off the PowerShell tool, so Claude has neither` | [設定の警告](#denying-bash-also-turns-off-the-powershell-tool) |
391| `CLAUDE_CODE_DISABLE_1M_CONTEXT is set, but the 200K limit isn't enforced` | [設定の警告](#the-200k-limit-isnt-enforced) |400| `CLAUDE_CODE_DISABLE_1M_CONTEXT is set, but the 200K limit isn't enforced` | [設定の警告](#the-200k-limit-isnt-enforced) |
401| `Model "<model>" isn't recognized · context assumed to be 200k tokens` | [ゲートウェイまたはカスタムモデル ID のウィンドウを修正する](/docs/ja/model-config#correct-the-window-for-a-gateway-or-custom-model-id) |
402| `Claude Code doesn't recognize the model "<model>", so it assumes a context window of 200k tokens` | [ゲートウェイまたはカスタムモデル ID のウィンドウを修正する](/docs/ja/model-config#correct-the-window-for-a-gateway-or-custom-model-id) |
392| `[claude-code:unrecognized_model]` | [設定の警告](#unrecognized-model-id-on-a-request) |403| `[claude-code:unrecognized_model]` | [設定の警告](#unrecognized-model-id-on-a-request) |
404| `is ignored — managed settings set allowManagedReadPathsOnly` / `is ignored — managed settings set allowManagedDomainsOnly` | [設定の警告](#sandbox-allow-entries-are-ignored-under-a-managed-lock) |
393| `Stale sandbox mask files left by a killed session` | [設定の警告](#stale-sandbox-mask-files-left-by-a-killed-session) |405| `Stale sandbox mask files left by a killed session` | [設定の警告](#stale-sandbox-mask-files-left-by-a-killed-session) |
394| Responses seem lower quality than usual | [応答品質](#responses-seem-lower-quality-than-usual) |406| Responses seem lower quality than usual | [応答品質](#responses-seem-lower-quality-than-usual) |
395 407
1209 1221
1210v2.1.238 より前では、Claude Code は現在 `Signed out of Claude` と表示されるケースを `JWT refresh failed: no OAuth token — run /login` として報告し、ログインの更新で 1 回でも応答が得られないとすぐに `Claude.ai login expired — run /login to restore Remote Control` で Remote Control を停止していました。1222v2.1.238 より前では、Claude Code は現在 `Signed out of Claude` と表示されるケースを `JWT refresh failed: no OAuth token — run /login` として報告し、ログインの更新で 1 回でも応答が得られないとすぐに `Claude.ai login expired — run /login to restore Remote Control` で Remote Control を停止していました。
1211 1223
1224<h3 id="remote-control-could-not-renew-this-computers-connection">
1225 Remote Control could not renew this computer's connection
1226</h3>
1227
1228この警告は、[`claude remote-control`](/docs/ja/remote-control#start-a-remote-control-session) を実行しているターミナルで、サーバーが claude.ai ログインを使って接続の認証情報を有効期限前に更新できない場合に表示されます。警告の最後の文には、現在の認証情報があとどれくらい有効か、またはすでに期限切れであることが示されます。
1229
1230```text theme={null}
1231Remote Control could not renew this computer's connection: claude.ai did not accept the sign-in it uses. Run `claude /login` to sign in again. The connection keeps working for about 26 hours; if it still cannot sign in then, it stops.
1232```
1233
1234**対処方法:**
1235
1236* 警告で `claude /login` を実行するよう指示されている場合は、サーバーを実行しているマシンで別のターミナルを開き、そこで `claude /login` を実行して claude.ai アカウントでサインインします
1237* 接続の認証情報の期限が切れた後もサーバーがサインインできない場合、サーバーは `Poll: Authentication failed (401)` を含むエラーを出力して停止します。警告の 2 つ目の文に従って再度サインインし、サーバーが停止したターミナルで `claude remote-control` を再度実行してください。
1238
1212<h3 id="remote-control-stopped-because-the-signed-in-account-changed">1239<h3 id="remote-control-stopped-because-the-signed-in-account-changed">
1213 サインイン中のアカウントが変更されたため Remote Control が停止しました1240 サインイン中のアカウントが変更されたため Remote Control が停止しました
1214</h3>1241</h3>
2279* `/mcp disable <name>` で使用していない MCP サーバーを無効にして、コンテキストからツール定義を削除してください2306* `/mcp disable <name>` で使用していない MCP サーバーを無効にして、コンテキストからツール定義を削除してください
2280* 大きな `CLAUDE.md` メモリファイルをトリミングするか、[パススコープルール](/docs/ja/memory#path-specific-rules)に指示を移動して、関連する場合にのみ読み込むようにしてください2307* 大きな `CLAUDE.md` メモリファイルをトリミングするか、[パススコープルール](/docs/ja/memory#path-specific-rules)に指示を移動して、関連する場合にのみ読み込むようにしてください
2281* 自動圧縮はデフォルトでオンであり、通常このエラーを防ぎます。`/config` または [`DISABLE_AUTO_COMPACT`](/docs/ja/env-vars) でオフにした場合は、オンに戻してください。オフのままにする場合は、ウィンドウが満杯になる前に `/compact` を自分で実行してください。2308* 自動圧縮はデフォルトでオンであり、通常このエラーを防ぎます。`/config` または [`DISABLE_AUTO_COMPACT`](/docs/ja/env-vars) でオフにした場合は、オンに戻してください。オフのままにする場合は、ウィンドウが満杯になる前に `/compact` を自分で実行してください。
2309* より多くのトークンを受け付けるモデルで 200K トークン付近でエラーが発生する場合、原因の 1 つとして、Claude Code が認識しないモデル ID が考えられます。Claude Code はそのような ID に対して 200K のウィンドウを想定するため、その上限を超えて作業を続けるには、[モデルの実際のコンテキストウィンドウを指定してください](/docs/ja/model-config#correct-the-window-for-a-gateway-or-custom-model-id)。
2282 2310
2283[コンテキストウィンドウを探索](/docs/ja/context-window)して、コンテキストがどのように満杯になるかのインタラクティブビューを確認してください。2311[コンテキストウィンドウを探索](/docs/ja/context-window)して、コンテキストがどのように満杯になるかのインタラクティブビューを確認してください。
2284 2312
2340```text theme={null}2368```text theme={null}
2341Image was too large. Double press esc to go back and try again with a smaller image.2369Image was too large. Double press esc to go back and try again with a smaller image.
2342API Error: 400 ... image dimensions exceed max allowed size2370API Error: 400 ... image dimensions exceed max allowed size
2371API Error: an image in the conversation could not be processed and was removed.
2343```2372```
2344 2373
2345Claude Code は処理できない画像をテキストプレースホルダーに置き換えて再試行するため、後続のメッセージは成功します。v2.1.142 より前のバージョンでは、貼り付けられた画像は会話に残り、後続のすべてのメッセージで同じエラーを繰り返す可能性がありました。これらのバージョンで復旧するには、Esc キーを 2 回押して、画像が追加されたターンより前に戻ってください。2374`could not be processed and was removed` の行は、サイズや寸法の上限を超えた画像など、会話内の画像を API が拒否したことを意味します。
2375
2376これらのエラーのいずれかが繰り返し発生する場合は、Claude Code を更新してください。古いバージョンでは、次のような理由で画像エラーが繰り返されることがありました。
2377
2378* v2.1.299 より前は、多数の画像を含む長い会話で、Claude Code が上限を超えた画像ではなく、最後に添付した画像を削除することがありました。その結果、`was removed` の行が毎ターン繰り返され、Claude には新しい画像が見えませんでした。
2379* v2.1.299 より前は、VS Code、Desktop アプリ、Agent SDK で、Claude の作業中に添付した画像には、他の添付画像に適用されるリサイズが適用されませんでした。それらの画像は元のサイズのまま API に送信されたため、長い会話で画像エラーが繰り返し発生していました。
2380* v2.1.166 より前は、貼り付けた画像が会話内に残り、その後のすべてのメッセージで同じエラーが繰り返されることがありました
2346 2381
2347**対応方法:**2382**対応方法:**
2348 2383
2800* [`CLAUDE_CODE_MAX_OUTPUT_TOKENS`](/docs/ja/env-vars) を思考予算より大きくしてください2835* [`CLAUDE_CODE_MAX_OUTPUT_TOKENS`](/docs/ja/env-vars) を思考予算より大きくしてください
2801* 予算が出力長とどのように相互作用するかについては、[拡張思考](/docs/ja/model-config#extended-thinking)を参照してください2836* 予算が出力長とどのように相互作用するかについては、[拡張思考](/docs/ja/model-config#extended-thinking)を参照してください
2802 2837
2838<h3 id="response-exceeded-the-output-token-maximum">
2839 Response exceeded the output token maximum
2840</h3>
2841
2842Claude の応答が、リクエストで許可された出力トークンの最大数に達し、そこで切り捨てられました。
2843
2844```text theme={null}
2845API Error: Claude's response exceeded the ... output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
2846API Error: Claude's response exceeded the 64000 output token maximum for a request sent without streaming. The CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable cannot raise this limit.
2847```
2848
2849`a request sent without streaming` を示す形式は、ストリーミングリクエストが失敗し、Claude Code がストリーミングなしで再送信したことを意味します。この場合、応答は 64,000 出力トークンに制限されます。v2.1.299 より前は、このように再送信されたリクエストで応答が切り捨てられると、このメッセージが表示されずにターンが終了し、応答が完了したかのように扱われていました。
2850
2851**対処方法:**
2852
2853* 応答が切り捨てられる前に Claude がテキストを書いていた場合は、対話セッションで `continue` と返信して残りを求めます。そのテキストは会話内に残ります。
2854* メッセージで `CLAUDE_CODE_MAX_OUTPUT_TOKENS` の設定を求められている場合は、値の上限については [`CLAUDE_CODE_MAX_OUTPUT_TOKENS`](/docs/ja/env-vars) を、設定場所については[環境変数を設定する](/docs/ja/env-vars#set-environment-variables)を参照してください
2855* 各応答を上限内に収めるには、1 回の応答につき 1 つのファイルや 1 つのセクションなど、出力を小さな単位に分けるよう Claude に求めます
2856
2803<h3 id="tool-use-or-thinking-block-mismatch">2857<h3 id="tool-use-or-thinking-block-mismatch">
2804 ツール使用または思考ブロックの不一致2858 ツール使用または思考ブロックの不一致
2805</h3>2859</h3>
2936モデルの安全対策が、会話内のコンテンツをサイバーセキュリティのトピックとして警告しました。メッセージはリクエストを警告したモデルを示します:2990モデルの安全対策が、会話内のコンテンツをサイバーセキュリティのトピックとして警告しました。メッセージはリクエストを警告したモデルを示します:
2937 2991
2938```text theme={null}2992```text theme={null}
2939API 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-claude2993API 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. Send feedback with /feedback or learn more: https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude
2940```2994```
2941 2995
2942メッセージに `` Details: `[reasoning_extraction]` `` という行が含まれている場合は、[セーフガードが Claude の推論を求めるリクエストを警告しました](#safeguards-flagged-a-request-for-claudes-reasoning)を参照してください。2996メッセージに `` Details: `[reasoning_extraction]` `` という行が含まれている場合は、[セーフガードが Claude の推論を求めるリクエストを警告しました](#safeguards-flagged-a-request-for-claudes-reasoning)を参照してください。
2945 2999
2946[Amazon Bedrock](/docs/ja/amazon-bedrock)、[Google Cloud の Agent Platform](/docs/ja/google-vertex-ai)、[Microsoft Foundry](/docs/ja/microsoft-foundry) では、サイバーセキュリティの警告は代わりに [使用ポリシーによる拒否](#usage-policy-refusal)のメッセージになります。3000[Amazon Bedrock](/docs/ja/amazon-bedrock)、[Google Cloud の Agent Platform](/docs/ja/google-vertex-ai)、[Microsoft Foundry](/docs/ja/microsoft-foundry) では、サイバーセキュリティの警告は代わりに [使用ポリシーによる拒否](#usage-policy-refusal)のメッセージになります。
2947 3001
2948セーフガード自体はサーバー側にあり、v2.1.203 より前から存在しています。それ以降のクライアントリリースで変更されたのはメッセージの表現のみです。
2949v2.1.203 から v2.1.218 までは、メッセージは `<model> has safety measures that flagged this message for a cybersecurity topic. To learn about the Cyber Verification Program and apply for access, visit our help center:` と表示され、その後に同じヘルプセンターのリンクが続き、対話セッションでは `If you were not engaging in a cybersecurity topic, please send feedback via /feedback.` が追加されていました。
2950v2.1.203 より前では、`<model>'s safeguards flagged this message for a cybersecurity topic. If your work requires this access, you can apply for an exemption:` と表示され、その後に免除申請フォームのリンクが続いていました。
2951
2952**対応方法:**3002**対応方法:**
2953 3003
2954* 作業にこのコンテンツが必要な場合は、[Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude) を通じてアクセスを申請してください3004* 作業にこのコンテンツが必要な場合は、[Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude) を通じてアクセスを申請してください
2955* リクエストがサイバーセキュリティのトピックに関するものではなかった場合は、`/feedback` を実行して誤検知を報告してください3005* リクエストがサイバーセキュリティのトピックに関するものではなかった場合は、`/feedback` を実行して誤検知を報告してください
2956* 同じセッションで作業を続けるには、Esc キーを 2 回押すか、`/rewind` を実行して、警告をトリガーしたターンの前のチェックポイントに戻り、別のアプローチを試してください。[チェックポイント機能](/docs/ja/checkpointing)を参照してください。3006* 同じセッションで作業を続けるには、Esc キーを 2 回押すか、`/rewind` を実行して、警告をトリガーしたターンの前のチェックポイントに戻り、別のアプローチを試してください。[チェックポイント機能](/docs/ja/checkpointing)を参照してください。
2957 3007
3008表示されたメッセージが代わりに以下のいずれかの文言である場合は、以前のバージョンの Claude Code における同じ警告です。
3009
3010* v2.1.219 から v2.1.296 までは、メッセージの最後の文の前に `Apply to the Cyber Verification Program to reduce these interruptions.` が含まれることもありました
3011* v2.1.203 から v2.1.218 までは、メッセージは `<model> has safety measures that flagged this message for a cybersecurity topic. To learn about the Cyber Verification Program and apply for access, visit our help center:` で、その後に同じヘルプセンターのリンクが続いていました。インタラクティブセッションでは、さらに `If you were not engaging in a cybersecurity topic, please send feedback via /feedback.` が続いていました
3012* v2.1.203 より前は、メッセージは `<model>'s safeguards flagged this message for a cybersecurity topic. If your work requires this access, you can apply for an exemption:` で、その後に適用除外フォームへのリンクが続いていました
3013
2958<h3 id="safeguards-flagged-a-request-for-claudes-reasoning">3014<h3 id="safeguards-flagged-a-request-for-claudes-reasoning">
2959 セーフガードが Claude の推論を求めるリクエストを警告しました3015 セーフガードが Claude の推論を求めるリクエストを警告しました
2960</h3>3016</h3>
3001 `--bg` と `--print` の競合3057 `--bg` と `--print` の競合
3002</h3>3058</h3>
3003 3059
3004このメッセージには Claude Code v2.1.198 以降が必要です。同じ `claude` の呼び出しで `--bg` と `-p` または `--print` を組み合わせました。`--bg` は後から `claude agents` でアタッチする[バックグラウンドセッション](/docs/ja/agent-view#from-your-shell)を開始しますが、`--print` は[非対話](/docs/ja/headless)で実行され、`claude agents` がアタッチする対話セッションを開始しません。v2.1.198 より前は、この組み合わせによって、アタッチできないバックグラウンドジョブが何も通知されずに作成されていました。3060このメッセージには Claude Code v2.1.198 以降が必要です。同じ `claude` の呼び出しで `--bg` を `-p` または `--print` と組み合わせています。`--bg` は後で `claude agents` でアタッチする[バックグラウンドセッション](/docs/ja/agent-view#from-your-shell)を開始しますが、`--print` は[非対話](/docs/ja/headless)で実行され、`claude agents` がアタッチする対話セッションを開始しません。v2.1.198 より前は、この組み合わせによって、アタッチできないバックグラウンドジョブが何の警告もなく作成されていました。
3005 3061
3006```text theme={null}3062```text theme={null}
3007--bg and --print conflict: --print never starts the interactive session that `claude agents` attaches to, so the job would be unattachable. The prompt is the positional — drop --print: `claude --bg '<task>'`.3063--bg and --print conflict: --print never starts the interactive session that `claude agents` attaches to, so the job would be unattachable. The prompt is the positional — drop --print: `claude --bg '<task>'`.
3008```3064```
3009 3065
3066**対処方法:**
3067
3068* `-p` または `--print` を削除します。`--bg` はプロンプトを位置引数として受け取るため、`claude --bg "<task>"` だけで完全なコマンドになります。[シェルから新しいエージェントを Dispatch する](/docs/ja/agent-view#from-your-shell)を参照してください。
3069* バックグラウンドセッションを作成する代わりにプロンプトを非対話で実行して結果を出力するには、`--bg` を削除して `claude -p "<task>"` を実行します
3070
3071<h3 id="couldnt-tell-whether-bg-is-a-flag-or-text">
3072 Couldn't tell whether `--bg` is a flag or text
3073</h3>
3074
3075Claude Code がバックグラウンドフラグとして意図されたものかテキストとして意図されたものかを判別できない位置に `--bg` または `--background` を指定して `claude` を実行しました。コマンドは何も開始せず、次の行を出力して終了コード 1 で終了しました:
3076
3077```text theme={null}
3078Couldn't tell whether --bg is a flag or text here, so nothing was started. To start a background session put it first: claude --bg <prompt>
3079```
3080
3081`--background` と入力した場合は、この行には代わりに `--background` と表示されます。
3082
3010**対処方法:**3083**対処方法:**
3011 3084
3012* `-p` または `--print` を削除します。`--bg` はプロンプトを位置引数として受け取るため、`claude --bg "<task>"` だけで完全なコマンドになります。[シェルから新しいエージェントをディスパッチする](/docs/ja/agent-view#from-your-shell)を参照してください。3085* [バックグラウンドセッション](/docs/ja/agent-view#from-your-shell)を開始するには、フラグを先頭に置いてシェルでコマンドを再度実行します: `claude --bg --name nightly-audit "<task>"`
3013* バックグラウンドセッションを作成せずにプロンプトを非対話で実行して結果を出力するには、`--bg` を削除して `claude -p "<task>"` を実行します
3014 3086
3015<h3 id="conflict-between-a-system-prompt-flag-and-its-file-form">3087<h3 id="conflict-between-a-system-prompt-flag-and-its-file-form">
3016 システムプロンプトフラグとそのファイル形式の競合3088 システムプロンプトのフラグとそのファイル形式の競合
3017</h3>3089</h3>
3018 3090
30191 回の `claude` の呼び出しで [`--append-subagent-system-prompt`](/docs/ja/cli-reference#cli-flags) と `--append-subagent-system-prompt-file` を同時に渡したため、`claude` はセッションを開始せずに終了コード 1 で終了します:30911 回の `claude` の呼び出しで [`--append-subagent-system-prompt`](/docs/ja/cli-reference#cli-flags) と `--append-subagent-system-prompt-file` を一緒に渡したため、`claude` はセッションを開始せずに終了コード 1 で終了します:
3020 3092
3021```text theme={null}3093```text theme={null}
3022Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.3094Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.
3023```3095```
3024 3096
3025v2.1.283 より前は、`--system-prompt` と `--system-prompt-file`、または `--append-system-prompt` と `--append-system-prompt-file` を渡した場合にも、`claude` は同じように終了していました。これらの組み合わせは[結合](/docs/ja/cli-reference#system-prompt-flags)されずに競合していたためです。これらのバージョンでは、メッセージに組み合わせたフラグのペアが表示されます。3097v2.1.283 より前は、`--system-prompt` と `--system-prompt-file`、または `--append-system-prompt` と `--append-system-prompt-file` を一緒に渡した場合も、`claude` は同様に終了していました。これらの組み合わせは[併用](/docs/ja/cli-reference#system-prompt-flags)されずに競合していたためです。これらのバージョンでは、メッセージに組み合わせたフラグのペアが示されます。
3026 3098
3027**対処方法:**3099**対処方法:**
3028 3100
3029* フラグの一方の形式だけを残し、もう一方を削除します。固定のプロンプトファイルと実行ごとのテキストを組み合わせるには、両方のフラグを渡すのではなく、起動前にテキストをファイルにマージします3101* フラグのどちらか一方の形式を残し、もう一方を削除します。固定のプロンプトファイルと実行ごとのテキストを組み合わせるには、両方のフラグを渡す代わりに、起動前にテキストをファイルにマージします
3030 3102
3031<h3 id="invalid-agents-configuration">3103<h3 id="invalid-agents-configuration">
3032 Invalid `--agents` configuration3104 Invalid `--agents` configuration
3033</h3>3105</h3>
3034 3106
3035`--agents` に渡した値が無効なため、`claude` はセッションを開始せずに終了コード 1 で終了します。`--safe-mode` を渡すか [`CLAUDE_CODE_SAFE_MODE`](/docs/ja/env-vars#variables) を設定すると、Claude Code は `--agents` を完全に無視します。`--resume` または `--continue` を使用する場合、インライン JSON の値はチェックされずにセッションが開始されますが、ファイルから読み込んだ値は起動のたびにチェックされます。v2.1.242 より前は、Claude Code はそれでもセッションを開始していました。3107`--agents` に渡した値が無効なため、`claude` はセッションを開始せずに終了コード 1 で終了します。`--safe-mode` を渡すか [`CLAUDE_CODE_SAFE_MODE`](/docs/ja/env-vars#variables) を設定すると、Claude Code は `--agents` を完全に無視します。`--resume` または `--continue` を使用した場合、インライン JSON の値はチェックされずにセッションが開始されますが、ファイルから読み込んだ値は起動のたびにチェックされます。v2.1.242 より前は、Claude Code はそれでもセッションを開始していました。
3036 3108
3037```text theme={null}3109```text theme={null}
3038Error: Invalid --agents configuration:3110Error: Invalid --agents configuration:
3039<what failed>3111<what failed>
3040```3112```
3041 3113
30421 行目以降の内容は、値がどのように無効だったかによって異なります。Claude Code は以下のチェックを順番に実行し、最初に失敗したチェックで停止します。値に 2 種類の問題がある場合、2 つ目の問題は 1 つ目を修正した後にはじめて表示されます:31141 行目以降の内容は、値がどのように失敗したかによって異なります。Claude Code はこれらのチェックを順番に実行し、最初に失敗したチェックで停止します。値に 2 種類の問題がある場合、2 つ目の問題は 1 つ目を修正した後にのみ表示されます:
3043 3115
30441. 値が `{` で始まるのに JSON として解析できない場合、または `--agents` ファイルの内容を解析できない場合、Claude Code は JSON パーサー自身のメッセージを含む `invalid JSON:` 行を 1 行出力します31161. 値が `{` で始まるのに JSON として解析できない場合、または `--agents` ファイルの内容を解析できない場合、Claude Code は JSON パーサー自身のメッセージを含む `invalid JSON:` 行を 1 行出力します
30452. 解析はできるものの、エージェント定義が [CLI で定義されたサブエージェント](/docs/ja/sub-agents#choose-the-subagent-scope)のスキーマに一致しない場合、Claude Code は問題ごとに 1 行を出力します31172. 解析はできるものの、エージェント定義が [CLI で定義されたサブエージェント](/docs/ja/sub-agents#choose-the-subagent-scope)のスキーマに一致しない場合、Claude Code は問題ごとに 1 行を出力します
3047 3119
3048問題の行が 20 行を超える場合、Claude Code は最初の 20 行を出力し、残りを `…and N more` に置き換えます。3120問題の行が 20 行を超える場合、Claude Code は最初の 20 行を出力し、残りを `…and N more` に置き換えます。
3049 3121
3050`--print` を使用する場合、`--agents` はインラインのオブジェクトの代わりに [JSON ファイルへのパス](/docs/ja/sub-agents#choose-the-subagent-scope)も受け付けます。v2.1.281 より前は、`--agents` はインライン JSON のみを受け付け、ファイルパスを無効な JSON として扱っていました。ファイル形式には独自の拒否メッセージがあり、このメッセージの代わりに出力されます。たとえば次のようなものがあります:3122`--print` を使用する場合、`--agents` はインラインオブジェクトの代わりに [JSON ファイルへのパス](/docs/ja/sub-agents#choose-the-subagent-scope)も受け付けます。v2.1.281 より前は、`--agents` はインライン JSON のみを受け付け、ファイルパスを無効な JSON として扱っていました。ファイル形式には独自の拒否メッセージがあり、このメッセージの代わりに出力されます。次のようなものがあります:
3051 3123
3052* **`Error: --agents takes a JSON object, or a file path only with --print (-p)`**: Claude Code が対話セッションで値をファイルパスとして読み取りました。定義をインライン JSON として渡すか、`-p` を追加してファイルから読み込ませてください。3124* **`Error: --agents takes a JSON object, or a file path only with --print (-p)`**:Claude Code が対話セッションで値をファイルパスとして読み取りました。定義をインライン JSON として渡すか、`-p` を追加してファイルから読み込みます。
3053* **`Error: --agents file not found: <path>`**: そのパスにファイルが存在しません。`{` で始まらず有効な JSON でもない値はパスとして読み取られるため、シェルによって崩れたインライン JSON でもこのように失敗することがあります。パスまたはクォートを確認して、コマンドを再実行してください。3125* **`Error: --agents file not found: <path>`**:そのパスにファイルが存在しません。`{` で始まらず、有効な JSON でもない値はパスとして読み取られるため、シェルによって壊されたインライン JSON もこの形で失敗することがあります。パスまたはクォートを確認して、コマンドを再度実行します。
3054 3126
3055**対処方法:**3127**対処方法:**
3056 3128
3057* メッセージに列挙された各問題を修正してから、コマンドを再実行します。[CLI で定義されたサブエージェントが受け付けるフィールド](/docs/ja/sub-agents#choose-the-subagent-scope)を参照してください。3129* メッセージに列挙された各問題を修正してから、コマンドを再度実行します。[CLI で定義されたサブエージェントが受け取るフィールド](/docs/ja/sub-agents#choose-the-subagent-scope)を参照してください。
3058 3130
3059<h3 id="cloud-sessions-cannot-be-created-from-a-restricted-session">3131<h3 id="cloud-sessions-cannot-be-created-from-a-restricted-session">
3060 Cloud sessions cannot be created from a `--restricted` session3132 Cloud sessions cannot be created from a `--restricted` session
3061</h3>3133</h3>
3062 3134
3063[`--restricted`](/docs/ja/cli-reference#cli-flags) でセッションを開始した場合、Claude Code はそのセッションから[クラウドセッション](/docs/ja/claude-code-on-the-web#from-terminal-to-cloud)を作成することを拒否します。新しいセッションは制限されたプロセスの外部で実行され、制限モードを適用しないためです。Claude Code はサーバーに接続する前にクライアント側で拒否するため、クラウドセッションは作成されません:3135[`--restricted`](/docs/ja/cli-reference#cli-flags) でセッションを開始すると、Claude Code はそのセッションから[クラウドセッション](/docs/ja/claude-code-on-the-web#from-terminal-to-cloud)を作成することを拒否します。新しいセッションは制限されたプロセスの外部で実行され、制限モードを適用しないためです。Claude Code はサーバーに接続する前にクライアント側で拒否するため、クラウドセッションは作成されません:
3064 3136
3065```text theme={null}3137```text theme={null}
3066Cloud sessions cannot be created from a --restricted session: they would not enforce it.3138Cloud sessions cannot be created from a --restricted session: they would not enforce it.
3067```3139```
3068 3140
3069**対処方法:**3141**対処方法:**
3070 3142
3071* 制限されたセッション内でタスクをローカルに実行します3143* 制限されたセッションでタスクをローカルで実行します
3072* セッションの起動方法を制御できる場合は、`--restricted` を付けずに新しい `claude` セッションを開始し、そこからクラウドセッションを作成します3144* セッションの起動方法を制御できる場合は、`--restricted` なしで新しい `claude` セッションを開始し、そこからクラウドセッションを作成します
3073 3145
3074v2.1.248 より前の Claude Code には `--restricted` フラグがありません。それ以前のバージョンでは、フラグ自体が不明なオプションのエラーとして拒否されます。3146v2.1.248 より前の Claude Code には `--restricted` フラグがありませんでした。それ以前のバージョンでは、フラグ自体が不明なオプションのエラーで拒否されます。
3075 3147
3076<h3 id="cloud-sessions-are-disabled-by-your-organizations-policy">3148<h3 id="cloud-sessions-are-disabled-by-your-organizations-policy">
3077 Cloud sessions are disabled by your organization's policy3149 Cloud sessions are disabled by your organization's policy
3078</h3>3150</h3>
3079 3151
3080組織の `allow_remote_sessions` ポリシーがオフになっているため、[クラウドセッション](/docs/ja/claude-code-on-the-web)とそれを使用するコマンドは利用できません:3152組織の `allow_remote_sessions` ポリシーがオフになっているため、[クラウドセッション](/docs/ja/claude-code-on-the-web)とそれを使用するコマンドは利用できません:
3081 3153
3082```text theme={null}3154```text theme={null}
3083Cloud sessions are disabled by your organization's policy. Contact your organization admin to enable them.3155Cloud sessions are disabled by your organization's policy. Contact your organization admin to enable them.
3084```3156```
3085 3157
3086このメッセージは、[ターミナルからクラウドセッションを作成する](/docs/ja/claude-code-on-the-web#from-terminal-to-cloud)とき、および`/teleport`、`/remote-env`、`/web-setup` など、クラウドセッションを必要とするコマンドを送信したときに表示されます。v2.1.268 より前は、これらのコマンドを送信すると代わりに [`Unknown command`](#unknown-command) が返されていました。3158このメッセージは、[ターミナルからクラウドセッションを作成する](/docs/ja/claude-code-on-the-web#from-terminal-to-cloud)ときと、`/teleport`、`/remote-env`、`/web-setup` など、クラウドセッションを必要とするコマンドを送信したときに表示されます。v2.1.268 より前は、これらのコマンドのいずれかを送信すると、代わりに [`Unknown command`](#unknown-command) が返されていました。
3087 3159
3088メッセージが、このセッションで使用している認証情報を挙げ、`Cloud sessions use your claude.ai login.` で終わっている場合は、[Cloud sessions use your claude.ai login](#cloud-sessions-use-your-claude-ai-login) を参照してください。Claude Code が組織のポリシーをまったく読み込めなかった場合は、代わりに[別のメッセージ](#couldnt-verify-your-organizations-policy-for-cloud-sessions)が表示されます。3160メッセージがこのセッションで使用中の認証情報を示し、`Cloud sessions use your claude.ai login.` で終わる場合は、[Cloud sessions use your claude.ai login](#cloud-sessions-use-your-claude-ai-login) を参照してください。Claude Code が組織のポリシーをまったく読み込めなかった場合は、代わりに[別のメッセージ](#couldnt-verify-your-organizations-policy-for-cloud-sessions)が表示されます。
3089 3161
3090**対処方法:**3162**対処方法:**
3091 3163
3092* 組織の [Owner](/docs/ja/server-managed-settings#access-control) に、[claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code) の Claude Code 管理設定でクラウドセッションを有効にするよう依頼します3164* 組織の [Owner](/docs/ja/server-managed-settings#access-control) に、[claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code) の Claude Code 管理設定でクラウドセッションを有効にするよう依頼します
3093 3165
3095 Cloud sessions use your claude.ai login3167 Cloud sessions use your claude.ai login
3096</h3>3168</h3>
3097 3169
3098[ポリシーによる拒否](#cloud-sessions-are-disabled-by-your-organizations-policy)のメッセージが、このセッションで使用している認証情報を挙げ、この文で終わっている場合、Claude Code はその認証情報を発行した組織のクラウドセッションポリシーをチェックしています。その組織は、claude.ai のログインが属する組織とは異なる場合があります:3170[ポリシーによる拒否](#cloud-sessions-are-disabled-by-your-organizations-policy)のメッセージがこのセッションで使用中の認証情報を示し、この文で終わる場合、Claude Code はその認証情報を発行した組織のクラウドセッションポリシーをチェックしています。その組織は、claude.ai のログインが属する組織とは異なる場合があります:
3099 3171
3100```text theme={null}3172```text theme={null}
3101Cloud sessions are disabled by your organization's policy. This session is using ANTHROPIC_API_KEY, so Claude Code checked the policy for the organization that key belongs to. Cloud sessions use your claude.ai login.3173Cloud sessions are disabled by your organization's policy. This session is using ANTHROPIC_API_KEY, so Claude Code checked the policy for the organization that key belongs to. Cloud sessions use your claude.ai login.
3102```3174```
3103 3175
3104最後の文は、クラウドセッションがその認証情報ではなく claude.ai のログインで実行されることを意味します。この形式は、`--cloud` や `--teleport` などを使用して、シェルからクラウドセッションを開始、再開、またはメッセージを送信したときに表示されます。v2.1.296 より前は、この場合にも、組織の管理者に連絡するよう求める形式が出力されていました。3176最後の文は、クラウドセッションがその認証情報ではなく claude.ai のログインで実行されることを意味します。この形式は、`--cloud` や `--teleport` などを使用して、シェルからクラウドセッションを開始、再開、またはメッセージを送信したときに表示されます。v2.1.296 より前は、この場合も、組織の管理者に連絡するよう指示する形式が出力されていました。
3105 3177
3106<h3 id="couldnt-verify-your-organizations-policy-for-cloud-sessions">3178<h3 id="couldnt-verify-your-organizations-policy-for-cloud-sessions">
3107 Couldn't verify your organization's policy for cloud sessions3179 Couldn't verify your organization's policy for cloud sessions
3108</h3>3180</h3>
3109 3181
3110これらのメッセージは、Claude Code が組織のポリシーを読み込めなかったことを意味します。Claude Code は、[クラウドセッション](/docs/ja/claude-code-on-the-web)を作成、再開、またはメッセージを送信する前にこのポリシーをチェックします。ポリシーのリクエストが完了していない間は、次のメッセージが表示されます:3182これらのメッセージは、Claude Code が組織のポリシーを読み込めなかったことを意味します。Claude Code は、[クラウドセッション](/docs/ja/claude-code-on-the-web)を作成、再開、またはメッセージを送信する前にこのポリシーをチェックします。ポリシーのリクエストが完了していない間は、メッセージは次のとおりです:
3111 3183
3112```text theme={null}3184```text theme={null}
3113Couldn't verify your organization's policy for cloud sessions. Check your network connection and try again.3185Couldn't verify your organization's policy for cloud sessions. Check your network connection and try again.
3114```3186```
3115 3187
3116セッション内では、`/teleport` や `/web-setup` など、クラウドセッションを必要とするコマンドでもこのメッセージが表示されます。シェルであれば `Cloud sessions aren't available:` の形式が出力される場合でもこのメッセージが表示され、2 文目は `Check your network connection, then restart Claude Code and try again.` となります。3188セッション内では、`/teleport` や `/web-setup` など、クラウドセッションを必要とするコマンドもこのメッセージを返します。シェルであれば `Cloud sessions aren't available:` 形式が出力される場合でもこのメッセージが返され、その 2 文目は `Check your network connection, then restart Claude Code and try again.` となります。
3117 3189
3118ポリシーのリクエストが失敗した後は、メッセージに何が失敗したかが示されます。これは、`--cloud` や `--teleport` などのフラグを使用して、シェルからクラウドセッションを開始、再開、またはメッセージを送信した場合に該当します。API への経路がない場合は、次のように表示されます:3190ポリシーのリクエストが失敗した後は、メッセージに何が失敗したかが示されます。これは、`--cloud` や `--teleport` などのフラグを使用して、シェルからクラウドセッションを開始、再開、またはメッセージを送信した場合に該当します。API への経路がない場合、メッセージは次のようになります:
3119 3191
3120```text theme={null}3192```text theme={null}
3121Cloud sessions aren't available: couldn't reach api.anthropic.com to load your organization's policy. Check your network or proxy.3193Cloud sessions aren't available: couldn't reach api.anthropic.com to load your organization's policy. Check your network or proxy.
3122```3194```
3123 3195
3124その他の失敗も同じ書き出しで始まり、その後にそれぞれの原因が続きます。たとえば、プロキシが HTTP 403 でリクエストを拒否した場合、サーバーエラー、API が受け付けなかった認証情報などです。`ANTHROPIC_API_KEY` 環境変数など、このセッションが claude.ai のログインの代わりに使用している認証情報を API が受け付けなかった場合、メッセージにはその認証情報の名前と、その設定を解除するよう求める内容も含まれることがあります:3196その他の失敗も同じ書き出しに続けてそれぞれの原因が示されます。たとえば、プロキシが HTTP 403 でリクエストを拒否した場合、サーバーエラー、API が受け付けなかった認証情報などです。`ANTHROPIC_API_KEY` 環境変数など、このセッションが claude.ai のログインの代わりに使用している認証情報を API が受け付けなかった場合、メッセージにはその認証情報の名前と、設定を解除するよう示す内容が含まれることもあります:
3125 3197
3126```text theme={null}3198```text theme={null}
3127Cloud sessions aren't available: api.anthropic.com didn't accept this session's credentials when Claude Code asked for your organization's policy. Cloud sessions use your claude.ai login. ANTHROPIC_API_KEY is set, so this session is using API-key auth — unset it (or run in a shell without it) to use cloud sessions.3199Cloud sessions aren't available: api.anthropic.com didn't accept this session's credentials when Claude Code asked for your organization's policy. Cloud sessions use your claude.ai login. ANTHROPIC_API_KEY is set, so this session is using API-key auth — unset it (or run in a shell without it) to use cloud sessions.
3129 3201
3130v2.1.296 より前は、これらの失敗でも `Couldn't verify` メッセージが出力されていました。3202v2.1.296 より前は、これらの失敗でも `Couldn't verify` メッセージが出力されていました。
3131 3203
3132**対処方法:**3204**対処方法:**
3133 3205
3134* `Couldn't verify` メッセージの場合は、ネットワーク接続を確認して再試行します。セッション内の場合は、まず Claude Code を再起動します3206* `Couldn't verify` メッセージの場合は、ネットワーク接続を確認して再試行します。セッション内の場合は、先に Claude Code を再起動します
3135* `Cloud sessions aren't available:` メッセージの場合は、プロキシの確認や、メッセージに示された認証情報の設定解除など、原因に応じた対処を行ってから、コマンドを再実行します3207* `Cloud sessions aren't available:` メッセージの場合は、プロキシの確認や示された認証情報の設定解除など、原因に応じた対処を行ってから、コマンドを再度実行します
3136 3208
3137<h3 id="nothing-was-stashed-because-a-folder-replaced-a-tracked-file">3209<h3 id="nothing-was-stashed-because-a-folder-replaced-a-tracked-file">
3138 追跡対象のファイルがフォルダーに置き換わったため何もスタッシュされなかった3210 フォルダーが追跡対象のファイルを置き換えたため何もスタッシュされなかった
3139</h3>3211</h3>
3140 3212
3141このメッセージは、チェックアウト内で、git が追跡しているファイルまたはリンクがあった場所にフォルダーが存在するようになったことを意味します。これは、`claude --teleport` や `/teleport` などで[クラウドセッション](/docs/ja/claude-code-on-the-web#from-cloud-to-terminal)をターミナルに取り込む際にスタッシュのオプションを選択した後に表示されます。その状態をスタッシュするとフォルダー内のファイルが削除される可能性があるため、Claude Code はスタッシュを拒否し、チェックアウトとインデックスを変更せずにそのままにします:3213このメッセージは、チェックアウト内で、以前は git で追跡されていたファイルまたはリンクがあった場所に、現在はフォルダーがあることを意味します。たとえば `claude --teleport` や `/teleport` を使用して[クラウドセッション](/docs/ja/claude-code-on-the-web#from-cloud-to-terminal)をターミナルに取り込む際に、スタッシュのオプションを選択した後に表示されます。その状態をスタッシュするとフォルダー内のファイルが削除される可能性があるため、Claude Code はスタッシュを拒否し、チェックアウトとインデックスを変更しないままにします:
3142 3214
3143```text wrap theme={null}3215```text wrap theme={null}
3144Error: Nothing was stashed: "f" is now a folder in place of a tracked file or link, and stashing could delete what's in it for good. Commit the change or move the folder somewhere else, then try again.3216Error: Nothing was stashed: "f" is now a folder in place of a tracked file or link, and stashing could delete what's in it for good. Commit the change or move the folder somewhere else, then try again.
3145```3217```
3146 3218
3147**対処方法:**3219**対処方法:**
3148 3220
3149* メッセージのとおり、変更をコミットするかフォルダーを別の場所に移動してから、teleport を再実行します3221* メッセージに示されているとおり、変更をコミットするかフォルダーを別の場所に移動してから、再度 teleport を実行します
3150 3222
3151<h3 id="the-json-schema-value-is-not-a-valid-json-schema">3223<h3 id="the-json-schema-value-is-not-a-valid-json-schema">
3152 The `--json-schema` value is not a valid JSON Schema3224 The `--json-schema` value is not a valid JSON Schema
3153</h3>3225</h3>
3154 3226
3155[非対話モード](/docs/ja/headless#get-structured-output)で [`--json-schema`](/docs/ja/cli-reference#cli-flags) に渡したスキーマが JSON Schema のコンパイルに失敗したため、`claude` はプロンプトを実行せずに終了コード 1 で終了します。v2.1.205 より前は、無効なスキーマはエラーなしに構造化されていない出力を生成し、`format` キーワードを使用するスキーマはすべて無効として扱われていました。3227[非対話モード](/docs/ja/headless#get-structured-output)で [`--json-schema`](/docs/ja/cli-reference#cli-flags) に渡したスキーマが JSON Schema のコンパイルに失敗したため、`claude` はプロンプトを実行せずに終了コード 1 で終了します。v2.1.205 より前は、無効なスキーマはエラーなしで構造化されていない出力を生成し、`format` キーワードを使用するスキーマはすべて無効として扱われていました。
3156 3228
3157```text theme={null}3229```text theme={null}
3158Error: --json-schema is not a valid JSON Schema: data/type must be equal to one of the allowed values3230Error: --json-schema is not a valid JSON Schema: data/type must be equal to one of the allowed values
3159```3231```
3160 3232
31612 つ目のコロンの後のテキストはバリデーターの診断メッセージで、失敗したキーワードまたは場所を示します。`"format": "email"` のように `format` キーワードを使用するスキーマは有効です。Claude Code は `format` を注釈として受け付け、その内容を強制しません。32332 つ目のコロン以降のテキストはバリデーターの診断メッセージで、失敗したキーワードまたは場所を示します。`"format": "email"` のように `format` キーワードを使用するスキーマは有効です。Claude Code は `format` をアノテーションとして受け付けますが、適用はしません。
3162 3234
3163Claude Code はスキーマのコンパイルの前に 2 つのチェックを行います。解析可能な JSON でない値は `Error: --json-schema is not valid JSON` で、オブジェクトではない有効な JSON は `Error: --json-schema must be a JSON object` で拒否されます。3235Claude Code はスキーマのコンパイル前に 2 つのチェックを実行します。解析可能な JSON でない値は `Error: --json-schema is not valid JSON` で拒否し、オブジェクトではない有効な JSON は `Error: --json-schema must be a JSON object` で拒否します。
3164 3236
3165**対処方法:**3237**対処方法:**
3166 3238
3167* 診断メッセージが示すスキーマの部分を修正してから、コマンドを再実行します3239* 診断メッセージが示すスキーマの部分を修正してから、コマンドを再実行します
3168* 動作するスキーマとコマンドの例については、[構造化された出力を取得する](/docs/ja/headless#get-structured-output)を参照してください3240* 動作するスキーマとコマンドについては、[構造化出力を取得する](/docs/ja/headless#get-structured-output)を参照してください
3169 3241
3170<h3 id="settings-file-exceeds-the-2mib-limit">3242<h3 id="settings-file-exceeds-the-2mib-limit">
3171 Settings file exceeds the 2MiB limit3243 Settings file exceeds the 2MiB limit
3172</h3>3244</h3>
3173 3245
3174[`--settings`](/docs/ja/cli-reference#cli-flags) に渡したファイルが 2 MiB を超えているため、`claude` はファイルを読み込まずに起動時に終了コード 1 で終了します。v2.1.214 より前は、Claude Code はサイズをチェックせずにファイルを読み込んでいたため、数ギガバイトのファイルや `/dev/zero` などのデバイスファイルによってメモリが際限なく増加していました。3246[`--settings`](/docs/ja/cli-reference#cli-flags) に渡したファイルが 2 MiB を超えているため、`claude` は起動時にそれを読み込まずに終了コード 1 で終了します。v2.1.214 より前は、Claude Code はサイズチェックなしでファイルを読み込んでいたため、数ギガバイトのファイルや `/dev/zero` などのデバイスファイルによってメモリが際限なく増加していました。
3175 3247
3176```text theme={null}3248```text theme={null}
3177Error: Settings file exceeds the 2MiB limit: /path/to/settings.json3249Error: Settings file exceeds the 2MiB limit: /path/to/settings.json
3178```3250```
3179 3251
3180Claude Code は、通常のファイルではない `--settings` のパスも同じように拒否します。デバイス、FIFO、ソケットの場合は `Error: Cannot use settings file (Not a regular file (device, FIFO, or socket))` の後にパスが表示され、ディレクトリの場合は `EISDIR` という理由が表示されます。3252Claude Code は、通常のファイルではない `--settings` パスも同様に拒否します。デバイス、FIFO、ソケットの場合は `Error: Cannot use settings file (Not a regular file (device, FIFO, or socket))` に続けてパスが報告され、ディレクトリの場合は `EISDIR` の理由が報告されます。
3181 3253
3182**対処方法:**3254**対処方法:**
3183 3255
3184* `--settings` には 2 MiB 未満の通常の JSON 設定ファイルを指定します。形式については[設定](/docs/ja/settings)を参照してください。3256* `--settings` には 2 MiB 未満の通常の JSON 設定ファイルを指定します。形式については[設定](/docs/ja/settings)を参照してください。
3185 3257
3187 The current directory no longer exists3259 The current directory no longer exists
3188</h3>3260</h3>
3189 3261
3190シェルがディレクトリに入った後に削除または移動されたディレクトリ(たとえば、別のシェルが削除した worktree や一時ディレクトリ)から `claude` を開始しました。Claude Code は作業ディレクトリを読み取れないため、対話モードでも[非対話](/docs/ja/headless)モードでも、セッションを開始する前に終了コード 1 で終了します。v2.1.239 より前は、このメッセージの代わりに、Claude Code はミニファイされたバンドルのソースと生の `ENOENT ... uv_cwd` スタックを stderr に出力してクラッシュしていました。3262シェルがディレクトリに入った後に削除または移動されたディレクトリから `claude` を起動しました。たとえば、別のシェルが削除した worktree や一時ディレクトリなどです。Claude Code は作業ディレクトリを読み取れないため、対話モードと[非対話](/docs/ja/headless)モードのどちらでも、セッションを開始する前に終了コード 1 で終了します。v2.1.239 より前は、Claude Code はこのメッセージの代わりに、圧縮されたバンドルのソースと生の `ENOENT ... uv_cwd` スタックを stderr に出力してクラッシュしていました。
3191 3263
3192```text theme={null}3264```text theme={null}
3193The current directory no longer exists (it was deleted or moved). Start Claude Code from an existing directory.3265The current directory no longer exists (it was deleted or moved). Start Claude Code from an existing directory.
3194error: The current working directory was deleted, so that command didn't work. Please cd into a different directory and try again.3266error: The current working directory was deleted, so that command didn't work. Please cd into a different directory and try again.
3195```3267```
3196 3268
3197どちらの形式でも、原因と修正方法は同じです。3269どちらの形式も、原因と修正方法は同じです。
3198 3270
3199権限の変更など、別の理由で Claude Code が作業ディレクトリを読み取れない場合は、代わりにメッセージにエラーコードが示されます: `Can't read the current directory (EACCES). Start Claude Code from a different directory.`3271権限の変更など、別の理由で Claude Code が作業ディレクトリを読み取れない場合は、代わりにメッセージにエラーコードが示されます:`Can't read the current directory (EACCES). Start Claude Code from a different directory.`
3200 3272
3201macOS で、`~/Desktop`、`~/Documents`、`~/Downloads`、または iCloud Drive 内のディレクトリに対して `EPERM` が表示される場合、通常は macOS がターミナルアプリによるそのフォルダーへのアクセスをブロックしています。そのフォルダーを読み取る他のコマンドも同じように失敗します。そこで `ls` を実行すると、`sudo` を付けても `Operation not permitted` が表示されます。3273macOS で、`~/Desktop`、`~/Documents`、`~/Downloads`、または iCloud Drive 内のディレクトリに対して `EPERM` が発生する場合、通常は macOS がターミナルアプリによるそのフォルダーへのアクセスをブロックしていることを意味します。そのフォルダーを読み取る他のコマンドも同様に失敗します。そこで `ls` を実行すると、`sudo` を使用しても `Operation not permitted` が報告されます。
3202 3274
3203**対処方法:**3275**対処方法:**
3204 3276
3205* ホームディレクトリやプロジェクトディレクトリなど、存在するディレクトリに移動してから、`claude` を再実行します3277* ホームディレクトリやプロジェクトディレクトリなど、存在するディレクトリに移動してから、再度 `claude` を実行します
3206* ディレクトリが同じパスに再作成された場合、シェルはまだ削除されたディレクトリを保持しています。`cd "$PWD"` を実行するか、ディレクトリから出て再び入ってから、`claude` を再実行します3278* ディレクトリが同じパスに再作成された場合でも、シェルは削除されたディレクトリを保持したままです。`cd "$PWD"` を実行するか、ディレクトリから出て再度入ってから、再度 `claude` を実行します
3207* macOS で `EPERM` が表示される場合は、Cmd+Q でターミナルアプリを終了し、再度開いてそのフォルダーに戻ってから `claude` を実行します。それでもそのフォルダーで `ls` が失敗する場合は、**システム設定 > プライバシーとセキュリティ > ファイルとフォルダ** を開き、ターミナルアプリに対してそのフォルダーをオンにしてから、ターミナルを開き直します3279* macOS の `EPERM` の場合は、Cmd+Q でターミナルアプリを終了し、再度開いてそのフォルダーに戻り、`claude` を実行します。それでもそのフォルダーで `ls` が失敗する場合は、**System Settings > Privacy & Security > Files and Folders** を開き、ターミナルアプリに対してそのフォルダーをオンにしてから、ターミナルを開き直します
3208 3280
3209<h3 id="temp-directory-refused-or-cannot-be-created">3281<h3 id="temp-directory-refused-or-cannot-be-created">
3210 一時ディレクトリが拒否される、または作成できない3282 一時ディレクトリが拒否された、または作成できない
3211</h3>3283</h3>
3212 3284
3213macOS と Linux では、Claude Code は起動時に、システムの一時ディレクトリまたは [`CLAUDE_CODE_TMPDIR`](/docs/ja/env-vars) による上書き先の下に、専用の一時ディレクトリ `claude-<uid>` を作成します。ディレクトリを作成できない場合、またはそのパスにすでに存在するエントリが安全性チェックに失敗した場合、Claude Code はセッションを開始せずに、失敗内容を stderr に出力して終了コード 1 で終了します:3285macOS と Linux では、Claude Code は起動時にプライベートな一時ディレクトリを作成します。これは、システムの一時ディレクトリまたは [`CLAUDE_CODE_TMPDIR`](/docs/ja/env-vars) による上書き先の下にある `claude-<uid>` です。ディレクトリを作成できない場合、またはそのパスに既に存在するエントリが安全性チェックに失敗した場合、Claude Code はセッションを開始せずに、失敗を stderr に出力して終了コード 1 で終了します:
3214 3286
3215```text wrap theme={null}3287```text wrap theme={null}
3216ENOSPC: no space left on device, mkdir '/tmp/claude-501'3288ENOSPC: no space left on device, mkdir '/tmp/claude-501'
3222Temp directory /tmp/claude-501 is not readable (its mode may have been altered, or a path component denies search). Refusing to use it — restore its permissions (chmod 0700) or remove it. Set CLAUDE_CODE_TMPDIR to a directory you control, or ask an administrator to remove it.3294Temp directory /tmp/claude-501 is not readable (its mode may have been altered, or a path component denies search). Refusing to use it — restore its permissions (chmod 0700) or remove it. Set CLAUDE_CODE_TMPDIR to a directory you control, or ask an administrator to remove it.
3223```3295```
3224 3296
3225**対処方法:**3297**対処方法:**
3226 3298
3227* `ENOSPC` の場合は、一時ディレクトリがあるボリュームのディスク容量を空けます3299* `ENOSPC` の場合は、一時ディレクトリがあるボリュームのディスク容量を空けます
3228* `Refusing to use it` を含む形式の場合は、リンクの参照先ではなく、示されたエントリ自体を削除してから、Claude Code を再起動します。`owned by uid` の形式の場合、削除できるのは管理者またはそのユーザーのみです3300* `Refusing to use it` 形式の場合は、リンク先ではなく示されたエントリ自体を削除し、Claude Code を再度起動します。`owned by uid` 形式の場合、削除できるのは管理者またはそのユーザーのみです
3229* `is not readable` の場合は、示されたディレクトリに対して `chmod 0700` を実行するか、ディレクトリを削除してから再起動します3301* `is not readable` の場合は、示されたディレクトリに対して `chmod 0700` を実行するか、ディレクトリを削除してから再度起動します
3230* いずれの場合も、拒否されたパスには手を触れずに、[`CLAUDE_CODE_TMPDIR`](/docs/ja/env-vars) を自分が管理するディレクトリに設定して Claude Code を再起動することもできます3302* いずれの場合も、拒否されたパスはそのままにして、[`CLAUDE_CODE_TMPDIR`](/docs/ja/env-vars) を自分が管理するディレクトリに設定し、Claude Code を再度起動できます
3231 3303
3232<h3 id="directory-couldnt-be-resolved-to-a-real-location">3304<h3 id="directory-couldnt-be-resolved-to-a-real-location">
3233 Directory couldn't be resolved to a real location3305 Directory couldn't be resolved to a real location
3235 3307
3236作業ディレクトリのサブディレクトリに対して `/add-dir` を実行しましたが、Claude Code がそのディレクトリを実際の場所に解決できませんでした。3308作業ディレクトリのサブディレクトリに対して `/add-dir` を実行しましたが、Claude Code がそのディレクトリを実際の場所に解決できませんでした。
3237 3309
3238作業ディレクトリのサブディレクトリにはすでにファイルアクセス権があるため、`/add-dir` はそのスキル、コマンド、エージェントを読み込むだけです。読み込む前に、Claude Code はシンボリックリンクを解決したディレクトリの実際の場所が作業ディレクトリ内にあることをチェックします。その場所を解決できない場合、Claude Code は何も読み込まずに次のメッセージを表示します:3310作業ディレクトリのサブディレクトリには既にファイルアクセス権があるため、`/add-dir` はそのスキル、コマンド、エージェントを読み込むだけです。これらを読み込む前に、Claude Code は、シンボリックリンクを解決したディレクトリの実際の場所が作業ディレクトリ内にあることを確認します。その場所を解決できない場合、Claude Code は何も読み込まず、次のメッセージを表示します:
3239 3311
3240```text theme={null}3312```text theme={null}
3241packages/app couldn't be resolved to a real location, so its skills, commands, and agents weren't loaded. Check that it is a directory inside the working directory and try again.3313packages/app couldn't be resolved to a real location, so its skills, commands, and agents weren't loaded. Check that it is a directory inside the working directory and try again.
3242```3314```
3243 3315
3244**対処方法:**3316**対処方法:**
3245 3317
3246* パスが作業ディレクトリ内の実在するディレクトリを指していることを確認してから、`/add-dir` を再実行します3318* パスが作業ディレクトリ内の実在するディレクトリを指していることを確認してから、再度 `/add-dir` を実行します
3247* このメッセージはファイルアクセスを変更しません。ディレクトリの `.claude/` の内容が読み込まれなかったことを報告しているだけです3319* このメッセージはファイルアクセスを変更しません。ディレクトリの `.claude/` の内容が読み込まれなかったことを報告するだけです
3248 3320
3249v2.1.261 より前は、作業ディレクトリが `/net/<host>` の自動マウント上にある場合、すべての `/add-dir <subdirectory>` でもこのメッセージが表示されていました。Claude Code は設計上そのようなパスを解決しないためで、ディレクトリには問題がなく、再試行しても解決しませんでした。3321v2.1.261 より前は、作業ディレクトリが `/net/<host>` の自動マウント上にある場合、すべての `/add-dir <subdirectory>` でもこのメッセージが表示されていました。この場所では Claude Code は設計上パスの解決を行いません。ディレクトリには問題がなく、再試行しても解決しませんでした。
3250 3322
3251<h3 id="workspace-not-trusted-when-starting-remote-control">3323<h3 id="workspace-not-trusted-when-starting-remote-control">
3252 Workspace not trusted when starting Remote Control3324 Workspace not trusted when starting Remote Control
3253</h3>3325</h3>
3254 3326
3255信頼していないディレクトリで `claude remote-control` またはそのエイリアス `claude rc` を使用して [Remote Control](/docs/ja/remote-control) のサーバーモードを開始しましたが、コマンドがそのディレクトリを信頼するかどうかを確認できませんでした。たとえば、標準入力または標準出力のいずれかがリダイレクトまたはパイプされているため、ターミナルではない場合です。コマンドは終了コード 1 で終了します:3327信頼していないディレクトリで `claude remote-control` またはそのエイリアス `claude rc` を使用して [Remote Control](/docs/ja/remote-control) のサーバーモードを開始しましたが、コマンドはそのディレクトリを信頼するかどうかを確認できませんでした。たとえば、コマンドの標準入力または標準出力のいずれかがリダイレクトまたはパイプされているため、ターミナルではない場合です。コマンドは終了コード 1 で終了します:
3256 3328
3257```text theme={null}3329```text theme={null}
3258Error: Workspace not trusted. Please run `claude` in /Users/you/project first to review and accept the workspace trust dialog.3330Error: Workspace not trusted. Please run `claude` in /Users/you/project first to review and accept the workspace trust dialog.
3259```3331```
3260 3332
3261同じく `Error: Workspace not trusted.` で始まる 2 つのバリエーションが、ディレクトリを信頼すると何が有効になるかを表示するには小さすぎるターミナル、またはサイズを報告しなかったターミナルで表示されます。ウィンドウを大きくするか通常のターミナルウィンドウに切り替えてから、`claude rc` を再実行してください。3333同じく `Error: Workspace not trusted.` で始まる 2 つのバリエーションは、ディレクトリを信頼することで有効になる内容を表示するにはターミナルが小さすぎる場合、またはターミナルがサイズを報告しなかった場合に表示されます。ウィンドウを拡大するか通常のターミナルウィンドウに切り替えてから、再度 `claude rc` を実行します。
3262 3334
3263ホームディレクトリでは、メッセージが異なります。ワークスペースの信頼ダイアログはホームディレクトリの信頼を保存しないため、そこでダイアログを承認してもこのチェックを満たせないからです。v2.1.214 より前は、ホームディレクトリでも上記のメッセージが表示されていましたが、その助言はホームディレクトリでは成功しません。3335ホームディレクトリではメッセージが異なります。ワークスペースの信頼ダイアログはホームディレクトリに対する信頼を保存しないため、そこで承認してもこのチェックを満たせないからです。v2.1.214 より前は、ホームディレクトリでも上記のメッセージが表示されていましたが、その助言はホームディレクトリでは成功しません。
3264 3336
3265```text theme={null}3337```text theme={null}
3266Error: 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).3338Error: 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).
3267```3339```
3268 3340
3269[`Trust <directory>?` の質問](/docs/ja/remote-control#requirements)に `n` と答えるか Enter を押した場合、コマンドはディレクトリ名を含む `Remote Control did not start` メッセージを出力して終了コード 1 で終了します。`y` と答えるには `claude rc` を再実行してください。3341[`Trust <directory>?` の質問](/docs/ja/remote-control#requirements)に `n` と答えるか Enter キーを押すと、コマンドはディレクトリ名を示す `Remote Control did not start` メッセージを出力し、終了コード 1 で終了します。`y` と答えるには、再度 `claude rc` を実行します。
3270 3342
3271**対処方法:**3343**対処方法:**
3272 3344
3273* まずターミナルからディレクトリを信頼します。そこで `claude rc` を実行して `y` と答えるか、そこで `claude` を実行して[ワークスペースの信頼ダイアログ](/docs/ja/permissions#project-allow-rules-and-workspace-trust)を承認してから、元のコマンドを再実行します3345* まずターミナルからディレクトリを信頼します。そこで `claude rc` を実行して `y` と答えるか、そこで `claude` を実行して[ワークスペースの信頼ダイアログ](/docs/ja/permissions#project-allow-rules-and-workspace-trust)を承認してから、元のコマンドを再度実行します
3274* ホームディレクトリにいる場合は、プロジェクトディレクトリに移動してそこで Remote Control を開始します3346* ホームディレクトリにいる場合は、プロジェクトディレクトリに移動して、そこで Remote Control を開始します
3275 3347
3276v2.1.284 より前は、ターミナル内であってもコマンドは確認を求めませんでした。3348v2.1.284 より前は、ターミナル内であってもコマンドが確認を求めることはありませんでした。
3277 3349
3278<h3 id="not-carried-over-to-the-sessions-remote-control-starts">3350<h3 id="not-carried-over-to-the-sessions-remote-control-starts">
3279 Not carried over to the sessions Remote Control starts3351 Not carried over to the sessions Remote Control starts
3280</h3>3352</h3>
3281 3353
3282`remote-control` 動詞の前に、Remote Control が開始するセッションを制限または設定するグローバルな `claude` フラグ(`--settings`、`--setting-sources`、`--permission-mode`、`--disallowed-tools`、`--mcp-config` など)を付けて [Remote Control](/docs/ja/remote-control) を開始しました。動詞の前に置いたフラグは、それらのセッションに届きません。Claude Code は代わりに、フラグ名を示して起動を拒否します:3354`remote-control` サブコマンドの前にグローバルな `claude` フラグを付けて [Remote Control](/docs/ja/remote-control) を開始しました。これは、`--settings`、`--setting-sources`、`--permission-mode`、`--disallowed-tools`、`--mcp-config` など、Remote Control が開始するセッションを制限または設定するフラグです。サブコマンドの前に置いたフラグは、これらのセッションには渡されません。代わりに、Claude Code はフラグ名を示して起動を拒否します:
3283 3355
3284```text theme={null}3356```text theme={null}
3285Error: `--settings` before `remote-control` is not carried over to the sessions Remote Control starts, so Remote Control refuses to start rather than drop it — remove it, and give Remote Control's own options after the verb (see `claude remote-control --help`).3357Error: `--settings` before `remote-control` is not carried over to the sessions Remote Control starts, so Remote Control refuses to start rather than drop it — remove it, and give Remote Control's own options after the verb (see `claude remote-control --help`).
3286```3358```
3287 3359
3288`--verbose`、`--model`、ラッパーによって挿入される `--session-id` や `--plugin-dir` など、破棄しても問題のないグローバルフラグについては、Claude Code は拒否しません。それらを無視して Remote Control を開始します。3360`--verbose`、`--model`、ラッパーによって挿入された `--session-id` や `--plugin-dir` など、無視しても問題のないグローバルフラグは拒否されません。Claude Code はこれらを無視し、Remote Control は起動します。
3289 3361
3290Claude Code は、まだ無害と認識していないグローバルフラグについても起動を拒否します。そのため、新しいリリースで追加されたフラグは、後のリリースで無害とマークされるまでこのメッセージに表示されることがあります。3362Claude Code は、まだ無害と認識していないグローバルフラグに対しても起動を拒否します。そのため、新しいリリースで追加されたフラグは、後のリリースで無害とマークされるまでこのメッセージに表示されることがあります。
3291 3363
3292**対処方法:**3364**対処方法:**
3293 3365
3294* 動詞の前からフラグを削除し、[Remote Control 独自のオプション](/docs/ja/remote-control#start-a-remote-control-session)を動詞の後に渡します。`claude remote-control --help` でそれらの一覧を確認できます3366* サブコマンドの前からフラグを削除し、[Remote Control 独自のオプション](/docs/ja/remote-control#start-a-remote-control-session)をサブコマンドの後に渡します。`claude remote-control --help` でオプションの一覧を確認できます
3295* 拒否されたフラグが `--permission-mode` の場合は、`claude remote-control --permission-mode <mode>` を実行して、Remote Control が開始するセッションの権限モードを設定します3367* 拒否されたフラグが `--permission-mode` の場合は、`claude remote-control --permission-mode <mode>` を実行して、Remote Control が開始するセッションの権限モードを設定します
3296 3368
3297v2.1.248 より前は、グローバルフラグが先にあると `claude remote-control` は独自のフラグを受け付けず、コマンドは `unknown option` エラーで失敗していました。3369v2.1.248 より前は、グローバルフラグが先にあると `claude remote-control` は独自のフラグを受け付けず、コマンドは `unknown option` エラーで失敗していました。
3298 3370
3371<h3 id="sandbox-is-not-supported-by-claude-remote-control">
3372 `--sandbox` or `--no-sandbox` is not supported by claude remote-control
3373</h3>
3374
3375このエラーは、[Remote Control](/docs/ja/remote-control) サーバーを起動するコマンドが `remote-control` の後に `--sandbox` または `--no-sandbox` を渡しており、`claude remote-control` はどちらのフラグも受け付けないことを意味します。サーバーは起動せずに終了コード 1 で終了します:
3376
3377```text theme={null}
3378Error: --sandbox is not supported by claude remote-control. The flag had no effect and was removed. To sandbox sessions, set sandbox.enabled to true in settings.
3379Error: --no-sandbox is not supported by claude remote-control. The flag had no effect and was removed. Remove it from the command.
3380```
3381
3382**対処方法:**
3383
3384* サーバーを自動で起動するスクリプトやサービス定義も含め、コマンドからフラグを削除してから、再度実行します
3385* サーバーが開始するセッションをサンドボックス化するには、[設定ファイル](/docs/ja/settings#where-settings-live)で [`sandbox.enabled`](/docs/ja/settings-reference#sandbox-enabled) を `true` に設定して[サンドボックス化](/docs/ja/sandboxing)をオンにします
3386
3387両方のフラグは v2.1.300 で `claude remote-control` から削除されたため、以前のバージョン向けに書かれたコマンドにはまだどちらかが含まれている可能性があります。
3388
3299<h3 id="claude-import-is-not-yet-available-in-this-build">3389<h3 id="claude-import-is-not-yet-available-in-this-build">
3300 claude import is not yet available in this build3390 claude import is not yet available in this build
3301</h3>3391</h3>
3302 3392
3303[`claude import`](/docs/ja/cli-reference#cli-commands) を実行しましたが、Claude Code がインポートフローがオフになっていることを検出したため、コマンドはインポートを開始せずに終了コード 1 で終了します。v2.1.222 より前は、インポートフローがオフのビルドでは `import` がプロンプトとして扱われ、このメッセージを出力する代わりに対話セッションが開始されていました。3393[`claude import`](/docs/ja/cli-reference#cli-commands) を実行しましたが、Claude Code はインポートフローがオフになっていることを検出したため、コマンドはインポートを開始せずに終了コード 1 で終了します。v2.1.222 より前は、インポートフローがオフのビルドでは `import` がプロンプトとして扱われ、このメッセージを出力する代わりに対話セッションが開始されていました。
3304 3394
3305```text theme={null}3395```text theme={null}
3306`claude import` is not yet available in this build. Run `claude` and use /mcp or edit ~/.claude/settings.json directly.3396`claude import` is not yet available in this build. Run `claude` and use /mcp or edit ~/.claude/settings.json directly.
3307```3397```
3308 3398
3309Claude Code は、Anthropic から取得してディスクにキャッシュする機能フラグによって `claude import` をオンにします。このメッセージは、キャッシュされた値がオフであることを意味します。原因は通常、次のいずれかです:3399Claude Code は、Anthropic から取得してディスクにキャッシュする機能フラグによって `claude import` をオンにします。このメッセージは、キャッシュされた値がオフであることを意味します。原因は通常、次のいずれかです:
3310 3400
3311* インストール後にまだセッションを開始していないため、Claude Code がフラグをまだ取得していません。機能が利用可能な場合でも、最初の `claude import` でこのメッセージが出力されることがあります。3401* インストール後にまだセッションを開始していないため、Claude Code がまだフラグを取得していません。機能が利用可能な場合でも、最初の `claude import` でこのメッセージが出力されることがあります。
3312* Amazon Bedrock、Google Cloud の Agent Platform、Microsoft Foundry、Claude Platform on AWS、または [Claude apps gateway](/docs/ja/claude-apps-gateway#availability-and-limitations) を通じて Claude Code を使用しています。これらのセッションでは Claude Code が機能フラグを取得しないため、`claude import` は利用できないままです。3402* Amazon Bedrock、Google Cloud の Agent Platform、Microsoft Foundry、Claude Platform on AWS、または [Claude apps gateway](/docs/ja/claude-apps-gateway#availability-and-limitations) 経由で Claude Code を使用しています。これらのセッションでは Claude Code は機能フラグを取得しないため、`claude import` は利用できないままです。
3313* 機能フラグの取得をオフにする `DISABLE_TELEMETRY`、`DO_NOT_TRACK`、`DISABLE_GROWTHBOOK`、または [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](/docs/ja/env-vars) を設定しているため、`claude import` は利用できないままです。3403* `DISABLE_TELEMETRY`、`DO_NOT_TRACK`、`DISABLE_GROWTHBOOK`、または [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](/docs/ja/env-vars) を設定しています。これらは機能フラグの取得をオフにするため、`claude import` は利用できないままです。
3314 3404
3315**対処方法:**3405**対処方法:**
3316 3406
3317* 新規インストールの場合は、`claude` を起動し、セッションが読み込まれるのを待ってから終了し、`claude import` を再実行します3407* 新規インストールの場合は、`claude` を起動してセッションが読み込まれるのを待ち、終了してから再度 `claude import` を実行します
3318* 機能フラグの取得がオフのままの環境では、設定を自分でセットアップします。[`claude mcp add`](/docs/ja/mcp#installing-mcp-servers) で MCP サーバーを追加し、引き継ぎたい [`CLAUDE.md` ファイル](/docs/ja/memory#how-claude-md-files-load)、[スキルとコマンド](/docs/ja/skills#where-skills-live)、[サブエージェント](/docs/ja/sub-agents#choose-the-subagent-scope)を作成します。メッセージでは `~/.claude/settings.json` も挙げられていますが、`claude import` が引き継ぐ設定のうち、このファイルに保存されるのは[権限モード](/docs/ja/settings-reference#permission-settings)だけです。Claude Code はこのファイルから MCP サーバーを読み込みません。3408* 機能フラグの取得がオフのままの環境では、設定を自分で行います。[`claude mcp add`](/docs/ja/mcp#installing-mcp-servers) で MCP サーバーを追加し、引き継ぎたい [`CLAUDE.md` ファイル](/docs/ja/memory#how-claude-md-files-load)、[スキルとコマンド](/docs/ja/skills#where-skills-live)、[サブエージェント](/docs/ja/sub-agents#choose-the-subagent-scope)を作成します。メッセージには `~/.claude/settings.json` も示されています。`claude import` が引き継ぐ設定のうち、このファイルに含まれるのは[権限モード](/docs/ja/settings-reference#permission-settings)のみで、Claude Code はこのファイルから MCP サーバーを読み込みません。
3319 3409
3320<h3 id="could-not-read-claude-code-config">3410<h3 id="could-not-read-claude-code-config">
3321 Could not read Claude Code config3411 Could not read Claude Code config
3322</h3>3412</h3>
3323 3413
3324Claude Code が `~/.claude.json`(ログインとプロジェクトごとの状態を保存するファイル)を解析できない状態で [`claude import`](/docs/ja/cli-reference#cli-commands) を実行しました。このサブコマンドは利用可否をチェックするためにそのファイルを読み込みますが、対話セッションが表示する復旧ダイアログは表示しないため、終了コード 1 で終了します。v2.1.222 より前は、設定ファイルが読み取れない状態で `claude import` を実行すると対話セッションが開始され、その復旧ダイアログでファイルが処理されていました。3414Claude Code が `~/.claude.json`(ログイン情報とプロジェクトごとの状態を保存するファイル)を解析できない状態で [`claude import`](/docs/ja/cli-reference#cli-commands) を実行しました。このサブコマンドは利用可否を確認するためにこのファイルを読み込みますが、対話セッションで表示される復旧ダイアログは表示しないため、終了コード 1 で終了します。v2.1.222 より前は、読み取れない設定ファイルがある状態で `claude import` を実行すると対話セッションが開始され、その復旧ダイアログでファイルが処理されていました。
3325 3415
3326```text theme={null}3416```text theme={null}
3327Could not read Claude Code config — run `claude` with no arguments to recover it.3417Could not read Claude Code config — run `claude` with no arguments to recover it.
3328```3418```
3329 3419
3330**対処方法:**3420**対処方法:**
3331 3421
3332* 引数なしで `claude` を実行します。Claude Code が無効なファイルを検出し、リセットを提案します。その後、`claude import` を再実行します。3422* 引数なしで `claude` を実行します。Claude Code は無効なファイルを検出し、リセットを提案します。その後、再度 `claude import` を実行します。
3333* 手動で加えた編集を残したい場合は、代わりにエディターで `~/.claude.json` の JSON 構文を修正してから、`claude import` を再実行します3423* 手動で行った編集を残したい場合は、代わりにエディターで `~/.claude.json` の JSON 構文を修正してから、`claude import` を再実行します
3334 3424
3335<h3 id="could-not-import-a-server-from-claude-desktop">3425<h3 id="could-not-import-a-server-from-claude-desktop">
3336 Could not import a server from Claude Desktop3426 Could not import a server from Claude Desktop
3337</h3>3427</h3>
3338 3428
3339Claude Code は、`claude mcp add-from-claude-desktop` で選択したサーバーのいずれかを追加できませんでした。コマンドは選択された他のサーバーのインポートを続行し、追加できなかったサーバーごとに 1 行を出力します。v2.1.205 より前は、最初に失敗したサーバーでインポートが停止していました。3429`claude mcp add-from-claude-desktop` で選択したサーバーのうち 1 つを Claude Code が追加できませんでした。コマンドは選択された他のサーバーのインポートを続行し、追加できなかったサーバーごとに 1 行を出力します。v2.1.205 より前は、最初に失敗したサーバーでインポートが停止していました。
3340 3430
3341```text theme={null}3431```text theme={null}
3342Could not import my server: Invalid name my server. Names can only contain letters, numbers, hyphens, and underscores.3432Could not import my server: Invalid name my server. Names can only contain letters, numbers, hyphens, and underscores.
3343```3433```
3344 3434
3345サーバー名の後のテキストが理由です。最も一般的な理由は名前のチェックです。Claude Desktop ではサーバー名にスペースやピリオドなどの文字を使用できますが、`claude mcp` では英字、数字、ハイフン、アンダースコアに制限されています。その他の理由としては、サーバー設定の検証の失敗や、組織の [MCP ポリシー](/docs/ja/managed-mcp)によってブロックされたサーバーなどがあります。3435サーバー名の後のテキストが理由です。最も一般的なのは名前のチェックです。Claude Desktop ではサーバー名にスペースやピリオドなどの文字を使用できますが、`claude mcp` では英字、数字、ハイフン、アンダースコアに制限されています。その他の理由には、検証に失敗したサーバー設定や、組織の [MCP ポリシー](/docs/ja/managed-mcp)によってブロックされたサーバーなどがあります。
3346 3436
3347**対処方法:**3437**対処方法:**
3348 3438
3349* `claude_desktop_config.json` 内のサーバー名を英字、数字、ハイフン、アンダースコアのみを使用する名前に変更してから、`claude mcp add-from-claude-desktop` を再実行します3439* `claude_desktop_config.json` 内のサーバー名を英字、数字、ハイフン、アンダースコアのみを使用する名前に変更してから、再度 `claude mcp add-from-claude-desktop` を実行します
3350* 有効な名前で、`claude mcp add` または `claude mcp add-json` を使用してそのサーバーを直接追加します。[Claude Desktop から MCP サーバーをインポートする](/docs/ja/mcp#import-mcp-servers-from-claude-desktop)を参照してください。3440* `claude mcp add` または `claude mcp add-json` を使用して、有効な名前でそのサーバーを直接追加します。[Claude Desktop から MCP サーバーをインポートする](/docs/ja/mcp#import-mcp-servers-from-claude-desktop)を参照してください。
3351 3441
3352<h3 id="cannot-add-mcp-server-to-the-managed-scope">3442<h3 id="cannot-add-mcp-server-to-the-managed-scope">
3353 Cannot add MCP server to the managed scope3443 Cannot add MCP server to the managed scope
3354</h3>3444</h3>
3355 3445
3356`--scope managed` を付けて `claude mcp add` または `claude mcp add-json` を実行しました。このスコープには、組織が [`managedMcpServers`](/docs/ja/settings-reference#managedmcpservers) 管理設定を通じて提供するサーバーが含まれます。Claude Code はこれらを管理設定からのみ読み込むため、コマンドはそのスコープにサーバーを書き込めません。3446`--scope managed` を指定して `claude mcp add` または `claude mcp add-json` を実行しました。このスコープには、組織が [`managedMcpServers`](/docs/ja/settings-reference#managedmcpservers) 管理設定を通じて提供するサーバーが含まれます。Claude Code はこれらを管理設定からのみ読み込むため、コマンドはそのスコープにサーバーを書き込めません。
3357 3447
3358```text theme={null}3448```text theme={null}
3359Cannot add MCP server to scope: managed3449Cannot add MCP server to scope: managed
3360```3450```
3361 3451
3362**対処方法:**3452**対処方法:**
3363 3453
3364* 書き込み可能なスコープ(`local`、`user`、または `project`)にサーバーを追加します。`--scope` を指定しない場合、コマンドは `local` を使用します。[MCP のインストールスコープ](/docs/ja/mcp#mcp-installation-scopes)を参照してください3454* 書き込み可能なスコープ(`local`、`user`、`project`)にサーバーを追加します。`--scope` を指定しない場合、コマンドは `local` を使用します。[MCP のインストールスコープ](/docs/ja/mcp#mcp-installation-scopes)を参照してください
3365* 組織内のすべてのユーザーにサーバーを提供するには、デプロイする管理設定の [`managedMcpServers`](/docs/ja/settings-reference#managedmcpservers) にサーバーを追加します3455* 組織内のすべてのユーザーにサーバーを提供するには、デプロイする管理設定の [`managedMcpServers`](/docs/ja/settings-reference#managedmcpservers) に追加します
3366 3456
3367<h3 id="cannot-add-mcp-server-when-managed-settings-allow-only-plugin-servers">3457<h3 id="cannot-add-mcp-server-when-managed-settings-allow-only-plugin-servers">
3368 管理設定でプラグインのサーバーのみが許可されている場合に MCP サーバーを追加できない3458 Cannot add MCP server when managed settings allow only plugin servers
3369</h3>3459</h3>
3370 3460
3371組織の管理設定で [`strictPluginOnlyCustomization`](/docs/ja/settings-reference#strictpluginonlycustomization) が `true`、または `mcp` を含むリストに設定されている状態で、`claude mcp add` または `claude mcp add-json` を実行しました。この設定では、Claude Code は `~/.claude.json` や `.mcp.json` から MCP サーバーを読み込まないため、コマンドは決して読み込まれないサーバーを保存する代わりに、終了コード 1 で終了します:3461組織の管理設定で [`strictPluginOnlyCustomization`](/docs/ja/settings-reference#strictpluginonlycustomization) が `true` または `mcp` を含むリストに設定されている状態で、`claude mcp add` または `claude mcp add-json` を実行しました。この設定では、Claude Code は `~/.claude.json` や `.mcp.json` から MCP サーバーを読み込まないため、コマンドは決して読み込まれないサーバーを保存せずに終了コード 1 で終了します:
3372 3462
3373```text theme={null}3463```text theme={null}
3374Cannot add MCP server: your organization's managed settings allow only MCP servers that plugins provide. Install a plugin that provides this server, or ask your administrator to make it available.3464Cannot add MCP server: your organization's managed settings allow only MCP servers that plugins provide. Install a plugin that provides this server, or ask your administrator to make it available.
3375```3465```
3376 3466
3377`claude mcp add-from-claude-desktop` は、選択した各サーバーをインポートされなかったものとして報告し、その理由としてこのメッセージを表示します。[`/import`](/docs/ja/commands#all-commands) は、追加しようとした各 MCP サーバーについてこのメッセージを報告し、見つかった他の項目のインポートは続行します。3467`claude mcp add-from-claude-desktop` は、選択した各サーバーをインポートされなかったものとして報告し、その理由としてこのメッセージを示します。[`/import`](/docs/ja/commands#all-commands) は、追加しようとした各 MCP サーバーについてこのメッセージを報告し、見つかった他の項目はそのままインポートします。
3378 3468
3379v2.1.284 より前は、これらのコマンドはサーバーを保存して成功を報告していましたが、サーバーが読み込まれることはありませんでした。3469v2.1.284 より前は、これらのコマンドはサーバーを保存して成功を報告していましたが、サーバーは読み込まれませんでした。
3380 3470
3381**対処方法:**3471**対処方法:**
3382 3472
3383* サーバーを提供する[プラグイン](/docs/ja/plugins/install)をインストールします3473* サーバーを提供する[プラグイン](/docs/ja/plugins/install)をインストールします
3384* 管理者に、サーバーを[プラグイン](/docs/ja/plugins/org)で配布するか、リモート HTTP または SSE サーバーであれば [`managedMcpServers`](/docs/ja/settings-reference#managedmcpservers) を通じて提供するよう依頼します3474* 管理者に、サーバーを[プラグイン](/docs/ja/plugins/org)で配布するか、リモートの HTTP または SSE サーバーであれば [`managedMcpServers`](/docs/ja/settings-reference#managedmcpservers) を通じて提供するよう依頼します
3385 3475
3386<h3 id="cant-read-mcp-json">3476<h3 id="cant-read-mcp-json">
3387 Can't read .mcp.json3477 Can't read .mcp.json
3388</h3>3478</h3>
3389 3479
3390プロジェクトの [`.mcp.json`](/docs/ja/mcp#project-scope) を読み込むコマンド(`--scope project` を付けた `claude mcp add` や `claude mcp add-json`、または `claude mcp remove` など)が、現在のディレクトリにあるそのファイルが通常のファイルではないか、2 MiB を超えていることを検出したため、ファイルを読み込まずにこのエラーで終了します。3480`--scope project` を指定した `claude mcp add` や `claude mcp add-json`、または `claude mcp remove` など、プロジェクトの [`.mcp.json`](/docs/ja/mcp#project-scope) を読み込むコマンドが、現在のディレクトリにあるファイルが通常のファイルではないか 2 MiB を超えていることを検出したため、ファイルを読み込まずにこのエラーで終了します。
3391 3481
3392```text theme={null}3482```text theme={null}
3393Can't read .mcp.json: it isn't a regular file or is larger than 2097152 bytes. Fix or remove it, then run the command again.3483Can't read .mcp.json: it isn't a regular file or is larger than 2097152 bytes. Fix or remove it, then run the command again.
3394```3484```
3395 3485
3396v2.1.257 より前は、`.mcp.json` が FIFO の場合はコマンドが出力なしで永久に待機し、`/dev/zero` などのデバイスファイルへのシンボリックリンクの場合はプロセスが強制終了されるまでメモリが増加していました。3486v2.1.257 より前は、`.mcp.json` に FIFO があるとコマンドは出力なしで無期限に待機し、`/dev/zero` などのデバイスファイルへのシンボリックリンクがあるとプロセスが強制終了されるまでメモリが増加し続けていました。
3397 3487
3398**対処方法:**3488**対処方法:**
3399 3489
3400* 現在のディレクトリの `.mcp.json` にあるものを確認します。[プロジェクトスコープの形式](/docs/ja/mcp#project-scope)の通常の JSON ファイルに置き換えるか削除してから、コマンドを再実行します。3490* 現在のディレクトリの `.mcp.json` に何があるかを確認します。[プロジェクトスコープの形式](/docs/ja/mcp#project-scope)の通常の JSON ファイルに置き換えるか削除してから、コマンドを再度実行します。
3401 3491
3402<h3 id="mcp-server-was-not-saved-or-removed">3492<h3 id="mcp-server-was-not-saved-or-removed">
3403 MCP server was not saved or removed3493 MCP server was not saved or removed
3404</h3>3494</h3>
3405 3495
3406`user` または `local` [スコープ](/docs/ja/mcp#mcp-installation-scopes)のサーバーに対して `claude mcp add`、`claude mcp add-json`、または `claude mcp remove` を実行しました。どちらのスコープも `~/.claude.json` に保存されますが、書き込み後に Claude Code がそのファイルを読み直したときに、変更が反映されていませんでした。コマンドは成功を示す行の代わりにこのエラーで終了します。3496`user` または `local` [スコープ](/docs/ja/mcp#mcp-installation-scopes)のサーバーに対して `claude mcp add`、`claude mcp add-json`、または `claude mcp remove` を実行しました。どちらのスコープも `~/.claude.json` に保存されますが、書き込み後に Claude Code がファイルを読み戻したときに、変更がファイルに反映されていませんでした。コマンドは成功の行の代わりにこのエラーで終了します。
3407 3497
3408```text theme={null}3498```text theme={null}
3409MCP server "example" was not saved to /home/user/.claude.json. If that file is read-only or protected by a sandbox, make it writable or run the command outside the sandbox, then add the server again.3499MCP server "example" was not saved to /home/user/.claude.json. If that file is read-only or protected by a sandbox, make it writable or run the command outside the sandbox, then add the server again.
3410```3500```
3411 3501
3412削除の後は、メッセージが `was not removed from` となり、`then remove the server again` で終わります。`local` スコープのサーバーの場合、パスの後にエントリが属するプロジェクトディレクトリが `(local scope for /path/to/project)` の形式で続きます。3502削除の場合、メッセージは `was not removed from` となり、`then remove the server again` で終わります。`local` スコープのサーバーの場合、パスの後にエントリが属するプロジェクトディレクトリが `(local scope for /path/to/project)` として示されます。
3413 3503
3414v2.1.283 より前は、変更がファイルに反映されなかった場合でも、`claude mcp add`、`claude mcp add-json`、`claude mcp remove` は成功を報告していました。3504v2.1.283 より前は、変更がファイルに反映されなかった場合でも、`claude mcp add`、`claude mcp add-json`、`claude mcp remove` は成功を報告していました。
3415 3505
3416**対処方法:**3506**対処方法:**
3417 3507
3418* メッセージに示されたファイルを書き込み可能にするか、サンドボックスの外でコマンドを実行してから、同じ追加または削除のコマンドを再実行します。3508* メッセージに示されたファイルを書き込み可能にするか、サンドボックスの外でコマンドを実行してから、同じ追加または削除コマンドを再度実行します。
3419 3509
3420<h3 id="mcp-server-may-not-have-been-saved-or-removed">3510<h3 id="mcp-server-may-not-have-been-saved-or-removed">
3421 MCP server may not have been saved or removed3511 MCP server may not have been saved or removed
3422</h3>3512</h3>
3423 3513
3424`user` または `local` [スコープ](/docs/ja/mcp#mcp-installation-scopes)のサーバーに対して `claude mcp add`、`claude mcp add-json`、または `claude mcp remove` を実行しましたが、Claude Code が変更を確認するために `~/.claude.json` を読み直せませんでした。変更はディスクに反映されている場合もあれば、されていない場合もあります。括弧内のテキストは、その読み込み時のエラーです。3514`user` または `local` [スコープ](/docs/ja/mcp#mcp-installation-scopes)のサーバーに対して `claude mcp add`、`claude mcp add-json`、または `claude mcp remove` を実行しましたが、Claude Code は変更を確認するために `~/.claude.json` を読み戻せませんでした。変更がディスクに反映されているかどうかは不明です。括弧内のテキストは、その読み取りのエラーです。
3425 3515
3426```text theme={null}3516```text theme={null}
3427MCP server "example" may not have been saved: /home/user/.claude.json could not be read to confirm the change (EACCES: permission denied, open '/home/user/.claude.json'). Run `claude mcp get example` to check, then add the server again if it is missing.3517MCP server "example" may not have been saved: /home/user/.claude.json could not be read to confirm the change (EACCES: permission denied, open '/home/user/.claude.json'). Run `claude mcp get example` to check, then add the server again if it is missing.
3428```3518```
3429 3519
3430削除の後は、メッセージが `may not have been removed` となり、`then remove the server again if it is still listed` で終わります。3520削除の場合、メッセージは `may not have been removed` となり、`then remove the server again if it is still listed` で終わります。
3431 3521
3432v2.1.283 より前は、変更を確認できなかった場合でも、これらのコマンドは成功を報告していました。3522v2.1.283 より前は、変更を確認できなかった場合でも、コマンドは成功を報告していました。
3433 3523
3434**対処方法:**3524**対処方法:**
3435 3525
3436* `claude mcp get <name>` を実行して、変更がディスクに反映されているかを確認します。`local` スコープのサーバーの場合は、ローカルスコープがプロジェクトごとであるため、サーバーが属するプロジェクトディレクトリから実行します。3526* `claude mcp get <name>` を実行して、変更がディスクに反映されているかを確認します。`local` スコープのサーバーの場合、ローカルスコープはプロジェクトごとであるため、サーバーが属するプロジェクトディレクトリから実行します。
3437* 追加の後にサーバーが存在しない場合、または削除の後にまだ一覧に表示される場合は、同じ追加または削除のコマンドを再実行します。3527* 追加後にサーバーが見つからない場合、または削除後もまだ一覧に表示される場合は、同じ追加または削除コマンドを再度実行します。
3438 3528
3439<h3 id="anthropic-hosted-and-doesnt-support-local-oauth">3529<h3 id="anthropic-hosted-and-doesnt-support-local-oauth">
3440 Server is Anthropic-hosted and doesn't support local OAuth3530 Server is Anthropic-hosted and doesn't support local OAuth
3441</h3>3531</h3>
3442 3532
3443URL が、サードパーティの ID プロバイダーを通じて認証する Anthropic ホストのコネクタホストを指している MCP サーバーに対してサインインを開始しました。これらのホストには `microsoft365.mcp.claude.com`、`gmail.mcp.claude.com`、`gcal.mcp.claude.com` が含まれます。[これらのサインインは claude.ai を通じてのみ機能する](/docs/ja/mcp#use-mcp-servers-from-claude-ai)ため、Claude Code は `/mcp` パネルからも `claude mcp login` からも、これらのホストに対するローカルの OAuth フローの開始を拒否します。3533サードパーティの ID プロバイダーを通じて認証する、Anthropic がホストするコネクタのホストを URL が指している MCP サーバーに対して、サインインを開始しました。これらのホストには `microsoft365.mcp.claude.com`、`gmail.mcp.claude.com`、`gcal.mcp.claude.com` が含まれます。[これらのサインインは claude.ai を通じてのみ機能する](/docs/ja/mcp#use-mcp-servers-from-claude-ai)ため、Claude Code は `/mcp` パネルと `claude mcp login` のどちらからも、これらのホストに対するローカル OAuth フローの開始を拒否します。
3444 3534
3445```text theme={null}3535```text theme={null}
3446"gmail" is Anthropic-hosted and doesn't support local OAuth. Connect it via Settings → Connectors on claude.ai (requires `claude login`), then it'll be available here automatically.3536"gmail" is Anthropic-hosted and doesn't support local OAuth. Connect it via Settings → Connectors on claude.ai (requires `claude login`), then it'll be available here automatically.
3447```3537```
3448 3538
3449**対処方法:**3539**対処方法:**
3450 3540
3451* 同じ URL の claude.ai コネクタが隠れないように、`claude mcp remove <name>` でエントリを削除します3541* `claude mcp remove <name>` でエントリを削除し、同じ URL の claude.ai コネクタが隠されないようにします
3452* 削除した後、Claude Code で使用しているアカウントにサインインした状態で、[claude.ai/customize/connectors](https://claude.ai/customize/connectors) でサービスを接続します。接続後、アクティブな認証方法が claude.ai のサブスクリプションログインであれば、[コネクタは Claude Code に自動的に表示されます](/docs/ja/mcp#use-mcp-servers-from-claude-ai)3542* 削除後、Claude Code で使用しているアカウントにサインインした状態で、[claude.ai/customize/connectors](https://claude.ai/customize/connectors) でサービスを接続します。接続すると、アクティブな認証方法が claude.ai サブスクリプションのログインであれば、[コネクタが Claude Code に自動的に表示されます](/docs/ja/mcp#use-mcp-servers-from-claude-ai)
3453 3543
3454<h3 id="server-rejected-the-authorization-header-minted-by-the-configured-headershelper">3544<h3 id="server-rejected-the-authorization-header-minted-by-the-configured-headershelper">
3455 Server rejected the Authorization header minted by the configured headersHelper3545 Server rejected the Authorization header minted by the configured headersHelper
3456</h3>3546</h3>
3457 3547
3458[`headersHelper`](/docs/ja/mcp#use-dynamic-headers-for-custom-authentication) が `Authorization` ヘッダーを提供する MCP サーバーが HTTP 401 または 403 で接続に応答したため、Claude Code は接続を失敗として報告します。ヘルパーが `Authorization` ヘッダーを提供するため、Claude Code はそのサーバーについて [OAuth にフォールバックしません](/docs/ja/mcp#authenticate-with-remote-mcp-servers):3548[`headersHelper`](/docs/ja/mcp#use-dynamic-headers-for-custom-authentication) が `Authorization` ヘッダーを提供する MCP サーバーが接続に対して HTTP 401 または 403 を返したため、Claude Code は接続を失敗として報告します。ヘルパーが `Authorization` ヘッダーを提供しているため、Claude Code はそのサーバーに対して [OAuth にフォールバックしません](/docs/ja/mcp#authenticate-with-remote-mcp-servers):
3459 3549
3460```text theme={null}3550```text theme={null}
3461Server rejected the Authorization header minted by the configured headersHelper (HTTP 401). Check that the helper command returns a valid credential for this MCP endpoint — OAuth fallback is disabled when the helper supplies Authorization.3551Server rejected the Authorization header minted by the configured headersHelper (HTTP 401). Check that the helper command returns a valid credential for this MCP endpoint — OAuth fallback is disabled when the helper supplies Authorization.
3462```3552```
3463 3553
3464Claude Code は接続を試みるたびにヘルパーを再実行するため、トークンのローテーションの競合など一時的な拒否の後であれば、再試行によって新しい認証情報で成功することがあります。3554Claude Code は接続を試みるたびにヘルパーを再実行するため、トークンのローテーションの競合など、一時的な拒否の後の再試行では、新しい認証情報で成功する場合があります。
3465 3555
3466**対処方法:**3556**対処方法:**
3467 3557
3468* Claude Code が実行するのと同じ方法で、`headersHelper` コマンドを自分で実行します。つまり、[Claude Code がヘルパーを実行するディレクトリ](/docs/ja/mcp#where-the-helper-runs)から、[Claude Code がヘルパー用に設定する環境変数](/docs/ja/mcp#use-dynamic-headers-for-custom-authentication)を付け、プロジェクトの `.mcp.json`、プラグイン、またはプロジェクトのエージェントファイルのサーバーの場合は[Claude Code が削除する認証情報の変数](/docs/ja/mcp#which-variables-a-helper-can-read)を除いて実行します。サーバーのエンドポイントが受け付ける `Authorization` の値が出力されることを確認してください3558* Claude Code と同じ方法で `headersHelper` コマンドを自分で実行します。つまり、[Claude Code がヘルパーを実行するディレクトリ](/docs/ja/mcp#where-the-helper-runs)から、[Claude Code がヘルパー用に設定する環境変数](/docs/ja/mcp#use-dynamic-headers-for-custom-authentication)を使用し、プロジェクトの `.mcp.json`、プラグイン、またはプロジェクトのエージェントファイルに由来するサーバーの場合は [Claude Code が削除する認証情報の変数](/docs/ja/mcp#which-variables-a-helper-can-read)を除いた状態で実行します。サーバーのエンドポイントが受け付ける `Authorization` の値が出力されることを確認します
3469* ヘルパーまたはその認証情報のソースを修正した後、`/mcp` でサーバーを選択し、**Reconnect** を選択します3559* ヘルパーまたはその認証情報のソースを修正した後、`/mcp` でサーバーを選択して **Reconnect** を選択します
3470 3560
3471v2.1.248 より前は、ヘルパーが `Authorization` ヘッダーを提供するサーバーに対しても Claude Code は OAuth の検出を実行していました。その検出は、拒否された認証情報を報告する代わりに、`Incompatible auth server: does not support dynamic client registration` で失敗することがありました。3561v2.1.248 より前は、ヘルパーが `Authorization` ヘッダーを提供するサーバーに対しても、Claude Code は OAuth ディスカバリーを実行していました。このディスカバリーは、拒否された認証情報を報告する代わりに、`Incompatible auth server: does not support dynamic client registration` で失敗することがありました。
3472 3562
3473<h3 id="mcp-permission-prompt-tool-not-found">3563<h3 id="mcp-permission-prompt-tool-not-found">
3474 MCP permission prompt tool not found3564 MCP permission prompt tool not found
3475</h3>3565</h3>
3476 3566
3477[`--permission-prompt-tool`](/docs/ja/cli-reference#cli-flags) に渡したツールが、実行で初めて権限の判断が必要になった時点で、接続済みの MCP ツールの中にありませんでした。そのサーバーが接続しなかったか、接続済みのどのサーバーもその名前のツールを公開していないためです。Claude Code はそれでもプロンプトを送信します。[非対話](/docs/ja/headless)の実行は最初のツール呼び出しでこのエラーと終了コード 1 で終了するため、リクエストは行われたものの回答は生成されません。最初のプロンプトの前に、Claude Code はそのサーバーが接続するまで、[`MCP_TIMEOUT`](/docs/ja/env-vars) で設定されるサーバーごとの接続タイムアウト(30 秒)まで待機します。v2.1.206 より前は、起動時にサーバーの接続完了を待たなかったため、起動が遅いものの正常なサーバーでもこのエラーが発生していました。3567[`--permission-prompt-tool`](/docs/ja/cli-reference#cli-flags) に渡したツールが、実行で最初に権限の判断が必要になった時点で、接続済みの MCP ツールの中にありませんでした。原因は、そのサーバーが接続されなかったか、接続済みのサーバーがその名前のツールを公開していないかのいずれかです。Claude Code はプロンプトを送信しますが、[非対話](/docs/ja/headless)の実行は最初のツール呼び出しの時点でこのエラーと終了コード 1 で終了するため、リクエストは送信されたものの回答は生成されません。最初のプロンプトの前に、Claude Code はそのサーバーが接続されるまで、[`MCP_TIMEOUT`](/docs/ja/env-vars) で設定されたサーバーごとの接続タイムアウト(30 秒)まで待機します。v2.1.206 より前は、起動時にサーバーの接続完了を待たなかったため、起動に時間がかかるものの正常なサーバーでもこのエラーが発生していました。
3478 3568
3479```text theme={null}3569```text theme={null}
3480Error: MCP tool mcp__permissions__approve (passed via --permission-prompt-tool) not found. Available MCP tools: none3570Error: MCP tool mcp__permissions__approve (passed via --permission-prompt-tool) not found. Available MCP tools: none
3481```3571```
3482 3572
3483`Available MCP tools:` の後の一覧は、接続されていた MCP ツールを示します。3573`Available MCP tools:` の後のリストには、接続されていた MCP ツールが示されます。
3484 3574
3485**対処方法:**3575**対処方法:**
3486 3576
3487* サーバーが起動し、接続を維持していることを確認します。同じディレクトリで `claude mcp list` を実行し、サーバーが接続済みとして一覧に表示されることを確認してください3577* サーバーが起動して接続を維持していることを確認します。同じディレクトリで `claude mcp list` を実行し、サーバーが接続済みとして表示されることを確認します
3488* ツール名が、サーバーが公開する `mcp__<server>__<tool>` の名前と一致することを確認します3578* ツール名が、サーバーが公開する `mcp__<server>__<tool>` の名前と一致することを確認します
3489* サーバーの起動に 30 秒より長くかかる場合は、[`MCP_TIMEOUT`](/docs/ja/env-vars) の値を引き上げます3579* サーバーの起動に 30 秒以上かかる場合は、[`MCP_TIMEOUT`](/docs/ja/env-vars) を増やします
3490 3580
3491<h3 id="oauth-callback-port-is-already-in-use">3581<h3 id="oauth-callback-port-is-already-in-use">
3492 OAuth callback port is already in use3582 OAuth callback port is already in use
3493</h3>3583</h3>
3494 3584
3495OAuth でリモート MCP サーバーにサインインすると、Claude Code はサインインのコールバックを受け取るためのローカルリスナーを起動します。そのリスナーが必要とするポートを別のプロセスが保持している場合、サインインはこのメッセージで失敗します。これは主に、[`MCP_OAUTH_CALLBACK_PORT`](/docs/ja/env-vars) 変数または `--callback-port` で[固定のコールバックポート](/docs/ja/mcp#use-a-fixed-oauth-callback-port)を設定している場合に発生します。固定ポートを設定しない場合、Claude Code は利用可能なポートを選ぶためです。3585OAuth でリモート MCP サーバーにサインインすると、Claude Code はサインインのコールバックを受け取るためのローカルリスナーを起動します。リスナーが必要とするポートを別のプロセスが使用している場合、サインインはこのメッセージで失敗します。これは主に、[`MCP_OAUTH_CALLBACK_PORT`](/docs/ja/env-vars) 変数または `--callback-port` で[固定のコールバックポート](/docs/ja/mcp#use-a-fixed-oauth-callback-port)を設定している場合に発生します。固定ポートがない場合、Claude Code は利用可能なポートを選択するためです。
3496 3586
3497```text theme={null}3587```text theme={null}
3498OAuth callback port <port> is already in use — another process may be holding it. Run `lsof -ti:<port> -sTCP:LISTEN` to find it.3588OAuth callback port <port> is already in use — another process may be holding it. Run `lsof -ti:<port> -sTCP:LISTEN` to find it.
3500 3590
3501Windows では、代わりに `netstat -ano | findstr :<port>` が提案されます。3591Windows では、代わりに `netstat -ano | findstr :<port>` が提案されます。
3502 3592
3503**対処方法:**3593**対処方法:**
3504 3594
3505* メッセージのコマンドを実行してポートを保持しているプロセスを特定し、そのプロセスを停止するか、終了するまで待ちます3595* メッセージのコマンドを実行してポートを使用しているプロセスを特定し、停止するか終了を待ちます
3506* 別のプログラムがそのポートを常に必要とする場合は、サーバーに別のリダイレクト URI を登録し、使用している方法に応じて `MCP_OAUTH_CALLBACK_PORT` または `--callback-port` でそのポートを設定します3596* 別のプログラムがそのポートを常に必要とする場合は、サーバーに別のリダイレクト URI を登録し、使用している方法に応じて `MCP_OAUTH_CALLBACK_PORT` または `--callback-port` でそのポートを設定します
3507* その後、たとえば `/mcp` でサーバーを選択して、サインインを再度開始します3597* その後、`/mcp` でサーバーを選択するなどして、再度サインインを開始します
3508 3598
3509<h3 id="no-available-ports-for-oauth-redirect">3599<h3 id="no-available-ports-for-oauth-redirect">
3510 No available ports for OAuth redirect3600 No available ports for OAuth redirect
3511</h3>3601</h3>
3512 3602
3513[OAuth](/docs/ja/mcp#authenticate-with-remote-mcp-servers) でリモート MCP サーバーにサインインすると、Claude Code はサインインのコールバックを受け取るためのローカルリスナーを起動します。そのためのローカルポートを Claude Code がバインドできない場合、サインインはこのメッセージで失敗します。セキュリティソフトウェアや、ローカルリスナーを拒否するサンドボックスポリシーなど、マシン上の何かが `127.0.0.1` での待ち受けを妨げています。3603[OAuth](/docs/ja/mcp#authenticate-with-remote-mcp-servers) でリモート MCP サーバーにサインインすると、Claude Code はサインインのコールバックを受け取るためのローカルリスナーを起動します。Claude Code がそのためのローカルポートをバインドできない場合、サインインはこのメッセージで失敗します。セキュリティソフトウェアやローカルリスナーを拒否するサンドボックスポリシーなど、マシン上の何かが `127.0.0.1` でのリッスンを妨げています。
3514 3604
3515```text theme={null}3605```text theme={null}
3516No available ports for OAuth redirect3606No available ports for OAuth redirect
3517```3607```
3518 3608
3519v2.1.268 より前は、Claude Code はオペレーティングシステムが割り当てるポートにフォールバックしなかったため、自身で選んだポートだけをバインドできない場合にもこのメッセージが表示されていました。これは、Hyper-V が Claude Code の選択対象となるポートを含む範囲を予約している Windows ホストで発生することがあります。3609v2.1.268 より前は、Claude Code はオペレーティングシステムが割り当てるポートにフォールバックしなかったため、自身で選択したポートをバインドできない場合にもこのメッセージが表示されていました。これは、Hyper-V が Claude Code の選択対象のポートを含むポート範囲を予約している Windows ホストで発生することがあります。
3520 3610
3521**対処方法:**3611**対処方法:**
3522 3612
3523* セキュリティソフトウェアまたはサンドボックスポリシーが、プロセスによる `127.0.0.1` での待ち受けをブロックしていないかを確認し、Claude Code がローカルポートをバインドできるように許可します3613* セキュリティソフトウェアやサンドボックスポリシーがプロセスによる `127.0.0.1` でのリッスンをブロックしていないかを確認し、Claude Code がローカルポートをバインドできるようにします
3524* その後、たとえば `/mcp` でサーバーを選択して、サインインを再度開始します3614* その後、`/mcp` でサーバーを選択するなどして、再度サインインを開始します
3525 3615
3526<h3 id="security-review-fails-without-origin-head">3616<h3 id="security-review-fails-without-origin-head">
3527 origin/HEAD がない場合に /security-review が失敗する3617 origin/HEAD がないと /security-review が失敗する
3528</h3>3618</h3>
3529 3619
3530[`/security-review`](/docs/ja/commands#all-commands) は、ブランチと `origin/HEAD`(`origin` リモートでどのブランチがデフォルトかを記録するローカル参照)との差分を取ることで、レビューのコンテキストを構築します。その参照が存在しない場合、差分を収集する git コマンドが失敗し、レビューは開始前に停止します。3620[`/security-review`](/docs/ja/commands#all-commands) は、ブランチと `origin/HEAD` の差分を取ってレビューのコンテキストを構築します。`origin/HEAD` は、`origin` リモートでどのブランチがデフォルトかを記録するローカル参照です。この参照が存在しない場合、差分を収集する git コマンドが失敗し、レビューは開始前に停止します。
3531 3621
3532```text theme={null}3622```text theme={null}
3533Error: Shell command failed for pattern "!`git diff --name-only origin/HEAD...`": [stderr]3623Error: Shell command failed for pattern "!`git diff --name-only origin/HEAD...`": [stderr]
3536'git <command> [<revision>...] -- [<file>...]'3626'git <command> [<revision>...] -- [<file>...]'
3537```3627```
3538 3628
3539メッセージには、代わりに `git log` や別の `git diff` が引用されている場合もあります。Git が `origin/HEAD` を作成するのは、リモートがデフォルトブランチを通知し、フェッチの refspec がそれを含む場合だけです。コミットのあるリモートを完全に `git clone` した場合はこれに該当します。次のような構成では、参照が存在しません:3629メッセージには、代わりに `git log` や別の `git diff` が引用されている場合があります。Git が `origin/HEAD` を作成するのは、リモートがデフォルトブランチを通知し、かつフェッチの refspec がそれをカバーしている場合のみです。コミットがあるリモートの完全な `git clone` はこれに該当します。次の構成ではこの参照が存在しません:
3540 3630
3541* 単一ブランチのチェックアウトや CI のチェックアウト。フェッチする refspec が狭すぎます3631* 狭すぎる refspec をフェッチする、単一ブランチまたは CI のチェックアウト
3542* サーバー側の HEAD が、誰もプッシュしていないブランチを指しているリモート3632* サーバー側の HEAD が誰もプッシュしていないブランチを指しているリモート
3543* `origin` リモートがないリポジトリ、または一度もフェッチしていないリポジトリ3633* `origin` リモートがない、または一度もフェッチしていないリポジトリ
3544 3634
3545Claude Code は、[動的コンテキストを挿入する](/docs/ja/skills#when-an-injected-command-fails)すべてのスキルで同じエラーを表示し、挿入されたコマンドが失敗するとそのスキルの呼び出しは中止されます。コマンドが実行される前に発生する、関連する 2 つの文字列があります:3635Claude Code は、[動的コンテキストを挿入する](/docs/ja/skills#when-an-injected-command-fails)すべてのスキルで同じエラーを表示し、挿入されたコマンドが失敗するとそのスキルの呼び出しは中止されます。
3546 3636
3547* `Shell command permission check failed for pattern "..."`: コマンドの権限チェックで許可されませんでした。[挿入されたコマンドの権限チェック](/docs/ja/skills#permission-checks-on-injected-commands)では、各権限モードでどの結果によって中止されるか、および `allowed-tools` でコマンドを事前承認する方法を説明しています3637関連するメッセージは、コマンドが実行される前に発生します:
3548* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``: スキルのフロントマターが、bash のないマシンで bash を要求しています。Git for Windows をインストールするか、フロントマターを `shell: powershell` に変更してください。[挿入されたコマンドの実行方法](/docs/ja/skills#how-injected-commands-run)を参照してください
3549 3638
3550**対処方法:**3639* `Shell command permission check failed for pattern "..."`: コマンドの権限チェックで許可されませんでした。[挿入されたコマンドの権限チェック](/docs/ja/skills#permission-checks-on-injected-commands)では、各権限モードでどの結果が中止につながるか、および `allowed-tools` でコマンドを事前承認する方法を説明しています
3640* ``Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found``: スキルのフロントマターが、bash のないマシンで bash を要求しています。Git for Windows をインストールするか、フロントマターを `shell: powershell` に変更します。[挿入されたコマンドの実行方法](/docs/ja/skills#how-injected-commands-run)を参照してください
3641* `No shell command in <name> was run`: ファイルの `!` コマンドのいずれかに、タブと改行以外の生の制御文字が含まれているため、いずれも実行されません。[文字を見つけて削除する方法](#no-shell-command-was-run)を参照してください
3642
3643**対処方法:**
3644
3645* リモートのデフォルトブランチを指定して参照を作成します:`git remote set-head origin <default-branch>`。これは、ローカルの追跡参照 `origin/<default-branch>` が存在すれば機能します。単一ブランチのクローンのように存在しない場合は、まずブランチをフェッチします。`git remote set-branches --add origin <branch>` を実行し、次に `git fetch origin` を実行してから、set-head コマンドを再実行します。その後、`/security-review` を再実行します。
3646* ブランチを指定したくない場合は、`git fetch origin` を実行してから `git remote set-head origin --auto` を実行します。これにより、どのブランチがデフォルトかをリモートに問い合わせます。リモートが空である、またはその HEAD が誰もプッシュしていないブランチを指しているためにデフォルトブランチを通知しない場合は、`error: Cannot determine remote HEAD` で失敗します。その場合は代わりにブランチを明示的に指定します。クローンがそのブランチをフェッチしない場合は `error: Not a valid ref` で失敗します。その場合は、まず上記のように refspec を広げます。
3647* リポジトリにリモートがない場合は、`git remote add origin <url>` でリモートを追加し、参照を作成する前にフェッチします。リモートが空の場合は、まず `git push -u origin HEAD` でブランチをプッシュし、set-head コマンドでそのブランチを指定します。これにより `origin/HEAD` はプッシュしたばかりのブランチを指すため、ブランチがそこから分岐するまで `/security-review` には空の差分が表示されます。
3648
3649<h3 id="no-shell-command-was-run">
3650 No shell command in a skill or command was run
3651</h3>
3652
3653スキルまたはカスタムコマンドファイル内の `` !`<command>` `` [動的コンテキストコマンド](/docs/ja/skills#inject-dynamic-context)のいずれかに、タブや改行以外の生の制御文字が含まれています。Claude Code は、ファイル内のどのコマンドも実行する前に、呼び出し全体を拒否します。
3551 3654
3552* リモートのデフォルトブランチを指定して参照を作成します: `git remote set-head origin <default-branch>`。これは、ローカルの追跡参照 `origin/<default-branch>` が存在する場合に機能します。単一ブランチのクローンのように存在しない場合は、まずブランチをフェッチします。`git remote set-branches --add origin <branch>` を実行し、次に `git fetch origin` を実行してから、set-head コマンドを再実行します。その後、`/security-review` を再実行します。3655メッセージには、コマンドを実行するはずだったシェルツール(Bash または PowerShell)が示され、拒否されたコマンドで終わります。該当する各文字は `�` に置き換えられるため、場所を確認できます:
3553* ブランチを指定したくない場合は、`git fetch origin` を実行してから `git remote set-head origin --auto` を実行します。これはリモートにデフォルトブランチを問い合わせます。リモートが空であるか、HEAD が誰もプッシュしていないブランチを指しているためにデフォルトブランチを通知しない場合は、`error: Cannot determine remote HEAD` で失敗します。その場合は代わりにブランチを明示的に指定してください。クローンがそのブランチをフェッチしない場合は `error: Not a valid ref` で失敗します。まず上記のとおり refspec を広げてください。3656
3554* リポジトリにリモートがない場合は、`git remote add origin <url>` でリモートを追加し、フェッチしてから参照を作成します。リモートが空の場合は、まず `git push -u origin HEAD` でブランチをプッシュし、set-head コマンドでそのブランチを指定します。すると `origin/HEAD` はプッシュしたばかりのブランチを指すため、ブランチがそこから分岐するまで `/security-review` には空の差分が表示されます。3657```text theme={null}
3658No shell command in /my-skill was run, because the Bash tool does not accept one of them: command contains control characters that would be hidden in the approval dialog. Unprintable characters are shown as � below: remove them from the skill or command file, or from the arguments or options substituted into it.
3659build.sh --target�dist
3660```
3661
3662**対処方法:**
3663
3664* メッセージの末尾に引用されたコマンド内の各 `�` を探します。それが表す文字を、スキルまたはコマンドファイル、あるいはファイルに代入される引数やオプションから削除します。
3555 3665
3556<h3 id="input-must-be-provided-when-using-print">3666<h3 id="input-must-be-provided-when-using-print">
3557 Input must be provided when using `--print`3667 Input must be provided when using `--print`
3558</h3>3668</h3>
3559 3669
3560引数なしの `claude` で対話 UI を開始するには、stdout がターミナルである必要があります。stdout がリダイレクトされている場合や、PowerShell ISE や一部の IDE の出力ペインのようにコンソールが本物のターミナルではない場合、`claude` は代わりに[非対話](/docs/ja/headless)で実行されます。これは `claude -p` と同じモードで、プロンプトが必要です。そのため、フラグを渡していなくてもメッセージには `--print` が示されます。プロンプトなしで、stdin にも何もパイプせずに `-p`/`--print` を渡した場合も、どこであっても同じエラーが発生します。3670引数なしの `claude` では、対話 UI を開始するために stdout がターミナルである必要があります。stdout がリダイレクトされている場合や、PowerShell ISE や一部の IDE の出力ペインのようにコンソールが実際のターミナルではない場合、`claude` は代わりに[非対話](/docs/ja/headless)で実行されます。これは `claude -p` と同じモードであり、プロンプトが必要なため、フラグを渡していなくてもメッセージには `--print` が示されます。プロンプトなしで、stdin にも何もパイプせずに `-p`/`--print` を渡した場合も、どこでも同じエラーが発生します。
3561 3671
3562```text theme={null}3672```text theme={null}
3563Error: Input must be provided either through stdin or as a prompt argument when using --print3673Error: Input must be provided either through stdin or as a prompt argument when using --print
3564```3674```
3565 3675
3566**対処方法:**3676**対処方法:**
3567 3677
3568* 対話的に使用する場合は、本物のターミナルで `claude` を実行します。ISE ではなく Windows Terminal または PowerShell コンソールを、出力ペインではなく IDE の統合ターミナルを使用してください3678* 対話的に使用する場合は、実際のターミナルで `claude` を実行します。ISE ではなく Windows Terminal または PowerShell コンソール、出力ペインではなく IDE の統合ターミナルを使用します
3569* 単発で使用する場合は、プロンプトを渡します: `claude -p "your question"`、または `echo "your question" | claude -p` でパイプします3679* 単発で使用する場合は、プロンプトを渡します:`claude -p "your question"`、またはパイプで `echo "your question" | claude -p`
3570 3680
3571<h3 id="claude-code-cant-read-the-keyboard-here">3681<h3 id="claude-code-cant-read-the-keyboard-here">
3572 Claude Code can't read the keyboard here3682 Claude Code can't read the keyboard here
3573</h3>3683</h3>
3574 3684
3575[`-p`](/docs/ja/headless) を付けずに `claude` を実行したため[対話セッション](/docs/ja/interactive-mode)が開始されますが、その標準入力がターミナルではありません。何かがパイプまたはリダイレクトしているか、`claude` を起動したプログラムが独自の入力ストリームを提供しています。3685[`-p`](/docs/ja/headless) を付けずに `claude` を実行して[対話セッション](/docs/ja/interactive-mode)を開始しましたが、その標準入力がターミナルではありません。何かがパイプまたはリダイレクトしているか、`claude` を起動したプログラムが独自の入力ストリームを提供しています。
3576 3686
3577対話セッションではキー入力を読み取るためのターミナルが必要であり、ターミナルがない場合の Claude Code の動作はプラットフォームによって異なります:3687対話セッションにはキー入力を読み取るためのターミナルが必要で、ターミナルがない場合の Claude Code の動作はプラットフォームによって異なります:
3578 3688
3579* **Windows**: Claude Code はインターフェースを開始せず、メッセージを stderr に出力して終了コード 1 で終了します3689* **Windows**:Claude Code はインターフェースを開始せずに、メッセージを stderr に出力して終了コード 1 で終了します
3580* **macOS と Linux**: Claude Code は `/dev/tty` からキー入力を読み取ってセッションを開始し、パイプされたテキストがあれば最初のプロンプトとして使用します。`/dev/tty` を開けない場合にメッセージが表示され、その 1 行目では Windows の文言の代わりに `/dev/tty` が示されます。3690* **macOS と Linux**:Claude Code は `/dev/tty` からキー入力を読み取ってセッションを開始し、パイプされたテキストがあれば最初のプロンプトとして使用します。このメッセージは `/dev/tty` を開けない場合に表示され、その 1 行目には Windows の文言の代わりに `/dev/tty` が示されます。
3581 3691
3582Windows では、メッセージは次のようになります:3692Windows では、メッセージは次のとおりです:
3583 3693
3584```text theme={null}3694```text theme={null}
3585Claude Code can't read the keyboard here: stdin is not a terminal (it is piped, redirected, or supplied by the program that launched claude), and on Windows it can't fall back to the console for input yet.3695Claude Code can't read the keyboard here: stdin is not a terminal (it is piped, redirected, or supplied by the program that launched claude), and on Windows it can't fall back to the console for input yet.
3587To send text as a prompt and print the reply instead, add -p; it also works with --continue and --resume <session-id> (for example: type notes.md | claude -p --continue).3697To send text as a prompt and print the reply instead, add -p; it also works with --continue and --resume <session-id> (for example: type notes.md | claude -p --continue).
3588```3698```
3589 3699
3590**対処方法:**3700**対処方法:**
3591 3701
3592* 対話的に作業するには、入力をパイプまたはリダイレクトせずに、ターミナルで直接 `claude` を実行します3702* 対話的に作業するには、入力をパイプまたはリダイレクトせずに、ターミナルで直接 `claude` を実行します
3593* スクリプトからなど、対話インターフェースなしで応答を得るには、`-p` を追加し、`claude -p "your question"` や `echo "your question" | claude -p` のように、プロンプトを引数または stdin で渡します。`--continue` や `--resume <session-id>` でも同じように機能します。3703* スクリプトからなど、対話インターフェースなしで返答を得るには、`-p` を追加し、`claude -p "your question"` や `echo "your question" | claude -p` のように、プロンプトを引数または stdin で渡します。`--continue` や `--resume <session-id>` でも同様に機能します。
3594 3704
3595v2.1.287 より前は、Claude Code はこのメッセージを出力する代わりにインターフェースを開始し、画面に何も表示しないか、`Raw mode is not supported` を含むエラーで失敗していました。3705v2.1.287 より前は、Claude Code はこのメッセージを出力する代わりにインターフェースを開始し、画面に何も表示しないか、`Raw mode is not supported` を含むエラーで失敗していました。
3596 3706
3597代わりに `claude install` の実行中に `Raw mode is not supported` が表示される場合は、[インストール中の `Raw mode is not supported`](/docs/ja/troubleshoot-install#raw-mode-is-not-supported-during-install) を参照してください。3707代わりに `claude install` 中に `Raw mode is not supported` が表示される場合は、[インストール中の `Raw mode is not supported`](/docs/ja/troubleshoot-install#raw-mode-is-not-supported-during-install) を参照してください。
3598 3708
3599<h3 id="input-contained-only-whitespace">3709<h3 id="input-contained-only-whitespace">
3600 Input contained only whitespace3710 Input contained only whitespace
3601</h3>3711</h3>
3602 3712
3603[非対話モード](/docs/ja/headless)では、Claude Code はスペース、タブ、改行だけで構成されたプロンプトを送信せずに拒否します。API は表示可能なテキストのないメッセージを拒否するためです。表示されるメッセージは、空白のプロンプトがどこから来たかによって異なります:3713[非対話モード](/docs/ja/headless)では、Claude Code はスペース、タブ、改行のみで構成されたプロンプトを送信せずに拒否します。API は表示可能なテキストのないメッセージを拒否するためです。表示されるメッセージは、空白のプロンプトがどこから来たかによって異なります:
3604 3714
3605* **`claude -p` のプロンプト引数またはパイプされた stdin**: `claude` は `Error: Input contained only whitespace. Provide a prompt with text through stdin or as a prompt argument when using --print` で終了します3715* **`claude -p` のプロンプト引数またはパイプされた stdin**:`claude` は `Error: Input contained only whitespace. Provide a prompt with text through stdin or as a prompt argument when using --print` で終了します
3606* **実行中の `--input-format stream-json` または [Agent SDK](/docs/ja/agent-sdk/overview) セッションに送信されたメッセージ**: Claude Code はモデルを呼び出さずにターンを終了し、セッションは引き続き使用できます。拒否は、情報メッセージとして、またターンの結果テキストとして届きます: `Blank prompt — the message was only whitespace, so nothing was sent to the model.`3716* **実行中の `--input-format stream-json` または [Agent SDK](/docs/ja/agent-sdk/overview) セッションに送信されたメッセージ**:Claude Code はモデルを呼び出さずにターンを終了し、セッションは引き続き使用できます。拒否は情報メッセージとして、またターンの結果テキストとして返されます:`Blank prompt — the message was only whitespace, so nothing was sent to the model.`
3607 3717
3608v2.1.229 より前は、Claude Code は空白のみのメッセージを API に送信し、API はリクエストを 400 エラーで拒否していました。3718v2.1.229 より前は、Claude Code は空白のみのメッセージを API に送信し、API は 400 エラーでリクエストを拒否していました。
3609 3719
3610**対処方法:**3720**対処方法:**
3611 3721
3612* プロンプトに表示可能なテキストを含めます。スクリプトが変数やファイルからプロンプトを作成する場合は、Claude Code を呼び出す前にソースが空でないことを確認します。3722* プロンプトに表示可能なテキストを含めます。スクリプトが変数やファイルからプロンプトを組み立てる場合は、Claude Code を呼び出す前にソースが空でないことを確認します。
3613 3723
3614<h3 id="stream-json-input-carried-over-256m-characters-with-no-newline">3724<h3 id="stream-json-input-carried-over-256m-characters-with-no-newline">
3615 stream-json input carried over 256M characters with no newline3725 stream-json input carried over 256M characters with no newline
3616</h3>3726</h3>
3617 3727
3618プログラムが `claude -p --input-format stream-json` の実行に対して、改行なしで 268,435,456 文字を超える内容を stdin に送信したため、Claude Code は入力をそれ以上バッファリングせずに、このエラーを stderr に出力して終了コード 1 で終了します。メッセージではこの上限を `256M` と表記しています。v2.1.257 より前は、Claude Code はそのような入力を無制限にバッファリングし、プロセスがクラッシュするか強制終了されるまでメモリが増加していました。3728プログラムが `claude -p --input-format stream-json` の実行に対して、改行なしで 268,435,456 文字を超える文字を stdin に送信したため、Claude Code はそれ以上入力をバッファリングせずに、このエラーを stderr に出力して終了コード 1 で終了します。メッセージではこの上限が `256M` と表記されています。v2.1.257 より前は、Claude Code はこのような入力を無制限にバッファリングし、プロセスがクラッシュするか強制終了されるまでメモリが増加し続けていました。
3619 3729
3620```text theme={null}3730```text theme={null}
3621Error: stream-json input carried over 256M characters with no newline. Each stream-json message must be a single newline-terminated JSON line: either the producer is not newline-terminating its messages, or one message exceeded this budget.3731Error: stream-json input carried over 256M characters with no newline. Each stream-json message must be a single newline-terminated JSON line: either the producer is not newline-terminating its messages, or one message exceeded this budget.
3622```3732```
3623 3733
3624改行なしでこれほど長い入力がある場合、通常は、誤ってパイプされたバイナリファイルやプレーンなログ出力など、入力元がそもそも stream-json の生成元ではないことを意味します。単一のメッセージが上限を超えた場合も、同じチェックで失敗します。3734改行なしでこれほど長い入力は、通常、プロデューサーがそもそも stream-json のプロデューサーではないことを意味します。たとえば、バイナリファイルや通常のログ出力が誤ってパイプされた場合です。上限を超える単一のメッセージも同じチェックで失敗します。
3625 3735
3626**対処方法:**3736**対処方法:**
3627 3737
3628* stdin に何がパイプされているかを確認します。[`--input-format stream-json`](/docs/ja/cli-reference#cli-flags) では、すべてのメッセージが改行で終わる 1 行の JSON である必要があります3738* stdin に何がパイプされているかを確認します。[`--input-format stream-json`](/docs/ja/cli-reference#cli-flags) では、各メッセージは改行で終わる 1 行の JSON である必要があります
3629* 代わりにプレーンテキストを送信するには、`--input-format stream-json` を削除します。`claude -p` はデフォルトで stdin からプレーンテキストのプロンプトを読み取ります3739* 代わりにプレーンテキストを送信するには、`--input-format stream-json` を削除します。`claude -p` はデフォルトで stdin からプレーンテキストのプロンプトを読み取ります
3630 3740
3631<h3 id="unknown-command">3741<h3 id="unknown-command">
3632 Unknown command3742 Unknown command
3633</h3>3743</h3>
3634 3744
3635対話型のターミナルセッションで、このセッションのどのコマンドにも一致しない `/` 名を送信したため、Claude Code は何も実行せずにその名前を報告します:3745対話型のターミナルセッションで、このセッションのどのコマンドにも一致しない `/` の名前を送信したため、Claude Code は何も実行せずにその名前を報告します:
3636 3746
3637```text theme={null}3747```text theme={null}
3638Unknown command: /hepl. Did you mean /help?3748Unknown command: /hepl. Did you mean /help?
3639```3749```
3640 3750
3641Claude Code は、このセッションのメニューに表示されるコマンド名またはエイリアスのうち、最も近いものを提案します。近いものがない場合、メッセージは名前の後で終わります。原因は通常、次のいずれかです:3751Claude Code は、このセッションでメニューに表示される中で最も近いコマンド名またはエイリアスを提案します。近いものがない場合、メッセージは名前の後で終わります。原因は通常、次のいずれかです:
3642 3752
3643* `/help` を `/hepl` と入力するようなタイプミス。[コマンドメニューが入力内容とどのように一致するか](/docs/ja/commands#how-the-command-menu-matches-what-you-type)では、送信前に近い候補を選ぶ方法を説明しています3753* `/help` を `/hepl` と入力するなどのタイプミス。送信前に近い候補を選ぶ方法については、[コマンドメニューが入力内容と照合される仕組み](/docs/ja/commands#how-the-command-menu-matches-what-you-type)を参照してください
3644* コマンドは存在するものの、プラットフォーム、プラン、認証方法などの要件が満たされていないため、このセッションでは利用できない。[`/web-setup`](/docs/ja/web-quickstart#web-setup-shows-no-commands-match-or-unknown-command) と [`/schedule`](/docs/ja/routines#schedule-returns-unknown-command) のトラブルシューティング項目で、よくある 2 つのケースを説明しています。一部のコマンドは、組織のポリシーで無効になっている場合に、[`Cloud sessions are disabled by your organization's policy`](#cloud-sessions-are-disabled-by-your-organizations-policy) のような独自のメッセージで応答します3754* 存在するものの、プラットフォーム、プラン、認証方法などの要件を満たしていないために、このセッションでは利用できないコマンド。[`/web-setup`](/docs/ja/web-quickstart#web-setup-shows-no-commands-match-or-unknown-command) と [`/schedule`](/docs/ja/routines#schedule-returns-unknown-command) のトラブルシューティング項目では、よくある 2 つのケースを説明しています。組織のポリシーによって無効化されている場合に、[`Cloud sessions are disabled by your organization's policy`](#cloud-sessions-are-disabled-by-your-organizations-policy) のような独自のメッセージを返すコマンドもあります
3645* このセッションでインストールまたは接続されていない[プラグイン](/docs/ja/plugins/overview)や [MCP サーバー](/docs/ja/mcp#use-mcp-prompts-as-commands)のコマンド3755* このセッションでインストールまたは接続されていない[プラグイン](/docs/ja/plugins/overview)や [MCP サーバー](/docs/ja/mcp#use-mcp-prompts-as-commands)のコマンド
3646 3756
3647Claude Code が一致しない `/` 名にこのように応答するのは、対話型のターミナルセッションの場合だけです。それ以外のすべてのセッションでは、代わりにプロンプトを通常のメッセージとして Claude に送信し、コマンドが実行されなかったことを示すメモと、セッションで Claude が実行できるコマンドの一覧を添えます。そのようなセッションには次のものがあります:3757Claude Code が一致しない `/` の名前にこのように応答するのは、対話型のターミナルセッションのみです。その他のすべてのセッションでは、代わりにプロンプトを通常のメッセージとして Claude に送信し、コマンドが実行されなかったことを示すメモと、そのセッションで Claude が実行できるコマンドの一覧を添えます。これらのセッションには次のものが含まれます:
3648 3758
3649* `-p` での実行3759* `-p` の実行
3650* [Agent SDK](/docs/ja/agent-sdk/overview) アプリケーション3760* [Agent SDK](/docs/ja/agent-sdk/overview) アプリケーション
3651* [デスクトップアプリ](/docs/ja/desktop)の Code タブ3761* [デスクトップアプリ](/docs/ja/desktop)の Code タブ
3652* [VS Code 拡張機能](/docs/ja/vs-code)のチャットパネル3762* [VS Code 拡張機能](/docs/ja/vs-code)のチャットパネル
3653* [クラウドセッション](/docs/ja/claude-code-on-the-web)と[ルーティン](/docs/ja/routines)3763* [クラウドセッション](/docs/ja/claude-code-on-the-web)と[ルーティン](/docs/ja/routines)
3654 3764
3655これらのセッションのいずれかで実行できない組み込みコマンドについては、Claude Code は Claude に送信する代わりに、そのコマンドは利用できないと応答します。v2.1.274 より前は、一致しない名前を Claude に送信していたのはクラウドセッションとルーティンだけでした。v2.1.273 より前は、それらも `Unknown command` と応答していました。3765これらのセッションのいずれかで実行できない組み込みコマンドの場合、Claude Code は Claude に送信する代わりに、そのコマンドは利用できないと応答します。v2.1.274 より前は、一致しない名前を Claude に送信していたのはクラウドセッションとルーティンのみでした。v2.1.273 より前は、これらも `Unknown command` と応答していました。
3656 3766
3657Claude Code は、`/` で始まるすべてのプロンプトをコマンドとして扱うわけではありません。`/` の後の最初の単語が、Lean のドキュメントコメントを開始する `/--` のように句読点で始まる場合、または `/var/log/syslog` のようなパスである場合は、プロンプトを通常のメッセージとして Claude に送信します。3767Claude Code は、`/` で始まるすべてのプロンプトをコマンドとして扱うわけではありません。`/` の後の最初の単語が、Lean のドキュメントコメントを開始する `/--` のように句読点で始まる場合や、`/var/log/syslog` のようなパスである場合は、プロンプトを通常のメッセージとして Claude に送信します。
3658 3768
3659v2.1.236 より前は、入力した名前に近い候補がコマンドメニューに表示されている状態で `Enter` を押すと、Claude Code はその候補を実行していました。そのため、`/hepl` のようなタイプミスでは、このメッセージを表示する代わりに `/help` が実行されていました。3769v2.1.236 より前は、入力した名前に近い候補がコマンドメニューに表示されている状態で `Enter` を押すと、Claude Code はその候補を実行していたため、`/hepl` のようなタイプミスではこのメッセージの代わりに `/help` が実行されていました。
3660 3770
3661**対処方法:**3771**対処方法:**
3662 3772
3663* 提案された名前を実行するか、`/` に続けて名前の一部を入力し、このセッションで利用できるものを確認します3773* 提案された名前を実行するか、`/` に続けて名前の一部を入力し、このセッションで利用可能なコマンドを確認します
3664* ドキュメントに記載されたコマンドが不明として報告される場合は、[コマンドリファレンス](/docs/ja/commands)のその行で、示されている要件を確認します3774* ドキュメントに記載されているコマンドが不明と報告される場合は、[コマンドリファレンス](/docs/ja/commands)でそのコマンドの行を確認し、示されている要件を確認します
3665 3775
3666<h3 id="diff-is-too-large-for-ultrareview">3776<h3 id="diff-is-too-large-for-ultrareview">
3667 Diff is too large for ultrareview3777 Diff is too large for ultrareview
3668</h3>3778</h3>
3669 3779
3670コミットされていない変更やステージされた変更を含む、ブランチとベースブランチとの差分が [ultrareview](/docs/ja/ultrareview) のサイズ制限を超えているため、`/code-review ultra` と `claude ultrareview` サブコマンドは、クラウドセッションの開始前にレビューを拒否します。拒否されたレビューは無料実行回数を消費せず、使用クレジットも請求されません。メッセージには、適用されている制限、差分のサイズ、そして変更行数が最も多いファイルが示されます。v2.1.216 より前は、メッセージには生の差分統計のみが表示されていました。3780未コミットの変更とステージされた変更を含む、ブランチとベースブランチの間の差分が [ultrareview](/docs/ja/ultrareview) のサイズ上限を超えているため、`/code-review ultra` と `claude ultrareview` サブコマンドはクラウドセッションの開始前にレビューを拒否します。拒否されたレビューでは、無料の実行回数は消費されず、使用クレジットも請求されません。メッセージには、適用されている上限、差分のサイズ、変更行数が最も多いファイルが示されます。v2.1.216 より前は、メッセージには生の差分統計のみが表示されていました。
3671 3781
3672```text theme={null}3782```text theme={null}
3673Diff is too large for ultrareview: 812 files, 96,410 lines changed (limits: 500 files, 8,000 lines). Largest files: package-lock.json (41,904 lines), dist/bundle.js (18,210 lines), src/generated/api.ts (9,876 lines). Pass a closer base branch (`/code-review ultra <branch>`) to narrow the scope, or split the change.3783Diff is too large for ultrareview: 812 files, 96,410 lines changed (limits: 500 files, 8,000 lines). Largest files: package-lock.json (41,904 lines), dist/bundle.js (18,210 lines), src/generated/api.ts (9,876 lines). Pass a closer base branch (`/code-review ultra <branch>`) to narrow the scope, or split the change.
3674```3784```
3675 3785
3676プルリクエストのレビューにも同じ制限が適用されます。その場合のメッセージは `PR #<N> is too large for ultrareview` で始まり、PR のファイル数と行数が示されます。3786プルリクエストをレビューする場合も同じ上限が適用されます。その場合、メッセージは `PR #<N> is too large for ultrareview` で始まり、PR のファイル数と行数が示されます。
3677 3787
3678**対処方法:**3788**対処方法:**
3679 3789
3680* `/code-review ultra develop` のように、作業に近いベースブランチを渡して、レビューがそのブランチとの差分だけを対象とするようにします3790* `/code-review ultra develop` のように、作業により近いベースブランチを渡して、そのブランチとの差分のみがレビュー対象になるようにします
3681* 変更をより小さなブランチに分割し、それぞれをレビューします。メッセージに示されたファイルは変更行数が最も多いため、まずそれらを専用のブランチに移動することから始めてください。3791* 変更をより小さなブランチに分割し、それぞれをレビューします。メッセージに示されたファイルは変更行数が最も多いため、まずそれらを別のブランチに移動します。
3682 3792
3683<h3 id="could-not-find-merge-base-with-the-base-branch">3793<h3 id="could-not-find-merge-base-with-the-base-branch">
3684 Could not find merge-base with the base branch3794 Could not find merge-base with the base branch
3685</h3>3795</h3>
3686 3796
3687`/code-review ultra` と `claude ultrareview` サブコマンドは、ブランチとベースブランチとの差分をレビューします。そのためには、両者が共有するコミットが必要です。`git merge-base` が共有コミットを見つけられない場合、Claude Code はクラウドセッションの開始前にレビューを拒否します。Claude Code が完全であると確認できるクローンで、ブランチが 1 つ以上ある場合は、拒否する代わりに[追跡されているすべてのファイルのレビュー](/docs/ja/ultrareview#diff-limits-and-fallbacks)にフォールバックします。この拒否が表示されるのは、ベースブランチがまったく見つからない場合、Claude Code がクローンの完全性を確認できない場合、または SHA-256 オブジェクト形式のように、ツリー全体の差分が不可能なまれなリポジトリの場合です。3797`/code-review ultra` と `claude ultrareview` サブコマンドは、ブランチとベースブランチの間の差分をレビューするため、両者が共有するコミットが必要です。`git merge-base` がそれを見つけられない場合、Claude Code はクラウドセッションの開始前にレビューを拒否します。Claude Code が完全であることを確認できる、少なくとも 1 つのブランチを持つクローンでは、拒否する代わりに[すべての追跡対象ファイルのレビュー](/docs/ja/ultrareview#diff-limits-and-fallbacks)にフォールバックします。この拒否が表示されるのは、ベースブランチがまったく見つからない場合、Claude Code がクローンの完全性を確認できない場合、または SHA-256 オブジェクト形式のようにツリー全体の差分が不可能なまれなリポジトリの場合です。
3688 3798
3689```text theme={null}3799```text theme={null}
3690Could not find merge-base with main. Pass the base branch explicitly (e.g. `/code-review ultra develop`) or make sure you're in a git repo with a main branch.3800Could not find merge-base with main. Pass the base branch explicitly (e.g. `/code-review ultra develop`) or make sure you're in a git repo with a main branch.
3691```3801```
3692 3802
3693最初の文の後のヒントは、Claude Code が確認した内容によって異なります:38031 文目の後のヒントは、Claude Code が確認した内容によって異なります:
3694 3804
3695* **ベースブランチを渡さなかった場合**: Claude Code はリポジトリのデフォルトブランチと比較し、上の例のように、ベースを明示的に渡すよう提案します3805* **ベースブランチを渡さなかった場合**:Claude Code はリポジトリのデフォルトブランチと比較しており、上記の例のようにベースを明示的に渡すよう提案します
3696* **すでにクローン内にあるベースブランチを渡した場合**: ヒントは ``Make sure <branch> exists locally or on origin (try `git fetch origin <branch>`)`` となります3806* **クローンに既に存在するベースブランチを渡した場合**:ヒントは ``Make sure <branch> exists locally or on origin (try `git fetch origin <branch>`)`` となります
3697* **クローン内にないベースブランチを渡した場合**: 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` で失敗します。3807* **クローンに存在しないベースブランチを渡した場合**: 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` で失敗します。
3698 3808
3699**対処方法:**3809**対処方法:**
3700 3810
3701* 別のブランチが本当のベースである場合は、それを明示的に渡します: `/code-review ultra <branch>`3811* 別のブランチが実際のベースである場合は、明示的に渡します:`/code-review ultra <branch>`
3702* クローンに完全な履歴がない可能性がある場合は、`git fetch --unshallow origin` を実行してからレビューを再実行します3812* クローンに完全な履歴がない可能性がある場合は、`git fetch --unshallow origin` を実行してレビューを再実行します
3703 3813
3704<h3 id="your-checkout-has-no-branches">3814<h3 id="your-checkout-has-no-branches">
3705 Your checkout has no branches3815 Your checkout has no branches
3706</h3>3816</h3>
3707 3817
3708チェックアウトには、コミットはあってもブランチがない場合があります。`git init` の後に `git fetch <url>` と `git checkout FETCH_HEAD` を実行すると、参照のない detached HEAD の状態になります。Claude Code は [ultrareview](/docs/ja/ultrareview) のためにリポジトリを git バンドルとしてパッケージ化してアップロードしますが、ブランチやその他の参照のないリポジトリはバンドルできないため、`/code-review ultra` と `claude ultrareview` サブコマンドはクラウドセッションの開始前にレビューを拒否します。3818チェックアウトには、コミットはあってもブランチがない場合があります。`git init` に続けて `git fetch <url>` と `git checkout FETCH_HEAD` を実行すると、参照のない detached HEAD の状態になります。Claude Code は [ultrareview](/docs/ja/ultrareview) のためにリポジトリを git バンドルとしてパッケージ化してアップロードしますが、ブランチやその他の参照がないリポジトリはバンドルできないため、`/code-review ultra` と `claude ultrareview` サブコマンドはクラウドセッションの開始前にレビューを拒否します。
3709 3819
3710```text theme={null}3820```text theme={null}
3711Your checkout has no branches (detached HEAD only), which cloud review can't bundle. Create one first — `git checkout -b <name>` — then rerun /code-review ultra.3821Your checkout has no branches (detached HEAD only), which cloud review can't bundle. Create one first — `git checkout -b <name>` — then rerun /code-review ultra.
3712```3822```
3713 3823
3714v2.1.221 より前は、Claude Code はこのチェックアウト内の追跡されているすべてのファイルのレビューを試み、アップロードが失敗していました。3824v2.1.221 より前は、Claude Code はこのチェックアウト内のすべての追跡対象ファイルのレビューを試み、アップロードが失敗していました。
3715 3825
3716**対処方法:**3826**対処方法:**
3717 3827
3718* `git checkout -b <name>` で現在のコミットにブランチを作成してから、レビューを再実行します3828* `git checkout -b <name>` で現在のコミットにブランチを作成してから、レビューを再実行します
3719 3829
3721 No GitHub account is connected to your Claude account3831 No GitHub account is connected to your Claude account
3722</h3>3832</h3>
3723 3833
3724`/code-review ultra <PR#>` または `claude ultrareview <PR#>` を実行しました。Claude Code はクラウドセッションを作成する前に、[Claude アカウントに接続された GitHub アカウント](/docs/ja/ultrareview#review-a-pull-request)が PR のリポジトリにアクセスできるかをサーバーに問い合わせます。アカウントが接続されていないか、接続の有効期限が切れているため、クラウドでのクローンが失敗することになり、Claude Code は起動を拒否します。拒否された起動では、無料実行回数は消費されず、使用クレジットも請求されません。3834`/code-review ultra <PR#>` または `claude ultrareview <PR#>` を実行しました。Claude Code はクラウドセッションを作成する前に、[Claude アカウントに接続された GitHub アカウント](/docs/ja/ultrareview#review-a-pull-request)が PR のリポジトリにアクセスできるかどうかをサーバーに問い合わせます。アカウントが接続されていないか接続の有効期限が切れているため、クラウドでのクローンが失敗することになり、Claude Code は起動を拒否します。拒否された起動では、無料の実行回数は消費されず、使用クレジットも請求されません。
3725 3835
3726```text theme={null}3836```text theme={null}
3727Ultrareview clones <owner>/<repo> in the cloud with the GitHub account connected to your Claude account, and none is connected (or the connection expired). To fix: run /web-setup to reuse your GitHub CLI login, or connect an account at https://claude.ai/connect-github — then re-run /code-review ultra 1234 (allow a minute after connecting).3837Ultrareview clones <owner>/<repo> in the cloud with the GitHub account connected to your Claude account, and none is connected (or the connection expired). To fix: run /web-setup to reuse your GitHub CLI login, or connect an account at https://claude.ai/connect-github — then re-run /code-review ultra 1234 (allow a minute after connecting).
3729 3839
3730セッションで [`/web-setup`](/docs/ja/web-quickstart#connect-from-your-terminal) が利用できない場合、メッセージには claude.ai のリンクのみが示されます。3840セッションで [`/web-setup`](/docs/ja/web-quickstart#connect-from-your-terminal) が利用できない場合、メッセージには claude.ai のリンクのみが示されます。
3731 3841
3732**対処方法:**3842**対処方法:**
3733 3843
3734* `/web-setup` を実行して GitHub CLI のログインを Claude アカウントに接続するか、[claude.ai/connect-github](https://claude.ai/connect-github) でアカウントを接続します3844* `/web-setup` を実行して GitHub CLI のログインを Claude アカウントに接続するか、[claude.ai/connect-github](https://claude.ai/connect-github) でアカウントを接続します
3735* 接続してから 1 分ほど待って、レビューを再実行します3845* 接続してから 1 分後にレビューを再実行します
3736 3846
3737v2.1.248 より前は、Claude Code は起動前にこのチェックを行っていませんでした。3847v2.1.248 より前は、Claude Code は起動前にこのチェックを行っていませんでした。
3738 3848
3740 Your connected GitHub account can't see the repository3850 Your connected GitHub account can't see the repository
3741</h3>3851</h3>
3742 3852
3743`/code-review ultra <PR#>` または `claude ultrareview <PR#>` を実行しましたが、[Claude アカウントに接続された GitHub アカウント](/docs/ja/ultrareview#review-a-pull-request)が PR のリポジトリを読み取れないため、クラウドでのクローンが失敗することになり、Claude Code は起動を拒否します。拒否された起動では、無料実行回数は消費されず、使用クレジットも請求されません。3853`/code-review ultra <PR#>` または `claude ultrareview <PR#>` を実行しましたが、[Claude アカウントに接続された GitHub アカウント](/docs/ja/ultrareview#review-a-pull-request)がその PR のリポジトリを読み取れないため、クラウドでのクローンが失敗することになり、Claude Code は起動を拒否しました。起動が拒否された場合、Claude Code は無料実行回数を消費せず、使用クレジットも請求しません。
3744 3854
3745```text theme={null}3855```text theme={null}
3746Your connected GitHub account can't see <owner>/<repo> — usually the Claude GitHub app isn't installed on <owner> or wasn't granted this repo (web-connected accounts need it for private repos), or a different GitHub account is connected. To fix: run /web-setup to reuse your GitHub CLI login, or install the app at https://github.com/apps/claude/installations/new — then re-run /code-review ultra 1234.3856Your connected GitHub account can't see <owner>/<repo> — usually the Claude GitHub app isn't installed on <owner> or wasn't granted this repo (web-connected accounts need it for private repos), or a different GitHub account is connected. To fix: run /web-setup to reuse your GitHub CLI login, or install the app at https://github.com/apps/claude/installations/new — then re-run /code-review ultra 1234.
3748 3858
3749セッションで [`/web-setup`](/docs/ja/web-quickstart#connect-from-your-terminal) が利用できない場合、メッセージにはアプリのインストールのみが示されます。3859セッションで [`/web-setup`](/docs/ja/web-quickstart#connect-from-your-terminal) が利用できない場合、メッセージにはアプリのインストールのみが示されます。
3750 3860
3751**対処方法:**3861**対処方法:**
3752 3862
3753* ローカルの `gh` CLI がリポジトリを読み取れる場合は、`/web-setup` を実行してそのログインを Claude アカウントに接続します3863* ローカルの `gh` CLI がリポジトリを読み取れる場合は、`/web-setup` を実行してそのログインを Claude アカウントに接続します
3754* 変更後にレビューを再実行します3864* 変更後にレビューを再実行します
3755 3865
3756v2.1.248 より前は、Claude Code は起動前にこのチェックを行っていませんでした。3866v2.1.248 より前では、Claude Code は起動前にこの確認を行っていませんでした。
3757 3867
3758<h3 id="the-github-app-preflight-failed-transiently">3868<h3 id="the-github-app-preflight-failed-transiently">
3759 The GitHub App preflight failed transiently3869 The GitHub App preflight failed transiently
3760</h3>3870</h3>
3761 3871
3762ローカルリポジトリから[クラウドセッション](/docs/ja/claude-code-on-the-web)を開始しましたが、2 つのステップが同時に失敗しました。Claude Code はリポジトリのバンドルをビルドまたはアップロードできませんでした。アップロードの前に、Claude Code はクラウドサービスが GitHub からリポジトリをクローンできるかをチェックしましたが、そのチェックは明確な答えではなく、ネットワークエラー、タイムアウト、一時的なサーバーエラーなど、再試行で解消される可能性のあるエラーで終了しました。完全なメッセージは、`Could not upload repo bundle (<error>)` のようにバンドルを妨げた原因で始まり、事前チェックに関する文で終わります:3872ローカルリポジトリから[クラウドセッション](/docs/ja/claude-code-on-the-web)を開始したところ、2 つのステップが同時に失敗しました。Claude Code はリポジトリのバンドルをビルドまたはアップロードできませんでした。アップロードの前に、Claude Code はクラウドサービスが GitHub からリポジトリをクローンできるかどうかを確認しますが、この確認は明確な結果ではなく、ネットワークエラー、タイムアウト、一時的なサーバーエラーなど、再試行で解消できる可能性のあるエラーで終わりました。完全なメッセージは、`Could not upload repo bundle (<error>)` のようにバンドルを妨げた原因から始まり、事前確認に関する文で終わります:
3763 3873
3764```text theme={null}3874```text theme={null}
3765Could not upload repo bundle (<error>). The GitHub App preflight failed transiently (network or service hiccup) — retry in a moment to start from GitHub instead3875Could not upload repo bundle (<error>). The GitHub App preflight failed transiently (network or service hiccup) — retry in a moment to start from GitHub instead
3766```3876```
3767 3877
3768**対処方法:**3878**対処方法:**
3769 3879
3770* 少し待ってからコマンドを再実行します。GitHub のチェックに合格すると、Claude Code は GitHub のクローンからセッションを開始できるため、失敗したアップロードによって起動が妨げられることはなくなります3880* 少し待ってからコマンドを再実行します。GitHub の確認が通れば、Claude Code は GitHub のクローンからセッションを開始できるため、アップロードの失敗によって起動が妨げられることはなくなります
3771* 再試行しても失敗が続く場合は、メッセージの冒頭にアップロードを妨げた原因が示されています。その原因が修正可能なものであれば修正して、代わりにローカルリポジトリからセッションを開始できるようにします3881* 再試行しても失敗し続ける場合は、メッセージの冒頭にアップロードを妨げた原因が示されています。その原因が修正可能なものであれば、修正してローカルリポジトリからセッションを開始できるようにします
3772 3882
3773v2.1.251 より前は、GitHub のチェックが一時的に失敗しただけの場合でも、Claude Code はメッセージの最後に `Please set up GitHub on https://claude.ai/code` を表示していましたが、セットアップの助言では一時的な失敗は解消できません。3883v2.1.251 より前では、GitHub の確認が一時的に失敗しただけの場合でも、Claude Code はメッセージを `Please set up GitHub on https://claude.ai/code` で終えていましたが、セットアップの案内では一時的な失敗は解消できません。
3774 3884
3775<h3 id="the-repository-upload-cant-follow-a-git-setting">3885<h3 id="the-repository-upload-cant-follow-a-git-setting">
3776 リポジトリのアップロードが git 設定に従えない3886 リポジトリのアップロードが git 設定に従えない
3777</h3>3887</h3>
3778 3888
3779[ローカルリポジトリをアップロードするクラウドセッション](/docs/ja/claude-code-on-the-web#send-local-repositories-without-github)、またはブランチの [ultrareview](/docs/ja/ultrareview) を開始しましたが、ファイルにどの属性ルールを適用するかを決める git 設定のいずれかに、アップロードが従えません。アップロードをそのまま進めてルールを見落とすと、git が保存前に変換するファイル(clean フィルターで暗号化されるファイルなど)が、ディスク上の状態のままクラウドに届く可能性があります。そのため Claude Code はアップロードを拒否し、何もアップロードされません:3889[ローカルリポジトリをアップロードするクラウドセッション](/docs/ja/claude-code-on-the-web#send-local-repositories-without-github)またはブランチの [ultrareview](/docs/ja/ultrareview) を開始しましたが、ファイルに適用される属性ルールを決定する git 設定の 1 つにアップロードが従えません。アップロードを続行してルールを見落とすと、clean フィルターで暗号化されるファイルなど、git が保存前に変換するファイルがディスク上の状態のままクラウドに送られる可能性があります。そのため Claude Code はアップロードを拒否し、何もアップロードしません:
3780 3890
3781```text theme={null}3891```text theme={null}
3782Not uploading this working tree: core.ignoreCase (which decides whether .gitattributes patterns match file names regardless of letter case) is set in <file>, and the upload cannot follow that setting, so a file git would change before storing it (to encrypt it, for example) could be uploaded as it is on disk. Move the core.ignoreCase line into this repository’s .git/config or directly into your ~/.gitconfig, then retry.3892Not uploading this working tree: core.ignoreCase (which decides whether .gitattributes patterns match file names regardless of letter case) is set in <file>, and the upload cannot follow that setting, so a file git would change before storing it (to encrypt it, for example) could be uploaded as it is on disk. Move the core.ignoreCase line into this repository’s .git/config or directly into your ~/.gitconfig, then retry.
3783```3893```
3784 3894
3785メッセージには設定項目の名前とその設定場所が示され、最後に該当するケースの修正方法が記載されます。`core.attributesFile` と `attr.tree` についても同じ拒否が表示され、それぞれ固有の修正方法が示されます。3895メッセージには設定名とその設定場所が示され、該当するケースの修正方法で終わります。`core.attributesFile` と `attr.tree` についても同じ拒否が表示され、それぞれに固有の修正方法が示されます。
3786 3896
3787メッセージには、git の設定が `include` または `includeIf` ディレクティブを通じて読み込む設定ファイルが示されることがあります。これは、そのディレクティブの条件がこのリポジトリに該当しない場合でも同様です。3897メッセージには、git 設定が `include` または `includeIf` ディレクティブで読み込む設定ファイルが示されることがあります。これは、そのディレクティブの条件がこのリポジトリに当てはまらない場合でも同様です。
3788 3898
3789**対処方法:**3899**対処方法:**
3790 3900
3791* メッセージの最後の文に記載された修正を適用します3901* メッセージの最後の文に示された修正を適用します
3792 3902
3793<h3 id="github-isnt-connected-to-your-claude-account">3903<h3 id="github-isnt-connected-to-your-claude-account">
3794 GitHub isn't connected to your Claude account3904 GitHub isn't connected to your Claude account
3795</h3>3905</h3>
3796 3906
3797ローカルリポジトリから、たとえば `/autofix-pr` を使って[クラウドセッション](/docs/ja/claude-code-on-the-web)を開始しました。Claude アカウントに GitHub アカウントが接続されていないか、接続の有効期限が切れているため、Claude Code は起動を拒否します:3907`/autofix-pr` などでローカルリポジトリから[クラウドセッション](/docs/ja/claude-code-on-the-web)を開始しました。Claude アカウントに GitHub アカウントが接続されていないか、接続の有効期限が切れているため、Claude Code は起動を拒否します:
3798 3908
3799```text theme={null}3909```text theme={null}
3800GitHub isn't connected to your Claude account, so this repository can't be cloned in the cloud. Run /web-setup to connect with your GitHub CLI login, or connect on the web at https://claude.ai/connect-github3910GitHub isn't connected to your Claude account, so this repository can't be cloned in the cloud. Run /web-setup to connect with your GitHub CLI login, or connect on the web at https://claude.ai/connect-github
3801```3911```
3802 3912
3803[`/schedule`](/docs/ja/routines) でルーティンを作成する場合は、同じメッセージがリポジトリ名を示すセットアップの注記として表示されます。この注記はルーティンの作成をブロックしません。3913[`/schedule`](/docs/ja/routines) でルーティンを作成すると、同じメッセージがリポジトリ名を含むセットアップの注記として表示されます。この注記はルーティンの作成を妨げません。
3804 3914
3805**対処方法:**3915**対処方法:**
3806 3916
3807* `/web-setup` を実行して GitHub CLI のログインを Claude アカウントに接続するか、[claude.ai/connect-github](https://claude.ai/connect-github) でアカウントを接続します。両者の違いについては [GitHub 認証オプション](/docs/ja/claude-code-on-the-web#github-authentication-options)を参照してください。3917* `/web-setup` を実行して GitHub CLI のログインを Claude アカウントに接続するか、[claude.ai/connect-github](https://claude.ai/connect-github) でアカウントを接続します。両者の違いについては [GitHub 認証オプション](/docs/ja/claude-code-on-the-web#github-authentication-options)を参照してください。
3808* 接続してから 1 分後にコマンドを再実行します3918* 接続してから 1 分後にコマンドを再実行します
3809 3919
3810v2.1.268 より前では、Claude Code はこれを Claude GitHub App チェックの一時的な失敗として報告し、再試行またはアプリのインストールを提案していました。どちらも GitHub アカウントを接続するものではありません。3920v2.1.268 より前では、Claude Code はこれを Claude GitHub App の確認の一時的な失敗として報告し、再試行またはアプリのインストールを提案していました。いずれも GitHub アカウントを接続するものではありません。
3811 3921
3812<h3 id="a-github-organization-policy-is-blocking-claude">3922<h3 id="a-github-organization-policy-is-blocking-claude">
3813 GitHub 組織のポリシーが Claude をブロックしている3923 GitHub 組織のポリシーが Claude をブロックしている
3814</h3>3924</h3>
3815 3925
3816Claude Code のプロンプトで、[`/autofix-pr`](/docs/ja/claude-code-on-the-web#auto-fix-pull-requests) などクラウドセッションを開始するコマンドを実行しました。Claude Code はセッションを作成する前に GitHub 上のリポジトリへの Claude のアクセスを確認しますが、GitHub 組織に Claude をブロックするポリシーがあるため、GitHub が拒否しました。Claude Code はそこで停止し、そのポリシーを示すメッセージを表示します。3926Claude Code のプロンプトで、[`/autofix-pr`](/docs/ja/claude-code-on-the-web#auto-fix-pull-requests) などのクラウドセッションを開始するコマンドを実行しました。セッションを作成する前に、Claude Code は GitHub 上のリポジトリに対する Claude のアクセスを確認しますが、GitHub 組織に Claude をブロックするポリシーがあるため、GitHub がこれを拒否しました。Claude Code はそこで停止し、ポリシー名を示すメッセージを表示します。
3817 3927
3818IP 許可リストがアクセスをブロックしている場合、メッセージは次のようになります:3928IP 許可リストがアクセスをブロックしている場合、メッセージは次のとおりです:
3819 3929
3820```text theme={null}3930```text theme={null}
3821Your GitHub organization has an IP allowlist that is blocking Claude. Add Claude's IP ranges to your GitHub allowlist.3931Your GitHub organization has an IP allowlist that is blocking Claude. Add Claude's IP ranges to your GitHub allowlist.
3822```3932```
3823 3933
3824シングルサインオンがブロックしている場合、メッセージは次のようになります:3934シングルサインオンがブロックしている場合、メッセージは次のとおりです:
3825 3935
3826```text theme={null}3936```text theme={null}
3827Your GitHub organization requires single sign-on. Disconnect and reconnect GitHub on the Connectors page in Claude on the web, click Authorize next to your organization when GitHub asks, then try again.3937Your GitHub organization requires single sign-on. Disconnect and reconnect GitHub on the Connectors page in Claude on the web, click Authorize next to your organization when GitHub asks, then try again.
3828```3938```
3829 3939
3830Microsoft Entra ID の条件付きアクセスポリシーがブロックしている場合、メッセージは次のようになります:3940Microsoft Entra ID の条件付きアクセスポリシーがブロックしている場合、メッセージは次のとおりです:
3831 3941
3832```text theme={null}3942```text theme={null}
3833Your GitHub organization's identity provider (Microsoft Entra ID) has a Conditional Access policy that is blocking Claude. Ask your GitHub Enterprise or Entra ID admin to allow Claude in that policy.3943Your GitHub organization's identity provider (Microsoft Entra ID) has a Conditional Access policy that is blocking Claude. Ask your GitHub Enterprise or Entra ID admin to allow Claude in that policy.
3834```3944```
3835 3945
3836**対処方法:**3946**対処方法:**
3837 3947
3838* **IP 許可リスト**: GitHub 組織または Enterprise のオーナーに、Anthropic の送信元 IP アドレスを許可するよう依頼します。アドレスと変更すべき GitHub の設定については、[GitHub の許可リストとファイアウォール](/docs/ja/network-config#github-allow-lists-and-firewalls)を参照してください。3948* **IP 許可リスト**:GitHub 組織またはエンタープライズのオーナーに、Anthropic の送信元 IP アドレスを許可するよう依頼します。アドレスと変更すべき GitHub の設定については、[GitHub の許可リストとファイアウォール](/docs/ja/network-config#github-allow-lists-and-firewalls)を参照してください。
3839* **シングルサインオン**: [claude.ai/customize/connectors](https://claude.ai/customize/connectors) で GitHub の接続を解除してから、再度接続します。GitHub から求められたら、組織の横にある **Authorize** をクリックして、新しい接続がその組織のシングルサインオンに対して認可されるようにします。3949* **シングルサインオン**:[claude.ai/customize/connectors](https://claude.ai/customize/connectors) で GitHub を切断し、再度接続します。GitHub から求められたら、組織の横にある **Authorize** をクリックして、新しい接続をその組織のシングルサインオンに対して認可します。
3840* **条件付きアクセスポリシー**: GitHub Enterprise または Microsoft Entra ID の管理者に、そのポリシーで Claude を許可するよう依頼します3950* **条件付きアクセスポリシー**:GitHub Enterprise または Microsoft Entra ID の管理者に、そのポリシーで Claude を許可するよう依頼します
3841* 変更後、コマンドを再度実行します3951* 変更後、コマンドを再度実行します
3842 3952
3843<h3 id="single-sign-on-authorization-needed">3953<h3 id="single-sign-on-authorization-needed">
3844 Single sign-on authorization needed3954 Single sign-on authorization needed
3845</h3>3955</h3>
3846 3956
3847[`/install-github-app`](/docs/ja/github-actions#quick-setup) を実行し、SAML シングルサインオンを強制している組織のリポジトリを選択しました。セットアップの前に Claude Code は GitHub CLI でリポジトリへのアクセスを確認しますが、`gh` トークンがまだその組織に対して認可されていないため、GitHub がその確認を拒否しました。ウィザードには、認可の手順とともに警告が表示されます:3957[`/install-github-app`](/docs/ja/github-actions#quick-setup) を実行し、SAML シングルサインオンを強制する組織のリポジトリを選択しました。セットアップの前に、Claude Code は GitHub CLI でリポジトリへのアクセスを確認しますが、`gh` トークンがまだその組織に対して認可されていないため、GitHub がこの確認を拒否しました。ウィザードには、認可の手順とともに警告が表示されます:
3848 3958
3849```text theme={null}3959```text theme={null}
3850Single sign-on authorization needed3960Single sign-on authorization needed
3851<owner>/<repo> belongs to an organization that enforces SAML single sign-on, and your GitHub CLI token isn't authorized for it yet.3961<owner>/<repo> belongs to an organization that enforces SAML single sign-on, and your GitHub CLI token isn't authorized for it yet.
3852```3962```
3853 3963
3854**対処方法:**3964**対処方法:**
3855 3965
3856* `gh auth refresh -h github.com -s repo,workflow` を実行して、`repo` と `workflow` スコープで GitHub CLI のログインを再認可し、GitHub からシングルサインオンを求められたら組織を認可します3966* `gh auth refresh -h github.com -s repo,workflow` を実行して、`repo` と `workflow` スコープで GitHub CLI のログインを再認可し、GitHub からシングルサインオンを求められたら組織を認可します
3857* `GH_TOKEN` の個人アクセストークンで認証している場合は、[github.com/settings/tokens](https://github.com/settings/tokens) を開き、トークンの **Configure SSO** を選択して組織を認可します3967* `GH_TOKEN` の個人アクセストークンで認証している場合は、[github.com/settings/tokens](https://github.com/settings/tokens) を開き、トークンの **Configure SSO** を選択して組織を認可します
3858* `/install-github-app` を再度実行します3968* `/install-github-app` を再度実行します
3859 3969
3860v2.1.273 より前では、この状況で Claude Code は代わりに `Admin permissions required` という警告を表示していました。3970v2.1.273 より前では、Claude Code はこの状況で代わりに `Admin permissions required` の警告を表示していました。
3861 3971
3862<h3 id="failed-to-resume-the-conversation">3972<h3 id="failed-to-resume-the-conversation">
3863 Failed to resume the conversation3973 Failed to resume the conversation
3864</h3>3974</h3>
3865 3975
3866[`claude --resume` ピッカー](/docs/ja/sessions#use-the-session-picker)で選択したセッションの保存済みトランスクリプトを Claude Code が読み取りまたは処理できなかったため、部分的に読み込まれた状態で続行するのではなくプロセスを終了します。メッセージには再試行のためのコマンドが含まれます:3976[`claude --resume` ピッカー](/docs/ja/sessions#use-the-session-picker)で選択したセッションの保存済みトランスクリプトを Claude Code が読み取りまたは処理できなかったため、部分的に読み込まれた状態で続行するのではなく、プロセスを終了します。メッセージには再試行用のコマンドが含まれます:
3867 3977
3868```text theme={null}3978```text theme={null}
3869Failed to resume the conversation.3979Failed to resume the conversation.
3870Run claude --resume <session-id> to retry, or claude to start a new session.3980Run claude --resume <session-id> to retry, or claude to start a new session.
3871```3981```
3872 3982
3873Claude Code はメッセージを表示した後、終了コード 1 で終了します。実行中のセッション内の `/resume` ピッカーでは、代わりに会話内に `Failed to resume conversation` と表示され、現在のセッションは実行を続けます。v2.1.216 より前では、`claude --resume` ピッカーからの再開に失敗すると、このメッセージを表示する代わりに `Resuming conversation…` スピナーが表示されたままになっていました。3983Claude Code はメッセージを表示した後、終了コード 1 で終了します。実行中のセッション内の `/resume` ピッカーでは、代わりに会話内に `Failed to resume conversation` と表示され、現在のセッションは実行を続けます。v2.1.216 より前では、`claude --resume` ピッカーからの再開が失敗すると、このメッセージを表示する代わりに `Resuming conversation…` スピナーのまま止まっていました。
3874 3984
3875**対処方法:**3985**対処方法:**
3876 3986
3877* メッセージに示されたセッション ID を使って `claude --resume <session-id>` を実行し、再試行します3987* メッセージに示されたセッション ID で `claude --resume <session-id>` を実行して再試行します
3878* v2.1.285 より前のバージョンで、再試行が同じように失敗する場合は、`claude update` を実行してから再度再開します。これらのバージョンでは、保存済みトランスクリプトに読み取れないエントリが含まれていると再開に失敗します。3988* v2.1.285 より前のバージョンで、再試行も同じように失敗する場合は、`claude update` を実行してから再度再開します。これらのバージョンでは、保存済みトランスクリプトに読み取れないエントリが含まれていると再開に失敗します。
3879* 再試行が再び失敗する場合は、`claude` を実行して新しいセッションを開始します3989* 再試行が再び失敗する場合は、`claude` を実行して新しいセッションを開始します
3880 3990
3881<h3 id="no-conversation-found-with-the-session-id">3991<h3 id="no-conversation-found-with-the-session-id">
3882 No conversation found with the session ID3992 No conversation found with the session ID
3883</h3>3993</h3>
3884 3994
3885`claude --resume <session-id>` にセッション ID を渡しましたが、一致する保存済みトランスクリプトがありませんでした:3995`claude --resume <session-id>` にセッション ID を渡しましたが、一致する保存済みトランスクリプトがありませんでした:
3886 3996
3887```text theme={null}3997```text theme={null}
3888No conversation found with session ID: <session-id>3998No conversation found with session ID: <session-id>
3889```3999```
3890 4000
3891Claude Code はメッセージを表示した後、終了コード 1 で終了します。Claude Code は、[まず現在のプロジェクトを検索し、次にこのマシン上の他のすべてのプロジェクト](/docs/ja/sessions#where-the-session-picker-looks)からその ID を検索します。v2.1.223 より前では、検索は現在のプロジェクトディレクトリとその git worktree で止まっていたため、セッションが最後に作業していたディレクトリから再開してください。4001Claude Code はメッセージを表示した後、終了コード 1 で終了します。Claude Code は、[まず現在のプロジェクトを検索し、次にこのマシン上の他のすべてのプロジェクト](/docs/ja/sessions#where-the-session-picker-looks)からその ID を探します。v2.1.223 より前では、検索は現在のプロジェクトディレクトリとその git worktree で止まっていたため、セッションが最後に作業していたディレクトリから再開してください。
3892 4002
3893主な原因:4003主な原因:
3894 4004
3895* **ID の入力ミス**: 非対話型の実行では、ID は [`--output-format json` の出力](/docs/ja/headless#get-structured-output)の `session_id` フィールドです4005* **ID の入力ミス**:非対話型の実行では、ID は [`--output-format json` の出力](/docs/ja/headless#get-structured-output)の `session_id` フィールドです
3896* **トランスクリプトの削除**: Claude Code は[保持期間](/docs/ja/sessions#where-transcripts-are-stored)(デフォルトは 30 日)が過ぎると、[保持スイープのルール](/docs/ja/claude-directory#cleaned-up-automatically)に従ってトランスクリプトを削除します4006* **トランスクリプトの削除**:Claude Code は、[保持期間](/docs/ja/sessions#where-transcripts-are-stored)(デフォルトは 30 日)が過ぎると、[保持期間による削除ルール](/docs/ja/claude-directory#cleaned-up-automatically)に従ってトランスクリプトを削除します
3897* **別のマシン**: Claude Code はトランスクリプトをローカルに保存するため、セッションを実行したマシンで再開してください4007* **別のマシン**:Claude Code はトランスクリプトをローカルに保存するため、セッションを実行したマシンで再開してください
3898* **重複したコピー**: `~/.claude/projects` 配下のプロジェクトディレクトリをコピーして 2 つのトランスクリプトが同じ ID を持つ場合、Claude Code はどちらかのコピーを任意に再開するのではなく、このメッセージを表示します4008* **重複コピー**:`~/.claude/projects` 内のプロジェクトディレクトリをコピーして 2 つのトランスクリプトが同じ ID を持つ場合、Claude Code は一方を任意に再開するのではなく、このメッセージを報告します
3899 4009
3900**対処方法:**4010**対処方法:**
3901 4011
3902* 対話型セッションの場合は、`claude --resume` で[セッションピッカー](/docs/ja/sessions#use-the-session-picker)を開き、`Ctrl+A` を押してこのマシン上のすべてのプロジェクトに範囲を広げてから、セッションを選択します4012* 対話型セッションの場合は、`claude --resume` で[セッションピッカー](/docs/ja/sessions#use-the-session-picker)を開き、`Ctrl+A` を押してこのマシン上のすべてのプロジェクトに範囲を広げてから、セッションを選択します
3903* `claude -p` または [Agent SDK](/docs/ja/agent-sdk/overview) で作成したセッションはピッカーに表示されないため、元の実行で出力された `session_id` と ID を照合し直してください4013* `claude -p` または [Agent SDK](/docs/ja/agent-sdk/overview) で作成したセッションはピッカーに表示されないため、元の実行で出力された `session_id` と ID を照合し直してください
3906 Windows reported an error (EBADF) when Claude Code read this session's transcript file4016 Windows reported an error (EBADF) when Claude Code read this session's transcript file
3907</h3>4017</h3>
3908 4018
3909Windows でセッションを再開し、保存済みの[トランスクリプトファイル](/docs/ja/sessions#where-transcripts-are-stored)は正常に開かれましたが、その後の読み取りがシステムエラー EBADF で失敗しました。システムエラーからは読み取りが失敗した理由がわからないため、メッセージでは考えられる原因と試すべきことが提案されます:4019Windows でセッションを再開したところ、保存済みの[トランスクリプトファイル](/docs/ja/sessions#where-transcripts-are-stored)は正常に開かれたものの、その後の読み取りがシステムエラー EBADF で失敗しました。システムエラーは読み取りが失敗した理由を示さないため、メッセージでは考えられる原因と試すべきことが提案されます:
3910 4020
3911```text theme={null}4021```text theme={null}
3912Windows 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.4022Windows 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.
3913```4023```
3914 4024
3915このメッセージは、`Failed to resume session <session-id>` などのコマンド自体の失敗行に続いて表示されます。`claude --resume` または [`claude -p`](/docs/ja/headless) コマンドは、これを表示した後に終了コード 1 で終了します。セッション内で `/resume` を実行した場合は、現在のセッションが実行を続けます。4025このメッセージは、`Failed to resume session <session-id>` のようなコマンド自体の失敗を示す行に続いて表示されます。`claude --resume` または [`claude -p`](/docs/ja/headless) コマンドは、これを表示した後、終了コード 1 で終了します。セッション内で `/resume` を実行した場合は、現在のセッションは実行を続けます。
3916 4026
3917**対処方法:**4027**対処方法:**
3918 4028
3919* セキュリティ、暗号化、エンドポイント管理ツールなど、ファイルの読み取りをスキャンまたはインターセプトするソフトウェアの対象から、セッションのトランスクリプトを保持するフォルダーを除外します。トランスクリプトはデフォルトで `%USERPROFILE%\.claude\projects` 配下、または [`CLAUDE_CONFIG_DIR`](/docs/ja/env-vars) が指定するディレクトリ配下に保存されます4029* セキュリティ、暗号化、エンドポイント管理ツールなど、ファイルの読み取りをスキャンまたはインターセプトするソフトウェアから、セッションのトランスクリプトを保存するフォルダーを除外します。トランスクリプトはデフォルトでは `%USERPROFILE%\.claude\projects` に、または [`CLAUDE_CONFIG_DIR`](/docs/ja/env-vars) が指定するディレクトリに保存されます
3920* 除外を追加できない場合は、代わりにそのソフトウェアの許可されたアプリケーションに Claude Code を追加します4030* 除外を追加できない場合は、代わりにそのソフトウェアの許可されたアプリケーションに Claude Code を追加します
3921* セッションを再度再開します4031* セッションを再度再開します
3922 4032
3923v2.1.282 より前では、失敗時に説明は表示されませんでした。`claude --resume <session-id>` は `Failed to resume session <session-id>` で終了し、`-p` の実行では `Failed to resume session: EBADF: bad file descriptor, read` のようなシステムエラーのテキストのみが出力されていました。4033v2.1.282 より前では、この失敗は説明なしで発生していました。`claude --resume <session-id>` は `Failed to resume session <session-id>` で終了し、`-p` での実行では `Failed to resume session: EBADF: bad file descriptor, read` のようなシステムエラーのテキストのみが出力されていました。
3924 4034
3925<h3 id="cannot-switch-renderers-in-this-session">4035<h3 id="cannot-switch-renderers-in-this-session">
3926 Cannot switch renderers in this session4036 Cannot switch renderers in this session
3927</h3>4037</h3>
3928 4038
3929レンダラーを切り替えると、Claude Code はプロセスを再起動します。Claude Code が再起動を拒否するセッションで [`/tui`](/docs/ja/fullscreen#enable-fullscreen-rendering) を実行したため、切り替えは行われず、何も保存されません。表示されるメッセージによって原因がわかります:4039レンダラーを切り替えると、Claude Code はプロセスを再起動します。Claude Code が再起動を拒否するセッションで [`/tui`](/docs/ja/fullscreen#enable-fullscreen-rendering) を実行したため、切り替えは行われず、何も保存されません。表示されるメッセージによって原因がわかります:
3930 4040
3931* `Cannot switch renderers while work is running in the background`: バックグラウンドシェルやサブエージェントなど、再起動すると放棄されてしまうバックグラウンドの作業が実行中です。作業が終わるのを待つか、[`/tasks`](/docs/ja/commands) で停止してから、`/tui fullscreen` または `/tui default` を再度実行します4041* `Cannot switch renderers while work is running in the background`:バックグラウンドシェルやサブエージェントなど、再起動によって破棄されてしまうバックグラウンドの作業が実行中です。作業が完了するまで待つか、[`/tasks`](/docs/ja/commands) で停止してから、`/tui fullscreen` または `/tui default` を再度実行します
3932* `Cannot switch renderers in this session`: セッションに、Claude Code が再起動後のプロセスに引き継げない制限があります。v2.1.234 より前では、Claude Code はそれでも再起動し、再起動されたセッションはそれらの制限なしで実行されていました4042* `Cannot switch renderers in this session`:セッションに、Claude Code が再起動後のプロセスに引き継げない制限があります。v2.1.234 より前では、Claude Code はそれでも再起動し、再起動後のセッションはそれらの制限なしで実行されていました
3933 4043
3934制限に関するメッセージでは、括弧内の部分に Claude Code が検出した制限が示されます:4044制限に関するメッセージでは、括弧内に Claude Code が検出した制限が示されます:
3935 4045
3936```text theme={null}4046```text theme={null}
3937Cannot switch renderers in this session — it has restrictions a restart can't carry over (permission rules set for this session only). Nothing was changed. Running /tui fullscreen in a session started without them switches every later session too.4047Cannot switch renderers in this session — it has restrictions a restart can't carry over (permission rules set for this session only). Nothing was changed. Running /tui fullscreen in a session started without them switches every later session too.
3938```4048```
3939 4049
3940メッセージの括弧内に表示される可能性のある各理由:4050メッセージの括弧内に表示される可能性のある各理由:
3941 4051
3942* `launch flags: a custom system prompt, a tool allowlist, or restricted settings`: Claude Code が再起動後のプロセスに引き継がないフラグを付けてセッションを開始しました。これらのフラグには、[`--system-prompt`](/docs/ja/cli-reference#cli-flags)、`--system-prompt-file`、`--append-system-prompt-file`、[`--tools`](/docs/ja/cli-reference#cli-flags) の許可リスト、[`--setting-sources`](/docs/ja/cli-reference#cli-flags)、[`--permission-prompt-tool`](/docs/ja/cli-reference#cli-flags) が含まれます4052* `launch flags: a custom system prompt, a tool allowlist, or restricted settings`:Claude Code が再起動後のプロセスに引き継がないフラグを指定してセッションを開始しました。これらのフラグには、[`--system-prompt`](/docs/ja/cli-reference#cli-flags)、`--system-prompt-file`、`--append-system-prompt-file`、[`--tools`](/docs/ja/cli-reference#cli-flags) の許可リスト、[`--setting-sources`](/docs/ja/cli-reference#cli-flags)、[`--permission-prompt-tool`](/docs/ja/cli-reference#cli-flags) が含まれます
3943* `permission rules set for this session only`: フックまたは SDK の呼び出し元からの[権限の更新](/docs/ja/hooks#permission-update-entries)により、`session` を保存先とする拒否ルールまたは確認ルールが追加されました。セッションスコープの許可ルールでは拒否は発生しません。再起動するとそれらは破棄され、Claude Code は代わりに再度確認を求めます4053* `permission rules set for this session only`:フックまたは SDK の呼び出し元からの[権限の更新](/docs/ja/hooks#permission-update-entries)によって、`session` を宛先とする拒否ルールまたは確認ルールが追加されました。セッションスコープの許可ルールは拒否の原因になりません。再起動するとそれらは破棄され、Claude Code は代わりに再度確認を求めます
3944* `ask-before-running rules with no command-line form`: フックまたは SDK の呼び出し元からの権限の更新により、Claude Code が `--allowed-tools` と `--disallowed-tools` として引き継ぐルールに加えて、確認ルールが追加されました。確認ルール用のフラグは存在しません4054* `ask-before-running rules with no command-line form`:フックまたは SDK の呼び出し元からの権限の更新によって、Claude Code が `--allowed-tools` および `--disallowed-tools` として引き継ぐルールとともに確認ルールが追加されました。確認ルール用のフラグは存在しません
3945* `permission rules a command line cannot carry intact` および `added directories a command line cannot carry intact`: 権限の更新により、セッションの途中でルールまたはディレクトリパスが追加されました。再起動後のプロセスのコマンドラインでは、そのテキストを同じ値として引き継げません4055* `permission rules a command line cannot carry intact` および `added directories a command line cannot carry intact`:権限の更新によって、セッションの途中でルールまたはディレクトリパスが追加されました。再起動後のプロセスのコマンドラインでは、そのテキストを同じ値として引き継げません
3946 4056
3947**対処方法:**4057**対処方法:**
3948 4058
3949* それらの制限なしで開始したセッションで `/tui fullscreen` を実行するか、元に戻す場合は `/tui default` を実行します。Claude Code はそのセッションで [`tui` 設定](/docs/ja/settings-reference#tui)を保存します4059* それらの制限なしで開始したセッションで、`/tui fullscreen` を実行するか、元に戻すには `/tui default` を実行します。Claude Code はそこで [`tui` 設定](/docs/ja/settings-reference#tui)を保存します
3950 4060
3951<h3 id="claude-code-couldnt-restart">4061<h3 id="claude-code-couldnt-restart">
3952 Claude Code couldn't restart4062 Claude Code couldn't restart
3953</h3>4063</h3>
3954 4064
3955このメッセージで会話が保存されていると示されている場合、会話はディスク上にあり、中断したところから再開できます。Claude Code は、たとえば [`/tui`](/docs/ja/fullscreen#enable-fullscreen-rendering) の実行後にフルスクリーンレンダリングへの切り替えまたはその解除のために自身を再起動しようとしましたが、新しいプロセスを開始できなかったため、ステータス 1 で終了しました:4065このメッセージで会話が保存されていると示されている場合、会話はディスク上にあり、中断したところから再開できます。Claude Code は、たとえば [`/tui`](/docs/ja/fullscreen#enable-fullscreen-rendering) を実行した後にフルスクリーンレンダリングへの切り替えまたは解除を行うために自身を再起動しようとしましたが、新しいプロセスを開始できなかったため、ステータス 1 で終了しました:
3956 4066
3957```text theme={null}4067```text theme={null}
3958Claude Code couldn't restart. Your conversation is saved. Start Claude Code again and run /resume to pick it up.4068Claude Code couldn't restart. Your conversation is saved. Start Claude Code again and run /resume to pick it up.
3959```4069```
3960 4070
3961たとえば新しいセッションで `/tui` が最初の入力だったために、再起動時に再度開く会話がなかった場合、メッセージは `Claude Code couldn't restart. Start Claude Code again.` となります。4071`/tui` が新しいセッションでの最初の入力だった場合など、再起動時に再度開く会話がなかった場合、メッセージは `Claude Code couldn't restart. Start Claude Code again.` となります。
3962 4072
3963**対処方法:**4073**対処方法:**
3964 4074
3965* シェルで `claude` を再度実行します。メッセージで会話が保存されていると示されていた場合は、新しいセッションで [`/resume`](/docs/ja/sessions#resume-a-session) を実行し、その会話を選択します。一覧にない場合は、[セッションピッカーの範囲を広げます](/docs/ja/sessions#where-the-session-picker-looks)4075* シェルで `claude` を再度実行します。メッセージで会話が保存されていると示されていた場合は、新しいセッションで [`/resume`](/docs/ja/sessions#resume-a-session) を実行し、その会話を選択します。一覧にない場合は、[セッションピッカーの範囲を広げます](/docs/ja/sessions#where-the-session-picker-looks)
3966* 再起動が失敗し続ける場合は、シェルから [`claude --debug-file claude-debug.log`](/docs/ja/cli-reference#cli-flags) で Claude Code を起動します。そのセッションからの再起動が失敗すると、起動したディレクトリの `claude-debug.log` に、オペレーティングシステムのエラーを含む `Failed to relaunch:` 行が記録されます。[問題を報告する](#report-an-error)際は、その行を含めてください4076* 再起動が失敗し続ける場合は、シェルから [`claude --debug-file claude-debug.log`](/docs/ja/cli-reference#cli-flags) で Claude Code を起動します。そのセッションからの再起動が失敗すると、起動したディレクトリの `claude-debug.log` に、オペレーティングシステムのエラーを含む `Failed to relaunch:` 行が記録されます。[問題を報告する](#report-an-error)際にはその行を含めてください
3967 4077
3968<h3 id="couldnt-open-claude-desktop">4078<h3 id="couldnt-open-claude-desktop">
3969 Couldn't open Claude Desktop4079 Couldn't open Claude Desktop
3970</h3>4080</h3>
3971 4081
3972セッションで [`/desktop`](/docs/ja/desktop#coming-from-the-cli) またはそのエイリアス `/app` を実行したか、シェルで [`claude --desktop`](/docs/ja/cli-reference#cli-flags) を実行しましたが、Claude Code が Claude Desktop を開くために使うシステムコマンドが失敗しました。`/desktop` の後、セッションはターミナルにとどまります。`claude --desktop` は `Error:` プレフィックスなしでメッセージを出力し、ステータス 1 で終了します。4082セッション内で [`/desktop`](/docs/ja/desktop#coming-from-the-cli) またはそのエイリアス `/app` を実行したか、シェルで [`claude --desktop`](/docs/ja/cli-reference#cli-flags) を実行しましたが、Claude Code が Claude Desktop を開くために使用するシステムコマンドが失敗しました。`/desktop` の後はセッションはターミナルに残ります。`claude --desktop` は `Error:` プレフィックスなしでメッセージを出力し、ステータス 1 で終了します。
3973 4083
3974括弧内のテキストには、失敗したコマンドと、そのコマンドが出力した場合は終了ステータスおよびエラー出力の最初の行が示されます。macOS ではこの例のように `open` コマンド、Windows では `rundll32` コマンドです:4084括弧内のテキストには、失敗したコマンドが示され、終了ステータスとエラー出力の最初の行が生成された場合はそれらも示されます。macOS ではこの例のようにそのコマンドは `open`、Windows では `rundll32` です:
3975 4085
3976```text theme={null}4086```text theme={null}
3977Error: Couldn't open Claude Desktop (`open` exited 1: LSOpenURLsWithRole() failed for the URL claude://resume?session=<session-id> with error -10814). Open Claude Desktop and try again.4087Error: Couldn't open Claude Desktop (`open` exited 1: LSOpenURLsWithRole() failed for the URL claude://resume?session=<session-id> with error -10814). Open Claude Desktop and try again.
3978```4088```
3979 4089
3980**対処方法:**4090**対処方法:**
3981 4091
3982* Claude Desktop を自分で開いてから、`/desktop` または `claude --desktop` を再度実行します4092* Claude Desktop を自分で開いてから、`/desktop` または `claude --desktop` を再度実行します
3983* 失敗したコマンドの完全なエラー出力を確認するには、`/debug` でデバッグログをオンにして `/desktop` を再度実行するか、`claude --desktop --debug-file <path>` を実行してから、デバッグログを確認します4093* 失敗したコマンドの完全なエラー出力を確認するには、`/debug` でデバッグログをオンにして `/desktop` を再度実行するか、`claude --desktop --debug-file <path>` を実行してから、デバッグログを確認します
3984 4094
3985v2.1.285 より前では、メッセージの末尾は `Open Claude Desktop and run /desktop again.` でした。v2.1.275 より前では、メッセージは `Failed to open Claude Desktop. Please try opening it manually.` で、何が失敗したかは示されませんでした。4095v2.1.285 より前では、メッセージは `Open Claude Desktop and run /desktop again.` で終わっていました。v2.1.275 より前では、メッセージは `Failed to open Claude Desktop. Please try opening it manually.` で、何が失敗したかは示されていませんでした。
3986 4096
3987<h3 id="terminal-setup-left-your-zed-keymap-unchanged">4097<h3 id="terminal-setup-left-your-zed-keymap-unchanged">
3988 /terminal-setup で Zed のキーマップが変更されなかった4098 /terminal-setup で Zed のキーマップが変更されなかった
3989</h3>4099</h3>
3990 4100
3991Zed で [`/terminal-setup`](/docs/ja/terminal-config#enter-multiline-prompts) を実行しましたが、Claude Code は Zed の `keymap.json` の更新を完了できなかったため、ファイルを元のままにしました。4101Zed で [`/terminal-setup`](/docs/ja/terminal-config#enter-multiline-prompts) を実行しましたが、Claude Code は Zed の `keymap.json` の更新を完了できなかったため、ファイルをそのままにしました。
3992 4102
3993各メッセージにはキーマップのパスが示され、最後に自分で追加するためのキーボードショートカットのブロックが記載されます:4103各メッセージにはキーマップのパスが示され、最後に自分で追加するためのキーボードショートカットのブロックが示されます:
3994 4104
3995```text theme={null}4105```text theme={null}
3996Couldn't update your Zed keymap, so it was left unchanged.4106Couldn't update your Zed keymap, so it was left unchanged.
3998{ "context": "Terminal", "bindings": { "shift-enter": ["terminal::SendText", "\u001b\r"] } }4108{ "context": "Terminal", "bindings": { "shift-enter": ["terminal::SendText", "\u001b\r"] } }
3999```4109```
4000 4110
4001メッセージの最初の行に原因が示されます:4111メッセージの最初の行に原因が示されます:
4002 4112
4003* `Couldn't read your Zed keymap, so it was left unchanged.`: ファイルの権限などが原因で、Claude Code がファイルを読み取れませんでした4113* `Couldn't read your Zed keymap, so it was left unchanged.`:ファイルの権限などの理由で、Claude Code がファイルを読み取れませんでした
4004* `Your Zed keymap isn't a readable list of keybindings, so it was left unchanged.`: ファイルは読み取れましたが、`//` コメントや末尾のカンマを許容しても、キーボードショートカットのブロックの配列として解析できません4114* `Your Zed keymap isn't a readable list of keybindings, so it was left unchanged.`:ファイルは読み取れましたが、`//` コメントと末尾のカンマを許容しても、キーボードショートカットのブロックの配列として解析できません
4005* `Couldn't back up your Zed keymap; not modifying it.`: Claude Code がファイルをその隣の `.bak` バックアップにコピーできなかったため、何も変更しませんでした4115* `Couldn't back up your Zed keymap; not modifying it.`:Claude Code がファイルを隣の `.bak` バックアップにコピーできなかったため、何も変更しませんでした
4006* `Couldn't update your Zed keymap, so it was left unchanged.`: マージした結果が、そのキーボードショートカットを含む有効なキーマップとして検証できなかったため、Claude Code は書き込まずに破棄しました。キーが重複したキーボードショートカットのブロックがあると、これが発生することがあります4116* `Couldn't update your Zed keymap, so it was left unchanged.`:マージ結果が、そのキーボードショートカットを含む有効なキーマップであると検証できなかったため、Claude Code は書き込まずに破棄しました。キーが重複しているキーボードショートカットのブロックがあると、これが発生することがあります
4007 4117
4008**対処方法:**4118**対処方法:**
4009 4119
4010* メッセージに記載されたブロックを、メッセージが示すパスにある `keymap.json` のトップレベルの配列にコピーします4120* メッセージのブロックを、メッセージに示されたパスにある `keymap.json` のトップレベルの配列にコピーします
4011* `isn't a readable list of keybindings` の場合は、構文エラーを修正するか、ファイルのトップレベルの値を配列にしてから、`/terminal-setup` を再度実行します4121* `isn't a readable list of keybindings` の場合は、構文エラーを修正するか、ファイルのトップレベルの値を配列にしてから、`/terminal-setup` を再度実行します
4012 4122
4013v2.1.247 より前では、`/terminal-setup` は `//` コメントや末尾のカンマを使った Zed のキーマップを解析できず、ファイル全体を自身のキーボードショートカットのみに置き換えたうえで、そのキーボードショートカットがインストールされたと報告していました。以前のバージョンによって置き換えられたキーマップを復元するには、[複数行のプロンプトを入力する](/docs/ja/terminal-config#enter-multiline-prompts)で説明されている `.bak` バックアップファイルを使用します。4123v2.1.247 より前では、`/terminal-setup` は `//` コメントや末尾のカンマを使用した Zed のキーマップを解析できず、ファイル全体を自身のキーボードショートカットだけに置き換えたうえで、インストール済みと報告していました。以前のバージョンによって置き換えられたキーマップを復元するには、[複数行プロンプトを入力する](/docs/ja/terminal-config#enter-multiline-prompts)で説明されている `.bak` バックアップファイルを使用します。
4014 4124
4015<h3 id="skill-usage-reports-are-not-available-on-this-connection">4125<h3 id="skill-usage-reports-are-not-available-on-this-connection">
4016 Skill usage reports are not available on this connection4126 Skill usage reports are not available on this connection
4017</h3>4127</h3>
4018 4128
4019スマートフォンまたはブラウザから [Remote Control](/docs/ja/remote-control) 経由で [`/skill-doctor`](/docs/ja/skills#find-unused-skills) を実行しました。Claude Code はスキルの使用状況レポートを Remote Control 経由で送信せず、代わりに次のメッセージで応答します:4129スマートフォンまたはブラウザから [Remote Control](/docs/ja/remote-control) 経由で [`/skill-doctor`](/docs/ja/skills#find-unused-skills) を実行しました。Claude Code はスキルの使用状況レポートを Remote Control 経由では送信せず、代わりに次のメッセージで応答します:
4020 4130
4021```text theme={null}4131```text theme={null}
4022Skill usage reports are not available on this connection.4132Skill usage reports are not available on this connection.
4023```4133```
4024 4134
4025**対処方法:**4135**対処方法:**
4026 4136
4027* セッションが実行されているマシンのターミナルで `/skill-doctor` を実行するか、そこで `claude -p "/skill-doctor"` を実行します4137* セッションが実行されているマシンのターミナルで `/skill-doctor` を実行するか、そのマシンで `claude -p "/skill-doctor"` を実行します
4028 4138
4029<h3 id="custom-output-styles-cant-be-selected-over-remote-control">4139<h3 id="custom-output-styles-cant-be-selected-over-remote-control">
4030 Custom output styles can't be selected over Remote Control4140 Custom output styles can't be selected over Remote Control
4031</h3>4141</h3>
4032 4142
4033[Remote Control](/docs/ja/remote-control) 経由でモバイルアプリまたは Web から [`/output-style`](/docs/ja/output-styles#change-your-output-style) を実行したか、セッションに中継されたメッセージでそのコマンドが届きました。このようなターンはアカウント所有者からのものではない可能性があるため、Claude Code はそのターンでは[組み込みスタイル](/docs/ja/output-styles#built-in-output-styles)のみを一覧表示および選択し、コマンドがスタイルを一覧表示したとき、または指定した名前を認識できなかったときには、常にこの通知を追加します。[カスタムスタイル](/docs/ja/output-styles#create-a-custom-output-style)の名前には、存在しない名前と同じ応答が返されます:4143[Remote Control](/docs/ja/remote-control) 経由でモバイルアプリまたは Web から [`/output-style`](/docs/ja/output-styles#change-your-output-style) を実行したか、セッションに中継されたメッセージでコマンドが届きました。このようなターンはアカウント所有者からのものではない可能性があるため、Claude Code はそのターンでは[組み込みスタイル](/docs/ja/output-styles#built-in-output-styles)のみを一覧表示・選択し、コマンドがスタイルを一覧表示したとき、または指定した名前を認識しなかったときには必ずこの通知を追加します。[カスタムスタイル](/docs/ja/output-styles#create-a-custom-output-style)の名前には、存在しない名前と同じ応答が返されます:
4034 4144
4035```text theme={null}4145```text theme={null}
4036Custom output styles can't be selected over Remote Control or from a relayed message. Select one in the session itself, or pick a built-in style here.4146Custom output styles can't be selected over Remote Control or from a relayed message. Select one in the session itself, or pick a built-in style here.
4037```4147```
4038 4148
4039**対処方法:**4149**対処方法:**
4040 4150
4041* `/output-style concise` などの組み込みスタイルを選択します4151* `/output-style concise` などの組み込みスタイルを選択します
4042* カスタムスタイルを使用するには、プロジェクトの `.claude/settings.local.json` で [`outputStyle`](/docs/ja/settings-reference#outputstyle) を設定するか、セッション自体にターミナルがある場合はそこで `/output-style <style>` を実行します4152* カスタムスタイルを使用するには、プロジェクトの `.claude/settings.local.json` で [`outputStyle`](/docs/ja/settings-reference#outputstyle) を設定するか、セッション自体のターミナルがある場合はそこで `/output-style <style>` を実行します
4043 4153
4044<h3 id="output-styles-are-saved-to-local-settings-which-this-session-doesnt-load">4154<h3 id="output-styles-are-saved-to-local-settings-which-this-session-doesnt-load">
4045 Output styles are saved to local settings which this session doesn't load4155 Output styles are saved to local settings which this session doesn't load
4046</h3>4156</h3>
4047 4157
4048設定ソースから `local` が除外されているセッションで、`/output-style <style>` または `/config outputStyle=<style>` を使って[出力スタイル](/docs/ja/output-styles)を切り替えようとしました。たとえば、[`settingSources`](/docs/ja/agent-sdk/typescript#options) に `"local"` が含まれていない [Agent SDK](/docs/ja/agent-sdk/typescript) セッションや、`local` を含まない [`--setting-sources`](/docs/ja/cli-reference#cli-flags) の値で開始した CLI セッションが該当します。どちらのコマンドもスタイルを `.claude/settings.local.json` に保存しますが、このようなセッションはこのファイルを読み込まないため、Claude Code は効果のない設定を書き込む代わりに拒否します:4158設定ソースから `local` が除外されているセッションで、`/output-style <style>` または `/config outputStyle=<style>` を使って[出力スタイル](/docs/ja/output-styles)を切り替えようとしました。たとえば、[`settingSources`](/docs/ja/agent-sdk/typescript#options) から `"local"` が除外されている [Agent SDK](/docs/ja/agent-sdk/typescript) のセッションや、`local` を除外した [`--setting-sources`](/docs/ja/cli-reference#cli-flags) の値で開始した CLI セッションがこれに該当します。どちらのコマンドもスタイルを `.claude/settings.local.json` に保存しますが、このようなセッションはそのファイルを読み込まないため、Claude Code は効果のない設定を書き込む代わりに拒否します:
4049 4159
4050```text theme={null}4160```text theme={null}
4051Output styles are saved to local settings (.claude/settings.local.json), which this session doesn't load, so the style can't be changed here.4161Output styles are saved to local settings (.claude/settings.local.json), which this session doesn't load, so the style can't be changed here.
4052```4162```
4053 4163
4054**対処方法:**4164**対処方法:**
4055 4165
4056* セッションの設定ソースに `local` を追加してから、再度切り替えます4166* セッションの設定ソースに `local` を追加してから、再度切り替えます
4057* プロジェクトの `.claude/settings.json` や `~/.claude/settings.json` など、セッションが読み込む設定ファイルで [`outputStyle`](/docs/ja/settings-reference#outputstyle) キーを設定します。TypeScript SDK では、代わりにインラインの `settings` オブジェクト内で `outputStyle` を設定します。[出力スタイルを有効にする](/docs/ja/agent-sdk/modifying-system-prompts#activate-an-output-style)を参照してください4167* プロジェクトの `.claude/settings.json` や `~/.claude/settings.json` など、セッションが読み込む設定ファイルで [`outputStyle`](/docs/ja/settings-reference#outputstyle) キーを設定します。TypeScript SDK では、代わりにインラインの `settings` オブジェクト内で `outputStyle` を設定します。[出力スタイルを有効にする](/docs/ja/agent-sdk/modifying-system-prompts#activate-an-output-style)を参照してください
4060 /recap only runs when you ask for it yourself4170 /recap only runs when you ask for it yourself
4061</h3>4171</h3>
4062 4172
4063[`/recap`](/docs/ja/interactive-mode#session-recap) のリクエストがユーザー自身の入力からのものではありませんでした。Slack、Teams、または[プロジェクト](/docs/ja/claude-projects)のスレッドからセッションに中継されたメッセージ、あるいは[ルーティン](/docs/ja/routines)や別のプログラムが送信したプロンプトで届きました。4173[`/recap`](/docs/ja/interactive-mode#session-recap) のリクエストが自分自身の入力から来たものではありませんでした。Slack、Teams、または[プロジェクト](/docs/ja/claude-projects)のスレッドからセッションに中継されたメッセージで届いたか、[ルーティン](/docs/ja/routines)や別のプログラムが送信したプロンプトで届きました。
4064 4174
4065中継されたメッセージは、ユーザー自身が書いたものであっても通知の対象になります。Claude Code は、中継されたメッセージや自動化されたメッセージが、セッションを実行しているアカウントの持ち主からのものかどうかを判断できないため、要約の代わりに次の通知で応答します:4175中継されたメッセージは、自分で書いたものであっても通知の対象になります。Claude Code は、中継されたメッセージや自動化されたメッセージが、セッションを実行しているアカウントの所有者からのものかどうかを判別できないため、要約の代わりにこの通知で応答します:
4066 4176
4067```text theme={null}4177```text theme={null}
4068/recap only runs when you ask for it yourself in this session: from the terminal, the Claude app or claude.ai/code, or over Remote Control. A message relayed from Slack, Teams or a project thread, or sent by a routine or another program, can't request it.4178/recap only runs when you ask for it yourself in this session: from the terminal, the Claude app or claude.ai/code, or over Remote Control. A message relayed from Slack, Teams or a project thread, or sent by a routine or another program, can't request it.
4069```4179```
4070 4180
4071`claude -p` に渡した `/recap` や、独自の [Agent SDK](/docs/ja/agent-sdk/overview) アプリケーションが起動したセッションに送信した `/recap` は、ユーザー自身の入力として扱われます。4181`claude -p` に渡した `/recap` や、自分の [Agent SDK](/docs/ja/agent-sdk/overview) アプリケーションが起動したセッションに送信した `/recap` は、自分自身の入力として扱われます。
4072 4182
4073**対処方法:**4183**対処方法:**
4074 4184
4075* 自分でセッションを開き、そこで `/recap` を実行します。セッションのターミナル、[デスクトップアプリ](/docs/ja/desktop)や[モバイルアプリ](/docs/ja/mobile)、[claude.ai/code](https://claude.ai/code)、または [Remote Control](/docs/ja/remote-control) 経由で実行できます4185* セッションを自分で開き、そこで `/recap` を実行します。ターミナル、[デスクトップアプリ](/docs/ja/desktop)または[モバイルアプリ](/docs/ja/mobile)、[claude.ai/code](https://claude.ai/code)、または [Remote Control](/docs/ja/remote-control) 経由で実行できます
4076* ルーティンや別のプログラムが送信した場合は、そのプロンプトから `/recap` を削除します4186* ルーティンや別のプログラムが送信した場合は、そのプロンプトから `/recap` を削除します
4077 4187
4078<h2 id="plugin-errors">4188<h2 id="plugin-errors">
4124 マーケットプレイス名は予約名の別のスペルです4234 マーケットプレイス名は予約名の別のスペルです
4125</h3>4235</h3>
4126 4236
4127マーケットプレイスの名前自体は予約名ではありませんが、Claude Code はそれを別のスペルとして扱います。[予約名](/docs/ja/plugins/marketplace-reference#reserved-name-spellings)は、どのスペルが予約名として数えられるかをリストします。Claude Code は、マーケットプレイスを追加するときにそのような名前を拒否します:4237マーケットプレイスの名前自体は予約名ではありませんが、Claude Code はそれを予約名の別のスペルとして扱います。[予約名](/docs/ja/plugins/marketplace-reference#reserved-name-spellings)は、どのスペルが予約名として数えられるかをリストします。Claude Code は、マーケットプレイスを追加するときにそのような名前を拒否します:
4128 4238
4129```text theme={null}4239```text theme={null}
4130Failed to add marketplace: "claude.code.plugins" is another spelling of "claude-code-plugins", a reserved marketplace name.4240Failed to add marketplace: "claude.code.plugins" is another spelling of "claude-code-plugins", a reserved marketplace name.
5499 5609
5500* 通知に示されたスクリプトを実行するフックの `command` で、パスを二重引用符で囲みます。JSON ファイルでは、`"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/check.py\""` のように記述します。5610* 通知に示されたスクリプトを実行するフックの `command` で、パスを二重引用符で囲みます。JSON ファイルでは、`"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/check.py\""` のように記述します。
5501 5611
5612<h3 id="instruction-file-not-loaded">
5613 Instruction file not loaded
5614</h3>
5615
5616対話セッションの会話ビューに表示されるこの通知は、存在する[メモリファイル](/docs/ja/memory#how-claude-md-files-load)が読み込まれなかったことを意味します。読み取り制限が適用されています。
5617
5618```text theme={null}
5619Instruction file not loaded (a Read deny rule covers it):
5620path: .claude/rules/shared.md
5621```
5622
5623括弧内には理由が示されます。例:
5624
5625* **`a Read deny rule covers it`**: `Read` の[拒否ルール](/docs/ja/permissions#read-and-edit)が、記述されたとおりのファイルのパス、またはそのファイル上のリンクの参照先に一致している
5626* **`it's read from outside your working directories, where reads are blocked`**: [`permissions.blockReadsOutsideWorkingDirectories`](/docs/ja/settings-reference#permissions-blockreadsoutsideworkingdirectories) がオンの状態で、ファイルが[作業ディレクトリ](/docs/ja/settings-reference#permissions-blockreadsoutsideworkingdirectories)の外に解決される
5627* **`where it leads couldn't be worked out`**: たとえば、ファイルが直接または他のリンクを介して自分自身に戻るリンクになっている
5628
5629Claude がサブディレクトリ内のファイルを操作する際にそのサブディレクトリ独自のメモリファイルを読み込めない場合、同じ行がそのターン中に会話に表示されます。行に示されているよりも多くのファイルが保留された場合は、最後の行に `and 3 more instruction files not loaded` のように残りの件数が示されます。
5630
5631**対処方法:**
5632
5633* 制限が意図したものであれば、何もする必要はありません。セッションはそのファイルの指示なしで実行されます。
5634* `a Read deny rule covers it` のために保留されたファイルを読み込むには、[そのルールを削除するか範囲を狭めます](/docs/ja/permissions#manage-permissions)。その後、新しいセッションを開始します。
5635* `it's read from outside your working directories, where reads are blocked` のために保留されたファイルを読み込むには、そのファイルまたはリンク先を作業ディレクトリ内に移動します。その後、新しいセッションを開始します。
5636* `where it leads couldn't be worked out` のために保留されたファイルを読み込むには、そのファイルが自分自身に戻るリンクになっていないか確認します。そうなっている場合は、リンクを存在するファイルに向けるか、その場所に通常のファイルを置きます。その後、新しいセッションを開始します。
5637
5638v2.1.292 より前では、通知は同じ行の理由の後の末尾にファイル名を示していました。
5639
5502<h3 id="a-skill-command-or-workflow-wasnt-loaded-because-its-name-is-reserved">5640<h3 id="a-skill-command-or-workflow-wasnt-loaded-because-its-name-is-reserved">
5503 名前が予約されているため、スキル、コマンド、またはワークフローが読み込まれなかった5641 名前が予約されているため、スキル、コマンド、またはワークフローが読み込まれなかった
5504</h3>5642</h3>
5683 5821
5684v2.1.257 より前では、`/mcp` の **Reconnect** や再有効化によって、セッション中のポリシー更新でブロックされたサーバーに接続できてしまう場合がありました。5822v2.1.257 より前では、`/mcp` の **Reconnect** や再有効化によって、セッション中のポリシー更新でブロックされたサーバーに接続できてしまう場合がありました。
5685 5823
5824<h3 id="mcp-server-name-is-reserved">
5825 MCP サーバー名が予約されている
5826</h3>
5827
5828このメッセージは、組み込みサーバーの名前など、Claude Code が予約している名前を持つ MCP サーバーの 1 つを示しています。
5829
5830```text theme={null}
5831"workspace" is a reserved MCP server name and was not loaded
5832```
5833
5834**対処方法:**
5835
5836* サーバーを定義している場所でサーバーの名前を変更します。たとえば、`workspace` を `my-workspace` に変更します
5837* 避けるべき他の予約名については、[MCP の設定の警告](/docs/ja/mcp#configuration-warnings)を参照してください
5838
5686<h3 id="managed-settings-document-could-not-be-parsed">5839<h3 id="managed-settings-document-could-not-be-parsed">
5687 Managed settings document could not be parsed5840 Managed settings document could not be parsed
5688</h3>5841</h3>
5737 5890
5738v2.1.285 より前では、claude.ai または Claude Console の認証情報でサインインしたセッションのみがこのメッセージで終了し、オペレーティングシステムによって読み取りが拒否された場合にもこのメッセージが表示されていました。5891v2.1.285 より前では、claude.ai または Claude Console の認証情報でサインインしたセッションのみがこのメッセージで終了し、オペレーティングシステムによって読み取りが拒否された場合にもこのメッセージが表示されていました。
5739 5892
5893<h3 id="managed-settings-hooks-not-loaded">
5894 Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded
5895</h3>
5896
5897`-p` の実行で表示されるこの stderr のブロックは、[管理設定](/docs/ja/managed-settings)のソースに Claude Code が読み込めないフックエントリが含まれていることを意味します。そのフックは実行されず、ある行でソースの `hooks` フィールドが無視されたと示されている場合は、そのソースのフックはいずれも実行されません。
5898
5899各行には、ソース、該当する場合はフィールド、および問題(不明なフックの `type` や、`hooks` キーの外で宣言されたフックなど)が示されます。
5900
5901```text theme={null}
5902Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded; fix or remove each entry:
5903 <source> (<field>): <message>
5904```
5905
5906**対処方法:**
5907
5908* ソースを管理している場合は、ブロックに一覧表示された各エントリを修正または削除します。`hooks` の下で Claude Code が想定する形式については、[フックの設定](/docs/ja/hooks#configuration)を参照してください。
5909* 行のソースが `parent managed settings` となっている場合は、Claude Code を起動したアプリケーションがそのエントリを[親設定](/docs/ja/managed-settings#parent-settings-from-embedding-hosts)として渡しているため、そのアプリケーションの開発者に報告してください
5910* それ以外の場合は、ブロックを管理者に送ってください
5911
5912v2.1.300 より前では、`-p` の実行ではこのケースが `Managed settings failed to load; policies from the failed source are NOT in effect:` ヘッダーの下に一覧表示されていました。
5913
5740<h3 id="otelheadershelper-failed">5914<h3 id="otelheadershelper-failed">
5741 otelHeadersHelper failed5915 otelHeadersHelper failed
5742</h3>5916</h3>
5955 6129
5956v2.1.233 より前では、Claude Code は認識しないモデル ID でリクエストを送信しても、行を書き込んでいませんでした。6130v2.1.233 より前では、Claude Code は認識しないモデル ID でリクエストを送信しても、行を書き込んでいませんでした。
5957 6131
6132<h3 id="sandbox-allow-entries-are-ignored-under-a-managed-lock">
6133 管理ロック下ではサンドボックスの許可エントリが無視される
6134</h3>
6135
6136`/status` と `claude doctor` に表示されるこの警告は、管理設定で [`allowManagedReadPathsOnly`](/docs/ja/settings-reference#sandbox-filesystem-allowmanagedreadpathsonly) または [`allowManagedDomainsOnly`](/docs/ja/settings-reference#sandbox-network-allowmanageddomainsonly) が設定されているため、警告に示されたファイル内の [`allowRead`](/docs/ja/settings-reference#sandbox-filesystem-allowread) または [`allowedDomains`](/docs/ja/settings-reference#sandbox-network-alloweddomains) エントリが適用されないことを意味します。
6137
6138```text wrap theme={null}
6139sandbox.filesystem.allowRead is ignored — managed settings set allowManagedReadPathsOnly, so only allowRead paths from managed settings are honored. The 3 entries in /home/you/.claude/settings.json will NOT apply (see https://code.claude.com/docs/en/settings#sandbox-settings).
6140```
6141
6142ネットワークのロックの場合、警告には `sandbox.network.allowedDomains` と `allowManagedDomainsOnly` が示され、`only allowed domains (and WebFetch domain rules) from managed settings are honored` と表示されます。
6143
6144**対処方法:**
6145
6146* この警告に対処する必要はありません
6147* それらのパスやドメインが必要で、組織の管理設定でロックが設定されている場合は、それらを管理設定に追加するよう管理者に依頼してください。示されたファイルからもエントリを削除するまで、警告は表示されたままになります。
6148* 警告を解消するには、示されたファイルからエントリを削除します。プロジェクトの `.claude/settings.json` など共有しているファイルの場合は、ロックのないチームメイトのためにエントリを残し、警告を表示させたままにしておくこともできます。
6149
5958<h3 id="stale-sandbox-mask-files-left-by-a-killed-session">6150<h3 id="stale-sandbox-mask-files-left-by-a-killed-session">
5959 Stale sandbox mask files left by a killed session6151 Stale sandbox mask files left by a killed session
5960</h3>6152</h3>