[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

  1. Set ANTHROPIC_DEFAULT_HAIKU_MODEL to a custom model name (e.g., glm-5) in VS Code settings:

{
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5"
}

  1. Run /model haiku to switch to the custom model
  2. Start a new session and say something
  3. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗