claude-code - 💡(How to fix) Fix [BUG] TUI in Claude Code CLI instances using subscription via CLAUDE_CODE_OAUTH_TOKEN is misleading [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52671Fetched 2026-04-24 10:42:52
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

It is awesome that I can use claude setup-token to use my subscription Claude Code CLI instances installed on setups without a browser. However the TUI when I use the CLAUDE_CODE_OAUTH_TOKEN (from doing claude setup-token) is misleading as it is not clear if I am using my Claude subscription or an Anthropic API key.

Show here is a screenshot of my Claude Code CLI instance logged in my Claude subscription auth flow:

<img width="508" height="374" alt="Image" src="https://github.com/user-attachments/assets/67578e51-85d2-42c7-941d-233589afd65c" />

Note how the Claude Code banner shows "Claude Pro" (or respective subscription tier) and how a Current session usage bar is shown.

Now here is a screenshot of my other Claude Code CLI instance logged in with my CLAUDE_CODE_OAUTH_TOKEN:

<img width="509" height="280" alt="Image" src="https://github.com/user-attachments/assets/3eca147e-10bb-4d7e-ab9d-118f31b39e3a" />

Note how the Claude Code banner shows "Claude API" and how I can't track my current session.

What Should Happen?

The TUI should make it very clear that I am using my subscription when using the CLAUDE_CODE_OAUTH_TOKEN and I should be able to track my current session usage with a usage bar just like in Claude Code CLI instances logged in with the subscription auth flow.

Error Messages/Logs

Steps to Reproduce

  1. Log into Claude Code CLI using subscription auth flow.
  2. Note how the Claude Code banner shows "Claude Pro" (or respective subscription tier)
  3. Run /usage command.
  4. Note how a Current session usage bar is shown.
  5. In another Claude Code CLI installation, use export CLAUDE_CODE_OAUTH_TOKEN=your-token (from running claude setup-token) to log in.
  6. Note how the Claude Code banner shows "Claude API."
  7. Run /usage command.
  8. Note how I can't track my current session.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.119 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be addressed by modifying the TUI to clearly indicate when a user is logged in with their subscription using the CLAUDE_CODE_OAUTH_TOKEN.

Guidance

  • Review the code responsible for rendering the Claude Code banner and usage bar to ensure it correctly handles the CLAUDE_CODE_OAUTH_TOKEN authentication method.
  • Update the TUI to display the subscription tier (e.g., "Claude Pro") when a user is logged in with their subscription via the CLAUDE_CODE_OAUTH_TOKEN.
  • Implement a usage bar for the current session when a user is logged in with the CLAUDE_CODE_OAUTH_TOKEN, similar to the one displayed when using the subscription auth flow.
  • Verify that the changes do not introduce any regressions in the subscription auth flow or other authentication methods.

Example

No code snippet is provided as the issue does not include specific code references.

Notes

The solution may require modifications to the Claude Code CLI's authentication and UI rendering logic. It is essential to ensure that the changes do not affect other authentication methods or introduce any security vulnerabilities.

Recommendation

Apply a workaround by modifying the TUI to correctly handle the CLAUDE_CODE_OAUTH_TOKEN authentication method, as this will provide a clear indication of the user's subscription status and allow them to track their current session usage.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING