[BUG] Claude code --resume is not properly resolving custom model IDs from settings.json
Resolved 💬 3 comments Opened May 28, 2026 by luigi3ert Closed Jun 30, 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?
When using claude --resume with a third-party provider (True Foundry) configured via the env block in ~/.claude/settings.json, the custom model IDs are not properly resolved. This results in a 403 error with a malformed model name. Starting a new session works fine.
What Should Happen?
--resume should load and apply the env block from settings.json the same way a new session does.
Error Messages/Logs
Please run /login · API Error: 403 User [REDACTED] is not
authorized to access model claude-opus-4-6/undefined or model does not
exist
Steps to Reproduce
- Configure a third-party provider (e.g., True Foundry) using the env block in ~/.claude/settings.json with custom ANTHROPIC_DEFAULT_*_MODEL values and ANTHROPIC_BASE_URL
- Start a new session with claude — works correctly
- Exit the session
- Resume with claude --resume — fails with 403 and malformed model name (claude-opus-4-6/undefined)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.145 (Claude Code)
Platform
Other
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗