[BUG] Auto mode safety classifier uses claude-sonnet-4-6[1m] when Opus 4.6 1M is selected, causing Bash to fail when Sonnet 1M is unavailable
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using Opus 4.6 with 1M context (claude-opus-4-6[1m]) as the selected model, enabling auto mode causes all Bash tool calls to fail immediately with the following error:
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 error message reveals that the auto mode safety classifier is attempting to use claude-sonnet-4-6[1m] (Sonnet with 1M context) rather than the user-selected model. The bug appears to be that the classifier switches from Opus to Sonnet but incorrectly inherits the [1m] context suffix. When claude-sonnet-4-6[1m] is unavailable (even though claude-opus-4-6[1m] is available), every Bash command fails.
Switching the active model from Opus 4.6 1M to Sonnet 4.6 (without the 1M suffix) resolves the issue, which confirms the root cause is the classifier receiving an unavailable model ID.
What Should Happen?
Auto mode's safety classifier should either:
- Use the user-selected model (
claude-opus-4-6[1m]) for classification, or - Use a standard Sonnet model without inheriting the
[1m]context suffix (e.g.,claude-sonnet-4-6instead ofclaude-sonnet-4-6[1m])
Bash tool calls in auto mode should succeed as long as the user's selected model is available.
Error Messages/Logs
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)
Steps to Reproduce
- Set the model to Opus 4.6 with 1M context:
/model→ selectclaude-opus-4-6[1m] - Enable auto mode (Shift+Tab or
defaultMode: "auto"in settings) - Attempt any task that requires a Bash tool call (e.g., run a shell command)
- Observe the error — auto mode classifier tries
claude-sonnet-4-6[1m]which is unavailable
Workaround: Switch to Sonnet 4.6 (non-1M) via /model, which allows the classifier to function correctly.
Claude Model
Opus (with 1M context)
Is this a regression?
I don't know
Claude Code Version
2.1.81 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
- The
~/.claude.jsonconfig showstwoStageClassifier: true, confirming a two-stage classifier is in use - The classifier appears to copy the context suffix (
[1m]) from the user-selected model when switching to Sonnet, resulting in an invalid/unavailable model ID - Read-only operations (file reads, code search) are unaffected, as stated in the error message — only Bash execution is blocked
- Related issues: #33587, #36483 (auto mode unavailable, different root cause)
13 Comments
Nice root cause analysis. The
[1m]suffix being passed through to the classifier model ID is clearly the bug — the classifier should strip context-window variants before selecting its model.Additional workaround if you want to keep using Opus 4.6 1M without auto mode:
Switch to
defaultpermission mode and use PreToolUse hooks for safety instead of the auto-mode classifier:Then add hooks to auto-approve commands you trust:
This gives you the same safety-check-then-approve flow as auto mode, but runs locally against your own rules instead of calling a classifier model. No model availability dependency.
100% having the same issues and been unable to use auto mode bcause of this
Also got the same issue;
I investigated this with Claude Code by downloading the npm package (
@anthropic-ai/claude-code@2.1.84), formattingcli.jswith prettier, and tracing the classifier model selection logic.Root Cause
The classifier model is selected by a function (minified as
UEqin 2.1.84) that works like this:The
is1MModel()check simply tests/\[1m\]/iagainst the current model string. When you're onclaude-opus-4-6[1m], it matches, so the classifier gets"claude-sonnet-4-6[1m]"— a model that isn't currently available via the API. The two constants are hardcoded:The fix would be to fall back to
"claude-sonnet-4-6"when the 1M variant is unavailable, rather than failing the classifier entirely.There's no env var or local setting to override the classifier model — the only override is a server-side feature flag (
tengu_auto_mode_config.model).Workaround: Binary Patch (use at your own risk)
For the compiled binary install (macOS arm64, version 2.1.84), the JS assignment
j4$="claude-sonnet-4-6[1m]"appears twice in the embedded source. You can patch it and re-codesign:Any chance we can get this in? I'm not able to use auto mode with Opus 1M @bcherny
Confirmed that this above fix actually fixed the problem on my system
Update: The patch is no longer necessary. Anthropic has fixed this server-side via the
tengu_auto_mode_configGrowthBook feature flag.Inspecting
~/.claude.json→cachedGrowthBookFeaturesshows:The
modelfield overrides the hardcoded classifier model selection (the buggygetClassifierModel()function from my earlier comment), so the brokenclaude-sonnet-4-6[1m]constant is never reached. Interestingly, they switched the classifier to Opus 4.6 1M rather than Sonnet.If you applied the binary patch from my earlier comment, you can safely restore from backup.
same problem, but mine is "Error: claude-opus-4-6[1m] is temporarily unavailable"
Seeing the same bug pattern with Opus 4.7 (
claude-opus-4-7) on 2026-04-16 — suggests the GrowthBooktengu_auto_mode_config.modeloverride still points at an Opus variant that can go unavailable, just a newer one now.Exact error from attempting a
Write:Platform: darwin (macOS). Session model: Opus 4.7.
The underlying design issue from the OP is unresolved: any single-model classifier selection is a single point of failure for auto mode. A fallback to
claude-sonnet-4-6(or the current non-1M Sonnet) when the primary classifier model is unavailable would eliminate this class of outage entirely, rather than patching the GrowthBook flag every time a new flagship model ships.literally unusable. how can my opus burn through tokens if it gets blocked every single turn?
The opus-4-6 and opus-4-7 unavailable errors should be fixed in Claude Code v2.1.112.
Reproduced on Claude Code v2.1.112 — the version @shawnm-anthropic stated should fix this — so the regression is not fully resolved.
Then on the next turn, a
Bashcall forclaude --versionwas also blocked with the sameclaude-opus-4-7 is temporarily unavailablemessage — only when I retried did Bash succeed.claude-opus-4-7[1m], 1M context shown in environment)Edit, thenBashon the immediate retryNotably, the previously-working text in the OP and earlier comments was about
claude-sonnet-4-6[1m]/claude-opus-4-6[1m]. Here the classifier model name in the error message is the plainclaude-opus-4-7(no[1m]suffix), which suggests the GrowthBooktengu_auto_mode_config.modelflag has been bumped toclaude-opus-4-7, but that target itself becomes intermittently unavailable and there is still no fallback path.The architectural concern from earlier comments stands: pinning the safety classifier to a single flagship model means every transient capacity issue on that model takes auto mode offline globally. A graceful fallback (e.g.,
claude-opus-4-7→claude-sonnet-4-6→ static allow-list for safe verbs) would prevent the next recurrence the next time a flagship model has a hiccup.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.