[BUG] VSCode extension status bar shows "NaN% used" for context when using custom model via ANTHROPIC_DEFAULT_HAIKU_MODEL
Resolved 💬 3 comments Opened Mar 11, 2026 by wond12 Closed Apr 10, 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?
The Claude Code VSCode extension displays NaN% used in the status bar when using a custom model configured through ANTHROPIC_DEFAULT_HAIKU_MODEL.
What Should Happen?
The context usage should display a valid percentage (e.g., 11% used)
Error Messages/Logs
Steps to Reproduce
- Set ANTHROPIC_DEFAULT_HAIKU_MODEL to a custom model name (e.g., glm-5) in VS Code settings:
{
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5"
}
- Run
/model haikuto switch to the custom model - Start a new session and say something
- Observe the context usage percentage in the VSCode extension status bar
Claude Model
Other
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
VSCode extension: claude-code (v2.1.72)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗