claude-code - 💡(How to fix) Fix [BUG] `--model` flag silently ignored in interactive sessions (works in `--print` only)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The --model <model> flag — documented as "Model for the current session" — is honored in --print (non-interactive) mode but silently ignored in interactive mode. The interactive session falls back to the user's default model regardless of what is passed.

Root Cause

The --model <model> flag — documented as "Model for the current session" — is honored in --print (non-interactive) mode but silently ignored in interactive mode. The interactive session falls back to the user's default model regardless of what is passed.

Fix Action

Workaround

None for interactive use. --print mode honors --model correctly.

Code Example

# Non-interactive: --model is honored
$ claude --model 'claude-opus-4-6[1m]' --print "What is your exact model ID per your system prompt?"
claude-opus-4-6[1m]

# Interactive: --model is ignored, falls back to default
$ claude --model 'claude-opus-4-6[1m]'
# Banner shows: "Opus 4.7 (1M context) · Claude Team"
> What is your exact model ID per your system prompt?
> claude-opus-4-7[1m]
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code v2.1.153 (native install)
  • macOS Darwin 25.5.0 (zsh)
  • Plan: Claude Team

Description

The --model <model> flag — documented as "Model for the current session" — is honored in --print (non-interactive) mode but silently ignored in interactive mode. The interactive session falls back to the user's default model regardless of what is passed.

Reproduction

# Non-interactive: --model is honored
$ claude --model 'claude-opus-4-6[1m]' --print "What is your exact model ID per your system prompt?"
claude-opus-4-6[1m]

# Interactive: --model is ignored, falls back to default
$ claude --model 'claude-opus-4-6[1m]'
# Banner shows: "Opus 4.7 (1M context) · Claude Team"
> What is your exact model ID per your system prompt?
> claude-opus-4-7[1m]

/model inside the interactive session also reports the default ("Kept model as Opus 4.7 (1M context) (default)"), confirming the --model arg never takes effect.

Expected

--model should set the model for the current interactive session, matching the documented help text and the behavior in --print mode.

Actual

Interactive sessions silently ignore --model and use the user's default model.

Impact

There is no way to launch an interactive session on a non-default model (e.g., Opus 4.6) without changing the global default first. The /model picker also no longer lists older models like Opus 4.6, so --model is the only documented route — and it doesn't work interactively.

Workaround

None for interactive use. --print mode honors --model correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING