Skip to content

[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 #38537

Description

@pkohei

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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:

  1. Use the user-selected model (claude-opus-4-6[1m]) for classification, or
  2. Use a standard Sonnet model without inheriting the [1m] context suffix (e.g., claude-sonnet-4-6 instead of claude-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

  1. Set the model to Opus 4.6 with 1M context: /model → select claude-opus-4-6[1m]
  2. Enable auto mode (Shift+Tab or defaultMode: "auto" in settings)
  3. Attempt any task that requires a Bash tool call (e.g., run a shell command)
  4. 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

Metadata

Metadata

Labels

area:corebugSomething isn't workinghas reproHas detailed reproduction steps

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions