Usage stats not visible when authenticated via CLAUDE_CODE_OAUTH_TOKEN env var

Resolved 💬 5 comments Opened Jan 27, 2026 by hflier Closed Mar 10, 2026

Summary

When authenticating via the CLAUDE_CODE_OAUTH_TOKEN environment variable (instead of interactive /login), the /status Usage tab doesn't display usage information.

Steps to Reproduce

  1. Set CLAUDE_CODE_OAUTH_TOKEN environment variable with a valid OAuth token
  2. Start Claude Code (it authenticates successfully)
  3. Run /status and switch to the Usage tab
  4. No usage data is displayed

Expected Behavior

Usage information should be visible regardless of whether authentication came from:

  • Interactive /login flow
  • CLAUDE_CODE_OAUTH_TOKEN environment variable

Both use the same underlying OAuth token, so usage data should be accessible in both cases.

Context

This is particularly relevant for automated/scripted environments where the OAuth token is passed via environment variable (e.g., for CI systems, agent frameworks, or parallel task runners). Users in these environments still want visibility into their usage.

Environment

  • Claude Code version: 2.1.19
  • Login method shown: "Claude API Account"
  • Auth method: CLAUDE_CODE_OAUTH_TOKEN env var

View original on GitHub ↗

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