[BUG] Session resume fails with 400 "Invalid model name" until /model is run (regression, started ~mid-May 2026)
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?
Since approximately mid-May 2026, every session resume via --resume (or FleetView session resume) fails on the first prompt with:
API Error: 400 400: {'error': 'anthropic_messages: Invalid model name passed in model=claude-sonnet-4-6. Call `/v1/models` to view available models for your key.'}
Running /model in the resumed session — without changing the model (selecting the same claude-sonnet-4-6) — immediately clears the error and subsequent prompts work fine.
This worked correctly for months prior and regressed sometime in the ~2 weeks before 2026-05-28.
The model ID itself is not the problem. claude-sonnet-4-6 is a valid alias in our LiteLLM proxy (which fronts AWS Bedrock). The same model ID works correctly in fresh sessions. Only resumed sessions hit this error, and only until /model is re-run.
What Should Happen?
Session resume should complete model initialization the same way a fresh session does. The /model command should not be required as a workaround after every resume.
Root Cause Hypothesis
--resume appears to restore the saved model ID from the session transcript but skips whatever model initialization step runs during a fresh session start. Running /model re-triggers that initialization as a side effect, even when the selected model doesn't change. Something in a recent release broke this initialization path for resumed sessions.
Workaround
After resuming, run /model and select the same model (no change needed). The error clears and the session works normally.
Error Messages/Logs
API Error: 400 400: {'error': 'anthropic_messages: Invalid model name passed in model=claude-sonnet-4-6. Call `/v1/models` to view available models for your key.'}
Steps to Reproduce
- Use Claude Code with a LiteLLM proxy (or similar) fronting an API-compatible backend (e.g. AWS Bedrock)
- Start and end a session normally
- Resume with
claude --resume <session-id> - Send any prompt — observe 400 error
- Run
/model, select the same model without changing it, send a prompt — observe it now works
Claude Model
claude-sonnet-4-6 (via LiteLLM proxy → AWS Bedrock)
Is this a regression?
Yes — worked correctly for months; regressed approximately mid-May 2026
Last Working Version
Unknown exact version; working prior to ~2026-05-14
Claude Code Version
Latest (as of 2026-05-28)
Platform
Other (LiteLLM proxy / AWS Bedrock)
Operating System
Linux
Terminal/Shell
bash
Additional Information
- Reproducible on every session resume, 100% of the time
- The
/modelworkaround works 100% of the time without changing the model ID - This is a clear regression — same setup, same model, worked fine before mid-May 2026
- The fact that re-selecting the same model fixes it strongly points to an initialization-on-resume gap introduced in a recent release
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗