Skip to main content
This page lists runtime errors Claude Code displays and how to recover from each one, plus what to check when responses seem off without an error. For installation errors such as command not found or TLS failures during setup, see Troubleshoot installation and login. Except for Wrapper and IDE errors, which the launching program prints rather than Claude Code itself, these errors and recovery commands apply across the CLI, the Desktop app, and cloud sessions, since all three wrap the same Claude Code CLI. For other surface-specific issues, see the troubleshooting section on that surface’s page.
Claude Code calls the Claude API for model responses, so most runtime errors map to an underlying API error code. This page covers what each error means inside Claude Code and how to recover. For the raw HTTP status code definitions, see the Claude Platform error reference.

Find your error

Match the message you see to a section below.

Automatic retries

Claude Code retries transient failures up to 10 times with exponential backoff before showing you an error. It doesn’t always retry a failure that arrives partway through Claude’s response. When you see one of the errors on this page, Claude Code has already made whatever retries apply to that failure. Claude Code retries these failures:
  • Server errors, overloaded responses, and request timeouts that arrive before any of Claude’s response has streamed.
  • A server error or overloaded response that arrives after Claude has finished thinking but before it has started any text or tool call. Claude Code retries a server error at that point up to two times. Before v2.1.284, Claude Code ended the turn with the error at that point.
  • Dropped connections. When a connection drops partway through a request before Claude has completed any part of its response, including its thinking, Claude Code re-issues the request with the same backoff and the turn continues, even if some text had already started streaming. When it drops after Claude has finished thinking but before it has started any text or tool call, Claude Code instead re-issues the request up to two times in quick succession, and ends the turn with Connection lost before a response was produced if the connection keeps dropping at that point.
  • A connection that Claude Code detects was broken by your computer going to sleep partway through a request. Claude Code counts it as a dropped connection under the rules above; once the retry label names the specific reason, it reads Connection lost while your computer was asleep, and if the turn ends after Claude has finished thinking but before any text or tool call, the message reads Your computer went to sleep before a response was produced.
  • A stalled response stream, when the response headers have arrived but none of Claude’s response has arrived, or when Claude has finished thinking but hasn’t started any text or tool call: Claude Code aborts the stalled connection and streams the request again at most once. If the response stalls a second time after Claude has finished thinking but before any text or tool call, Claude Code ends the turn with The response stalled before a response was produced.
  • A streaming request the API never answers with response headers, on a connection where the first-byte deadline runs. At the deadline, Claude Code aborts the request and re-sends it within the retry budget. If the deadline fires for a re-send too, the turn ends with No response from API. When you set CLAUDE_CODE_RETRY_WATCHDOG, Claude Code keeps re-sending within the budget instead.
  • A streaming response that the API’s output content filter stops before Claude has either finished thinking or started any text or tool call. Claude Code re-sends the request once, within the retry budget, and shows Output blocked by content filtering policy if the filter stops the second response too.
  • Temporary 429 throttles, but not a gateway’s spend-limit 429, which isn’t a throttle; see Spend limit reached.
    • When you’re signed in with a claude.ai subscription, this includes 429 throttles that don’t carry your plan’s quota headers. Before v2.1.199, Claude Code retried those throttles only for API key and Enterprise sign-ins.
  • A request rejected because the input plus max_tokens exceeds the context limit. Re-sending it unchanged would fail the same way, so Claude Code retries with a reduced max_tokens, and stops retrying and compacts instead in two cases:
    • When no reduction can fit, for example when the conversation itself nearly fills the context window.
    • When a retry can’t shrink max_tokens any further. Before v2.1.218, Claude Code could re-send a reduced request that still didn’t fit, such as when the extended thinking budget exceeded the remaining context, until the retry budget ran out.
  • A response that says Claude is calling a tool but contains no tool call. Claude Code retries by asking Claude for the tool call, up to two times. If both retries fail the same way, you see The model's tool call could not be parsed (retry also failed). and the turn ends. To try again, send another message. Before v2.1.307, Claude Code retried once before ending the turn.
  • An expired or missing Google Cloud credential on Google Cloud’s Agent Platform, or AWS credentials that fail to load on your machine. Claude Code discards its cached credentials and retries up to two times, then reports the error so you can re-authenticate right away, as described under Could not load AWS or Google Cloud credentials. Before v2.1.228, Claude Code retried a failing Google Cloud credential through the full retry budget before showing the error.
  • A 401 or 403 from the Anthropic API, directly or through an LLM gateway, while an apiKeyHelper script supplies the credential. Claude Code re-runs the script and retries with its fresh output, within the full retry budget. When the script itself fails on the re-run, Claude Code shows Your apiKeyHelper script is failing instead.
Before v2.1.227, Connection lost before a response was produced read Connection closed while thinking, before producing a response and The response stalled before a response was produced read Response stalled while thinking, before producing a response. Claude Code doesn’t retry these failures:
  • A TLS certificate validation failure, such as a TLS-inspecting proxy, a missing NODE_EXTRA_CA_CERTS bundle, or an expired certificate. Claude Code reports the error on the first attempt, so you can fix the certificate setup right away; see SSL certificate errors. Claude Code still retries transient TLS conditions such as a handshake timeout. Before v2.1.199, Claude Code retried certificate failures through the full retry budget before showing the error.
  • A server error, dropped connection, or stalled stream that arrives after Claude has completed a block of text or a tool call, or has started one after finishing its thinking, but before it finishes the response. Claude Code doesn’t re-run the request, because that could execute the same tool calls twice. It keeps what Claude completed, runs any tool calls Claude finished, and continues the turn from their results. For what you see in an interactive session and in a non-interactive one, read The response above may be incomplete. Before v2.1.199, Claude Code discarded the partial output and reported the whole turn as an error when a server error arrived mid-stream.
  • A failure that arrives after Claude has finished the response: nothing needs retrying, so Claude Code keeps the complete response and ends the turn normally.
  • An Amazon Bedrock streaming response with an unexpected content-type, because the gateway or proxy rewriting the response would rewrite the retry the same way. Requires Claude Code v2.1.208 or later.
  • A non-streaming retry of a failed streaming request that gets a success status but no Claude API message in the body. Claude Code ends the turn with that error.
  • A request that your organization’s policy check denied, which surfaces as an API Error: line carrying the denial message. Your organization’s administrators set up the check with Inference hooks, a Claude Enterprise feature, and the message ends with the instructions they configured, or by default tells you to contact them. Claude Code doesn’t re-send the denied request to the same model or to a fallback model, because the denial is about the request’s content rather than the model. Before v2.1.239, Claude Code could re-send a denied request, without streaming or on a configured fallback model, before showing you the denial.

What you see while Claude Code retries or waits

While retrying, the spinner shows a Retrying in Ns · attempt x/y countdown after an error label. The label names the specific reason from the first attempt for failures you can act on right away: the network is down, a TLS handshake failed, or you hit a rate limit. For other errors it reads API error at first. As of v2.1.198 it switches to the specific reason from the third attempt, or on the final attempt when CLAUDE_CODE_MAX_RETRIES allows fewer than three; earlier versions switch only on the final attempt. As of v2.1.198, the usual spinner tip is suppressed during retries. Once the error reason is revealed, if the failure is a 529 overload the line below the countdown also names where to check service status: status.claude.com on the Anthropic API, or the provider or gateway host named in the message on other configurations.

Waiting for API response

The Waiting for API response · will retry in … · check your network banner means that Claude Code has waited at least 20 seconds without receiving any data for a request. The request hasn’t failed yet: the countdown runs to the point where Claude Code aborts the stalled connection. If the abort happens:
  • Before Claude has completed a block of text or a tool call, or started one after finishing its thinking, Claude Code retries the request or ends the turn with an error. Automatic retries says which stalls it retries and how many times.
  • After Claude has completed a block of text or a tool call, or started one after finishing its thinking, but before Claude has finished the response, Claude Code keeps what Claude completed, continues the turn from any tool calls Claude finished, and shows The response above may be incomplete. In a non-interactive session, and for a subagent’s response in any session, Claude Code may first prompt Claude to continue the response; that entry says when it does and when you still see the notice there.
  • After Claude finished the response, Claude Code ends the turn normally.
The banner clears on its own once data resumes or a retry succeeds. If it reappears on every attempt, treat it as a network issue. If you connect through a gateway, see The waiting banner comes and goes behind a gateway. Before v2.1.185, the banner appeared after 10 seconds with different wording.

The waiting banner comes and goes behind a gateway

If the Waiting for API response banner comes and goes while Claude thinks and you connect through a gateway, update Claude Code to v2.1.309 or later. The banner appears after 45 seconds without data on these connections: Before v2.1.309, the banner appeared after 20 seconds on these connections.

Tune retry behavior

You can tune retry behavior with these environment variables:

When the retry watchdog stops retrying

With CLAUDE_CODE_RETRY_WATCHDOG set, Claude Code stops retrying a request outside fast mode on responses such as these:
  • Spend limit: a 429 for a usage-credit spend limit, or for a gateway spend cap that resets on a schedule.
  • Exhausted usage credits: an out-of-credits 429 with no anthropic-ratelimit-unified-overage-status or anthropic-ratelimit-unified-representative-claim header.
  • Marked not retryable: a 429 or 529 with the x-should-retry: false header. Claude Code still retries the request when the API couldn’t check your usage credits.
The spend limit and usage credit cases require Claude Code v2.1.239 or later. The x-should-retry case requires v2.1.311 or later.

How long a non-streaming attempt waits

A non-streaming attempt ends at its request timeout or at the body idle timeout, whichever comes first:
  • Request timeout: API_TIMEOUT_MS when you set a positive value, otherwise 300 seconds in a local session.
  • Body idle timeout where it runs: by default, 5 to 6 minutes without a response, however high you set API_TIMEOUT_MS.

Server errors

Most of these errors come from the inference provider: Anthropic’s service on the Anthropic API, and the service behind that provider’s endpoint on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or a custom gateway. Auto mode cannot determine the safety of an action and Agent terminated early due to an API error also cover causes on your side, such as an Amazon Bedrock account that can’t invoke the classifier model or a subagent that hit a usage limit.

API Error: 500 Internal server error

Claude Code shows the status code and the API’s error message for any 5xx response. The example below shows a 500 response on the Anthropic API:
The trailing sentence names where to check service health and varies by provider. Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry configurations name that provider’s service status. A custom ANTHROPIC_BASE_URL names the gateway host. A 5xx from the API itself indicates an unexpected failure inside the API. It is not caused by your prompt, settings, or account. When a proxy, load balancer, or gateway answers with an HTML error page, the message shows the status code and the page’s title, such as API Error: 502 Bad Gateway. For a page with no title, the message shows the status code and its standard name instead. Before v2.1.281, the status code was dropped when the page had a title, and the page’s raw markup was printed when it had none. What to do:
  • Check status.claude.com, or the provider status page named in the message, for active incidents
  • Wait a minute, then send your message again. Your original message is still in the conversation, so for a long prompt you can type try again instead of pasting the whole thing.
  • If ANTHROPIC_BASE_URL points at an LLM gateway and every request fails this way, check that your gateway and its upstream accept tool search fields. By default, Claude Code sends defer_loading tool fields and tool_reference blocks, with the anthropic-beta header that enables them. Before v2.1.304, tool search was off behind a gateway unless you turned it on with ENABLE_TOOL_SEARCH.
  • If the error persists with no posted incident, run /feedback so Anthropic can investigate with your request details. See Report an error if /feedback is unavailable in your environment.

API Error: Repeated 529 Overloaded errors

The API is temporarily at capacity across all users. Claude Code has already retried several times before showing this message:
The trailing sentence varies by provider in the same way as the 500 error above. A 529 is not your usage limit and doesn’t count against your quota. What to do:
  • Check status.claude.com, or the provider status page named in the message, for capacity notices
  • Try again in a few minutes
  • Run /model and switch to a different model to keep working, since capacity is tracked per model. Claude Code prompts you to do this when one model is under particularly high load, for example Opus is experiencing high load, please use /model to switch to Sonnet. On Fable models the message names Fable. In a session the Claude Desktop app runs, such as the Code tab or Cowork, the message reads Opus is experiencing high load. Switch to Sonnet. and you switch models with the app’s model picker.

Request timed out

The API didn’t respond before the connection deadline.
The default request timeout is 10 minutes. If you set API_TIMEOUT_MS to 0, this request timeout is off. The first-byte deadline and the body idle timeout don’t turn off when you set 0, so a streaming request still runs under whichever of them apply to your connection. A non-streaming attempt keeps its 300-second limit in a local session and can still end with this message. What to do:
  • If every request fails with this message and you set API_TIMEOUT_MS to 0, check claude --version. On a version before v2.1.305, update Claude Code or set a positive value.
  • Retry the request
  • If the message continues past Request timed out and names an environment variable, do what the message says. No data arrived means the body idle timeout ended the request.
  • With a slow network or proxy on a version before v2.1.328, raise API_TIMEOUT_MS. If the request still times out, update to v2.1.328 or later and set any variable the next timeout message names. If you can’t update, set API_FORCE_IDLE_TIMEOUT to 0.
  • If timeouts are frequent and your network is otherwise healthy, see Network and connection errors below

No response from API

Claude Code sent a streaming request, and the API returned no response headers within the deadline for the first byte. Claude Code aborts such a request rather than wait for the full API_TIMEOUT_MS request timeout, and sends it again if the retry budget allows. When the deadline passes for the retry too, the turn ends with this message, which shows how long each attempt waited. If you set CLAUDE_CODE_RETRY_WATCHDOG, Claude Code keeps retrying under the budget described in Tune retry behavior instead of ending the turn.
Claude Code sets the first attempt’s wait for response headers and the retry’s wait separately:
  • First attempt: CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS when you set it to 1 or more, clamped to between 10 seconds and 30 minutes. Otherwise Claude Code uses the byte-level watchdog timeout listed in Streaming idle watchdogs, so the variables that change that timeout change this wait too. Either way, Claude Code adds one second for every 32KB of request body.
  • Retry: one second less than API_TIMEOUT_MS, just under 10 minutes by default, so that the retry can outlast a proxy or gateway that holds the response until generation completes. On Amazon Bedrock, the retry uses the same deadline as the first attempt, and the message shows one duration instead of two. Except on Amazon Bedrock, if you set API_TIMEOUT_MS to 0, the retry waits 10 minutes plus one second per 32KB, or as long as the first attempt if that’s longer.
Neither wait exceeds one second less than a positive API_TIMEOUT_MS, and a positive API_TIMEOUT_MS under 11 seconds turns the deadline off. The byte-level watchdog starts only once the response headers arrive, so a response that stops sending bytes after that follows the stalled-stream rules instead of this deadline. In a Claude apps gateway session, this deadline runs only when you turn it on by setting CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS to 1 or more. What to do:
  • Send your message again. Your original message is still in the conversation, so for a long prompt you can type try again instead of pasting the whole thing.
  • If it repeats, treat it as a network or proxy problem.
  • If a proxy or gateway on your network holds responses until they complete, raise API_TIMEOUT_MS so the retry waits longer. On Amazon Bedrock, raise CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS as well.
  • If the first attempt keeps timing out and the retry then succeeds, raise CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS so the first attempt waits long enough too.
Before v2.1.242, Claude Code waited for the full API_TIMEOUT_MS request timeout, 10 minutes by default, before failing an unanswered streaming request. Before v2.1.261, the retry waited the same deadline as the first attempt and the message showed no durations. Before v2.1.307, Claude Code ignored CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS in a Claude apps gateway session.

The response above may be incomplete

A streaming request failed while the response was still in progress, after Claude had completed a block of text or a tool call, or had started one after finishing its thinking. Re-sending the request could run the same tool calls twice, so Claude Code keeps the output Claude completed and appends this notice instead of discarding the turn. Which variant you see names the cause:
  • Server error mid-response: a mid-stream overloaded or 5xx server error. This variant requires Claude Code v2.1.199 or later; before then that case discarded the partial output and reported the whole turn as an error.
  • Connection lost mid-response: the connection dropped. You also see this variant when a proxy or gateway ends the response body cleanly before the response has finished.
  • Your computer went to sleep mid-response: Claude Code detected that your computer went to sleep while the response was streaming. Once your computer wakes, Claude Code treats the connection as broken and stops reading from it.
  • Part of the response never arrived: a stream event was dropped between the API and Claude Code, so a later event referenced content that never arrived. Before v2.1.281, this case ended the turn with API Error: Content block not found.
  • The response stream was malformed: an event arrived for a content block that had already finished, or an event arrived damaged. A damaged event is one whose data isn’t valid JSON, whose content is missing, or whose content doesn’t match the event’s type. Before v2.1.284, the parser’s raw error, such as one beginning API Error: JSON Parse error, appeared instead when an event with invalid JSON arrived after Claude had completed its thinking, a block of text, or a tool call.
  • The response stopped arriving: the connection stayed open but stopped delivering data, so the streaming idle watchdog aborted it. Before v2.1.222, Claude Code could also report this failure on gateway connections reached through ANTHROPIC_BASE_URL or ANTHROPIC_AWS_BASE_URL while the server’s keep-alive pings were still arriving, because it counted only parsed response events there; upgrading stops those spurious timeouts on those routes. Gateways reached through a provider base URL such as ANTHROPIC_BEDROCK_BASE_URL aren’t wrapped by the byte watchdog; see Streaming idle watchdogs.
Before v2.1.227, Connection lost mid-response read Connection closed mid-response and The response stopped arriving read Response stalled mid-stream. When a dropped, duplicated, or damaged stream event arrives before Claude has started any text or tool call, you don’t see this notice:
  • If Claude had completed only its thinking, Claude Code re-issues the request. When the re-issued streams break the same way, the turn ends with Part of the response never arrived and no response was produced. Try again. or The response stream was malformed and no response was produced. Try again.
  • If nothing had completed, Claude Code re-sends the request without streaming instead. If you turned that fallback off with CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK, the turn ends with API Error: Content block not found for a dropped event or API Error: Content block already closed for a duplicated one. For a damaged event with the fallback off, the turn ends with API Error: Stream event unreadable or the parser’s raw error.
In four cases, Claude Code handles the failure without showing this notice right away:
  • Earlier in the response, Claude Code either retries the failure or ends the turn with a different error. See Automatic retries.
  • When one of these failures arrives after Claude has finished the response, Claude Code keeps the complete response and ends the turn normally, without this notice. Before v2.1.222, Claude Code showed this notice when the connection dropped or stalled after the response finished, and reported the turn as an error even though the response was complete.
  • In a non-interactive session, such as a -p run, an Agent SDK run, or a cloud session, you don’t have to send continue yourself when the cut-off response is in the main conversation and contains text but no tool calls: Claude Code keeps the partial output and prompts Claude to continue from where it stopped, up to three times in a row. You see this notice for such a response only once Claude Code has used up those continuations. Before v2.1.246, Claude Code ended a non-interactive turn with this notice on the first cut-off.
  • In a subagent, whether the session is interactive or not: when its cut-off response contains text but no tool calls, Claude Code prompts the subagent to continue. The notice becomes the subagent’s last message only once those continuations are used up. Before v2.1.257, a subagent showed this notice on the first cut-off.
What to do:
  • In an interactive session, read the response that remains on screen: Claude Code keeps every block Claude completed before the error, but discards an interrupted final block when the turn ends, so the final sentences or tool calls may be missing. Reply with continue to have Claude pick up from its last completed block.
  • In non-interactive mode (-p):
    • With the default text output, Claude Code prints the last completed block of text it still holds from earlier in the turn, followed by this message. When it holds none, Claude Code prints this message alone, for example because Claude Code compacted the conversation mid-turn and cleared that text. Before v2.1.219, Claude Code printed only this message in -p text output and dropped the response it had already produced.
    • With --output-format json or stream-json, Claude Code reports this message in the result field.
    • To continue the turn once the connection is stable, resume the session and send continue as described in Continue conversations.

Auto mode cannot determine the safety of an action

The model that auto mode uses to classify actions couldn’t produce a decision, so auto mode didn’t approve the action automatically. The message you see depends on how the classifier failed. When the classifier model is unavailable:
In an interactive session, a dim Not run · auto mode's check had no usable answer row appears under the tool call instead of this message. The row can also replace a message saying the server gave no verdict or, outside a remote session, one starting Auto mode could not evaluate. Press Ctrl+O to read its message in the transcript viewer. Before v2.1.296, the message appeared as a red error. When Claude Code can determine the failure category, it names the category in parentheses after temporarily unavailable, for example <model> is temporarily unavailable (rate-limited), so auto mode cannot determine the safety of <tool> right now. The categories are (rate-limited), (overloaded), (server error), (timed out), and (connection failed). If (timed out) or (connection failed) repeats, check your connection; see Unable to connect to API. Before v2.1.229, the message never named a category and read Wait briefly and then try this action again. When no category fits, the message appears with no category in parentheses; more than one failure produces that form. On Amazon Bedrock, including the Mantle endpoint, it also appears when your AWS account can’t invoke the model named in the message, and that failure repeats on every retry until your account is granted access to the model. What to do:
  • Retry after a few seconds; Claude sees the same message and usually retries on its own. A transient failure is unrelated to auto mode eligibility; you don’t need to change settings
  • If retries keep failing, continue with read-only tasks and come back to the blocked action later
  • On Amazon Bedrock, if the message returns on every retry, check that your account can invoke the model it names: for standard Amazon Bedrock models, confirm your IAM policy allows invoking it; for Mantle model IDs, contact your AWS account team
  • If the message returns on every retry and names the model you set in CLAUDE_CODE_AUTO_MODE_MODEL, check that the API or cloud provider your session runs on serves that model ID. If it doesn’t, set the variable to a model ID it serves, or unset the variable to use the default classifier model.
When a classifier request fails because your OAuth token expired or was rotated by another session, Claude Code refreshes the token and retries the request once, so a routine token expiry doesn’t surface as this message. Before v2.1.216, an expired or rotated token failed each classifier request, and auto mode denied every checked action with this message until the token was refreshed. When the classifier returned an unparseable response:
What to do:
  • Retry the action; this usually succeeds on the next attempt
  • Run claude --debug and repeat the action for details in the debug log
When a separate API safety check blocked the classifier request because of earlier conversation content:
Claude Code denies the action but tells Claude this isn’t a judgment that the action is unsafe, and to continue with other tasks rather than retry. These denials don’t count toward auto mode’s pause thresholds. In a non-interactive -p run, Claude Code doesn’t stop the run. What Claude receives depends on where it requested the action:
  • To a background subagent in a -p run without --input-format stream-json, Claude Code returns an error result containing Agent aborted: auto mode classifier request refused by the safety safeguard in headless mode
  • Everywhere else, including interactive sessions and the main conversation of a -p run, Claude Code returns that denial to Claude
Before v2.1.225, Claude Code counted these refusals toward the pause thresholds and returned the same rejection message as a genuine classifier block. What to do:
  • This is not a decision about your action. Content already in your conversation triggered a safety filter on the API when auto mode sent the conversation to the classifier
  • Retrying will not help; the same conversation content will trigger the filter again
  • In an interactive session, switch to a different permission mode so you can approve the action when prompted
  • Start a fresh conversation without the triggering content
When the conversation is too long for Claude Code’s classifier request and Claude Code can’t compact it on its own:
What happens to the action depends on where Claude requested it:
  • In an interactive session, auto mode falls back to a normal permission prompt for that action so you can approve or deny it manually
  • To a background subagent in a non-interactive -p run without --input-format stream-json, Claude Code returns an error result containing Agent aborted: auto mode classifier transcript exceeded context window in headless mode, and the run continues
  • Elsewhere in a -p run without a --permission-prompt-tool, there is no prompt to fall back to, so the action doesn’t run and the run continues
What to do:
  • In an interactive session, approve or deny the action in the prompt that appears
  • In an interactive session, run /compact to reduce the conversation size so subsequent actions fit within the classifier window again

The server returned no safety verdict

Under server-side classifier review, auto mode denies an action when the server gives no verdict for it. The denial names a category in parentheses when Claude Code can determine one, such as (timed out):
The rest of the message tells Claude whether one retry can help. Before some of these denials, Claude Code waits so that Claude’s next attempt doesn’t follow at once. During the wait in an interactive session, the spinner shows Auto mode check unavailable with a countdown, and pressing Esc interrupts the turn. After ten responses in a row with no verdict, auto mode stops the turn:
Some denials don’t count toward the ten, including a denial from a hook or mod’s change. The stop message appears in a different place in each kind of session:
  • In an interactive session, the message appears as a warning in the transcript and the turn ends
  • In a non-interactive -p run, the run ends and reports an execution error. With the default text output, the message prints on stderr.
  • When a subagent hit the limit, the subagent stops before finishing, and Claude receives whatever it produced with a note that auto mode stopped it
What to do:
  • In an interactive session, press Ctrl+O to read the denial text in the transcript viewer.
  • If the denial names (the conversation is too long for the check), run /compact at the Claude Code prompt to shorten the conversation. Until the conversation is shorter, sending another message gets the same denial. If you turned auto-compact off, turn it back on so Claude Code compacts on its own next time.
  • Send another message to have Claude try again. The count of responses starts over.
  • If the stop repeats and your requests go through an LLM gateway or proxy, check whether it cuts streaming responses short or rewrites them. Server-side classifier review says which gateway behavior causes denials, and the gateway compatibility guide lists what to pass through unchanged.
  • Set CLAUDE_CODE_AUTO_MODE_SERVER=0 before you start Claude Code to use its own classifier requests instead. Before v2.1.281, Claude Code didn’t read the variable on a direct connection to the Anthropic API.
  • To approve the actions yourself instead, switch out of auto mode
Before v2.1.280, Claude Code denied each action from a response without a verdict immediately and never stopped the turn. Before v2.1.302, on a direct connection to the Anthropic API, Claude Code didn’t compact a conversation that had grown too long for the server’s check.

a hook changed this call's input after auto mode reviewed it

This denial means a hook or mod changed the call’s input after the server reviewed it, so the review doesn’t cover what would run. It isn’t a judgment that the action is unsafe. Later calls in the same Claude response can be denied with this reason:
Claude can then issue each denied call again so the server reviews it. If a permission prompt opens, answer it. You don’t need to do anything else unless Claude says in its reply that auto mode couldn’t check the call. Then stop the change or approve the call yourself, and ask Claude to try the call again:
  • Stop the change: turn off the hook or mod that changed the call or an earlier call in the same Claude response, or ask your administrator to turn it off. To look for a hook, run /hooks at the Claude Code prompt. In a terminal session, run /plugin to see the active mods.
  • Approve the call yourself: switch to Manual mode

Was not reviewed and did not run

A was not reviewed and did not run denial means the conversation is too long for the auto mode classifier to check the action, so the action didn’t run. Claude Code returns this message to Claude:
If the compaction fails, later actions the classifier can’t check get one of two other messages: What to do:
  • If the compaction the message announces succeeds, you don’t need to do anything.
  • If you see either of those two messages, run /compact at the Claude Code prompt to shorten the conversation yourself. If you turned auto-compact off, turn it back on so Claude Code compacts on its own next time.

Agent terminated early due to an API error

A subagent’s API request failed terminally, for example because a usage limit was reached or retries for a server error ran out, so the subagent stopped before finishing its task. This message requires Claude Code v2.1.199 or later; before then the API error text was returned to Claude as if it were the subagent’s result.
What to do:
  • Match the error detail after the colon to its own section on this page, such as Usage limits or Server errors, and follow that section’s steps
  • Once the underlying error clears, ask Claude to retry the task or resume the subagent
When a rate limit, overload, or server error interrupts a foreground subagent that already produced text output, Claude receives that partial output marked as incomplete instead of this error. A subagent whose only output was tool calls gets this error too; in v2.1.199 that shape returned an empty partial result instead. See API errors in subagents.

Usage limits

Most errors in this section mean a quota tied to your account or plan has been reached. Three work differently: Server is temporarily limiting requests is a server-side throttle unrelated to your plan quota, Usage credits required for 1M context is an entitlement check rather than an exhausted quota, and