[Bug] Claude ignores --model flag in prompt mode, uses Sonnet instead of selected model
Bug Description
When claude is started from cli as claude --model haiku -p 'Hello Claude' then it uses Sonnet limits (and probably works as Sonnet).
What is weird when sent started as claude --model haiku /model command shows Haiku as selected
claude --model haiku
▐▛███▜▌ Claude Code v2.1.29
▝▜█████▛▘ Haiku 4.5 · Claude Max
▘▘ ▝▝ ~/projects/rate-a-recruiter
❯ /model
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Select model
Switch between Claude models. Applies to this session and future Claude Code sessions. For other/previous model
names, specify with --model.
1. Default (recommended) Opus 4.5 · Most capable for complex work
2. Sonnet Sonnet 4.5 · Best for everyday tasks
❯ 3. Haiku ✔ Haiku 4.5 · Fastest for quick answers
and continue answering in REPL mode (no limits hit).
But when triggered as: claude --model haiku -p 'Hello Claude'
Then: You've hit your limit · resets Feb 4, 12pm (Europe/Warsaw)
My usage:
Settings: Status Config Usage (←/→ or tab to cycle)
Current session
█████████████████▌ 35% used
Resets 12:59pm (Europe/Warsaw)
Current week (all models)
█████████████ 26% used
Resets Feb 6, 1:59pm (Europe/Warsaw)
Current week (Sonnet only)
██████████████████████████████████████████████████ 100% used
Resets Feb 4, 11:59am (Europe/Warsaw)
---
It's clear to see that running claude --model haiku and continuing in REPL mode and claude --model haiku -p 'prompt' work completely different.
This bug caused me unexpectedly to blow up my Sonnet usage...
Environment Info
- Platform: linux
- Terminal: tmux
- Version: 2.1.29
- Feedback ID: d5138964-3405-47a8-a034-7c90f123af09
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/robson/.local/share/claude/versions/2.1.29 (expected in multi-process scenarios)\n at $w$ (/$bunfs/root/claude:3586:2098)\n at xxA (/$bunfs/root/claude:3586:1209)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-01T11:05:47.822Z"}]This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗