[BUG] CLAUDE_CODE_SUBAGENT_MODEL Inheritance Issue
Status Open
Reported on v2.1.263
Maintainer reply None cached
Activity 0 comments · opened Sep 7, 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 the main session is configured to a local model via ANTHROPIC_API_KEY routing, CLAUDE_CODE_SUBAGENT_MODEL set to the local model name, claude-code-guide/named subagents still fail with claude-haiku-4-5-20251001 not found, while subagent_type: "fork" correctly inherits the local model
What Should Happen?
The subagent should inherit the model the main session is using. The parameter is set for inheritance but it still defaults to Haiku
Error Messages/Logs
Agent "Claude Code hooks guide" failed: Agent terminated early due to an API error: There's an issue with the selected model
(claude-haiku-4-5-20251001). It may not exist or you may not have access to it. Run /model to pick a different model. (error type
model_not_found, HTTP 404, model sent to the API: claude-haiku-4-5-20251001)
Steps to Reproduce
Issue a prompt that will call a subagent while the model is set to a local model. The subagent will fail saying it has an API Error with the selected model (Claude-haiku-4-5-20251001.
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.263
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_