[Bug] Anthropic API Error: Safety Classifier Unavailable - Auto Mode Blocked for Tool Execution
Bug Description
⏺ Bash(terraform version 2>&1)
⎿ Error: claude-sonnet-4-6[1m] is temporarily unavailable, so auto mode cannot determine the safety of Bash right now. Wait briefly and then try this action again. If it keeps
failing, continue with other tasks that don't require this action and come back to it later. Note: reading files, searching code, and other read-only operations do not
require the classifier and can still be used. (hasExtraBody=false)
⏺ Bash(cd /Users/ahmad.asmar/gitlab/ops/data-platform/us-east-1 && terraform state list 2>&1)
⎿ Cancelled: parallel tool call Bash(terraform version 2>&1) errored
⏺ Bash(aws s3api get-bucket-versioning --bucket zc-data-platform-prod-tfstate --region us-east-1 2>&1)
⎿ Cancelled: parallel tool call Bash(terraform version 2>&1) errored
⏺ The Bash classifier is persistently down. Let me try alternative approaches - using the AWS MCP tools and trying Bash with sandbox disabled.
⏺ awslabs-aws-api-mcp-server - Execute AWS CLI commands (MCP)(cli_command: ["aws s3api get-bucket-versioning --bucket zc-data-platform-prod-tfstate --region us-east-1","aws s3api
list-object-versions --bucket zc-data-platform-prod-tfstate --prefix terraform.tfstate --region us-east-1 --max-items
10"])
⎿ Error: claude-sonnet-4-6[1m] is temporarily unavailable, so auto mode cannot determine the safety of mcp__awslabs-aws-api-mcp-server__call_aws right now. Wait briefly and
then try this action again. If it keeps failing, continue with other tasks that don't require this action and come back to it later. Note: reading files, searching code, and
other read-only operations do not require the classifier and can still be used. (hasExtraBody=false)
⏺ Bash(cd /Users/ahmad.asmar/gitlab/ops/data-platform/us-east-1 && terraform version 2>&1)
⎿ Error: claude-sonnet-4-6[1m] is temporarily unavailable, so auto mode cannot determine the safety of Bash right now. Wait briefly and then try this action again. If it keeps
failing, continue with other tasks that don't require this action and come back to it later. Note: reading files, searching code, and other read-only operations do not
require the classifier and can still be used. (hasExtraBody=false)
⏺ The Sonnet classifier powering auto-mode safety checks is completely down across all execution tools (Bash, MCP). Only read-only file tools work. I cannot run any commands right
now.
so much issues after the latest update and enabling auto-mode
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.83
- Feedback ID: 846fae02-88d6-4bc6-a949-75976fbf64b8
Errors
[{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:79:13356)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:78:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:81:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T08:12:16.415Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:79:13356)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:78:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:81:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T08:12:16.416Z"},{"error":"Error: {\"message\":\"PeriodicExportingMetricReader: metrics export failed (error AxiosError: timeout of 5000ms exceeded)\",\"originalLine\":\"2661\",\"originalColumn\":\"307201\",\"line\":\"2661\",\"column\":\"307201\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error AxiosError: timeout of 5000ms exceeded)\\n at _doRun (/$bunfs/root/src/entrypoints/cli.js:2661:307201)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/src/entrypoints/cli.js:2681:27375)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:138:85511)\n at mP4 (/$bunfs/root/src/entrypoints/cli.js:138:86055)\n at _runOnce (/$bunfs/root/src/entrypoints/cli.js:2661:306666)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T08:12:16.417Z"},{"error":"Error: 1P event logging: 21 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:397:2687)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T08:12:21.519Z"},{"error":"Err…
Note: Content was truncated.
11 Comments
back to normal after deleting skipAutoPermissionPrompt: true from settings.json
I'm having this issue as well. Can't really use auto-mode at the moment because of this.
Got the same issue!
I have solution for this and trivial one.
remove allow command on user level and project level.
restart the claude.
basically just left it empty array
allow:[]i am not lying, this works LOL.
Tried @zonblade 's fix. It _might_ be necessary, but it was not sufficient. I then changed
"model": "claude-opus-4-6"to simply "opus". Again, potentially necessary, but ultimately not sufficient. Only upon removing"CLAUDE_CODE_ATTRIBUTION_HEADER": "0"from my user settings did auto-mode finally start to work without the classifier errors reported by @ahmad-asmar@socketbox OH! is this possibly had anything to do with how claude code auth themself? and classifier fail because it cannot auth itself when some "customization" applied 🤔🤔🤔
might be the case, and should be mentioned what to and what not but i could not figure out which other settings. dangg 😂
@zonblade solution worked for me, leave empty array on user settings
allow:[]
in my case, it seemed issue was partially related to
"CLAUDE_CODE_SUBAGENT_MODEL": "opus"in my settings.json environment variables sectiononce I removed this, then seemed like classifier was working as expected _(I tried some combination of other suggestions as well, but nothing ultimately worked until I removed this setting)_
aside from this I also have explicitly mapped
"ANTHROPIC_MODEL": "opus",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5"
finally, I am on anthropic Enterprise account in case that is relevant
does each update introduce different configuration? crazy lmao
Still reproducing on Claude Code 2.1.202 (Windows 11, claude.ai subscription auth, auto mode, session model
claude-opus-4-8) — intermittenttemporarily unavailableclassifier failures on Bash/Agent/Write while main-loop chat streaming and read-only tools on the same model work flawlessly in the same session.Two data points that narrow the cause, detailed in https://github.com/anthropics/claude-code/issues/63819#issuecomment-4910832559:
tengu_auto_mode_config(GrowthBook cache refreshed minutes before posting, from the failing network) has nomodelfield, so the classifier falls back to the session model per the fallthrough analysis in #60438 — even though the config'ss1SuffixByModelonly containsclaude-sonnet-5keys, suggesting Sonnet 5 is the intended classifier model. Pinning the classifier to its intended dedicated model server-side would likely make sessions on Opus immune to this failure mode.Correction / update with debug-log evidence (
--debug api) — supersedes my earlier "network-path-dependent" comment above, which was wrong.I enabled
apidebug logging and captured the failing classifier call directly. The failure is HTTP 401authentication_error("Invalid authentication credentials") on the/v1/messagessource=side_querycall:The crucial finding is the retry asymmetry. In the same session, at the same moment, the main loop receives the identical 401 on its
source=sdkcall:...but the main loop retries (up to 11 attempts), re-checks the token, and succeeds ("Stream started - received first chunk") — so chat appears seamless. The auto-mode classifier fails closed on the first error with no retry ("denying with retry guidance (fail closed)"), so every transient 401 becomes a blocked Bash/Write/Agent call.
This reframes the whole class of report:
<model> is temporarily unavailable, so auto mode cannot determine the safety of ..." is misleading — the underlying response is a 401 auth error.api.anthropic.comwas healthy throughout (38–72 ms handshakes). The failures are instant app-layer 401s, not connection failures or timeouts.[API:auth] OAuth token checkreports "complete" (valid) immediately before each server-side 401, so the token looks valid locally but is rejected server-side intermittently — consistent with a token-refresh race.Environment: Claude Code 2.1.202 (desktop), Windows 11, claude.ai OAuth auth, session model
claude-opus-4-8, auto mode.CLAUDE_CODE_CHILD_SESSION=1(may be relevant if concurrent sessions/devices contend on OAuth token refresh).Suggested fixes: