[FEATURE] Allow configuring a separate model for auto mode classifier via environment variable

Status Open
Maintainer reply ✓ Yes — bcherny
Activity 4 comments · opened Jun 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Currently, Claude Code's auto mode classifier automatically defaults to whichever main model is currently active in the session. For instance, when using a high-capability model like Claude 4.8 Opus as the primary model, the sub-task classification and routing decisions are also executed by Claude 4.8 Opus.

<img width="2019" height="1118" alt="Image" src="https://github.com/user-attachments/assets/f79cd40f-0345-4cab-b1f3-e0f5b5d8ea42" />

This behavior introduces two major pain points:

  1. Performance Bottleneck (Slowness): Using a heavy, high-parameter model like Opus for simple intent classification or step routing drastically slows down the automated loop execution.
  2. Exorbitant Costs: Running every minor classification check through Opus 4.8 rapidly consumes API tokens, making the workflow highly cost-inefficient.

Furthermore, Anthropic's own engineering blog post (https://www.anthropic.com/engineering/claude-code-auto-mode) highlights that Sonnet 4.6 already delivers highly effective and accurate results when acting as the auto mode permission classifier. Since Sonnet 4.6 is substantially faster and much more cost-effective, forcing the classifier to run on a heavy primary model like Opus 4.8 creates unnecessary overhead and prevents users from achieving the optimal balance of speed and cost outlined in your documentation.

Proposed Solution

We propose introducing a dedicated configuration option or environment variable—such as CLAUDE_CODE_AUTO_MODE_MODEL—to decouple the auto mode classifier from the main coding model.

For example, a user could configure their environment as follows:

export CLAUDE_CODE_AUTO_MODE_MODEL=claude-sonnet-4-6

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

3 Comments

bcherny collaborator · 1 month ago

Thanks for the detailed request. Good news on the main pain point: in recent versions the auto mode classifier no longer runs on your session's model by default. It runs on Claude Sonnet 5 (validated on the session's first auto-mode request and then pinned for the session), so an Opus 4.8 main model does not mean Opus 4.8 classification. It only falls back to the session's model when Sonnet 5 is unavailable to you (for example when your session model is Sonnet 4.6 or availableModels excludes Sonnet 5), or to an Opus model when the session runs on Fable 5.

Details: https://code.claude.com/docs/en/permission-modes#how-the-classifier-evaluates-actions

A user-facing override to pick an arbitrary classifier model is not exposed today, so we'll leave this open to track that part.

🤖 Generated with Claude Code

gaby · 1 month ago

@bcherny It should be configurable though. Because Anthropic keeps changing which model is the classifier.

The same issue with the timeout, it should be configurable. When processing large changes the 60s default timeout is too aggressive. See https://github.com/anthropics/claude-code/issues/91410

Anisotropic · 1 month ago

It shouldn't just be configurable. It should also be possible to directly set current selected model as classifier. Everyone has a different list of models; companies, for example, like to limit this list.

Showing cached comments. Read the full discussion on GitHub ↗