fix(claude): explain CLI login when only the desktop app is signed in#828
Merged
Conversation
A login done only in the Claude desktop app lives in an Electron-encrypted blob OpenUsage can't read, so users saw a misleading "Not logged in" while clearly signed in. When no CLI credentials exist but the desktop app's data folder does, point at the one-time `claude` CLI login instead. Fixes #825 Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
robinebers has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit be66c05. Configure here.
…tored A stored-but-blank CLI token passes the auth store's isEmpty check but is dropped by the provider's trim filter; the desktop-app hint must not fire in that case since the CLI did write credentials (Bugbot). Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
robinebers has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
robinebers
added a commit
that referenced
this pull request
Jul 2, 2026
… main PRs #827 (drops ccusage) and #828 (adds this test using the old ccusage-based ClaudeProvider initializer) merged past each other, so main's CI is red: the test still passed the removed ccusageRunner: argument. Construct the provider with the current initializer instead. Co-authored-by: Cursor <cursoragent@cursor.com>
robinebers
added a commit
that referenced
this pull request
Jul 3, 2026
fix(tests): port #828's desktop-app test off the removed CcusageRunner
rohithgoud30
pushed a commit
to rohithgoud30/openusage
that referenced
this pull request
Jul 3, 2026
…usageRunner Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TL;DR
When someone is signed in only through the Claude desktop app, OpenUsage now explains that a one-time
claudeCLI login is needed, instead of showing a misleading "Not logged in". Fixes #825.What was happening
~/.claude/.credentials.json.safeStorage) OpenUsage can't read, so neither source exists.claudeto authenticate." while being visibly signed in — which reads as a bug (claude broken #825).What this changes
ClaudeAuthStoregains ahasDesktopAppData()check for the desktop app's data folders (~/Library/Application Support/Claude Codeand~/Library/Application Support/Claude/claude-code), plus a newdesktopAppOnlyerror case.claudein a terminal and sign in once." Both logins coexist, so one CLI sign-in fixes it for good.not_logged_infor telemetry (same expected-noise category).docs/providers/claude.mdgets a troubleshooting entry.Heads-up
Tests
Made with Cursor