Skip to content

Prefer Claude Keychain credentials for quota lookup#17

Merged
handlecusion merged 1 commit into
handlecusion:mainfrom
Nanako0129:fix/claude-keychain-credentials
Jun 11, 2026
Merged

Prefer Claude Keychain credentials for quota lookup#17
handlecusion merged 1 commit into
handlecusion:mainfrom
Nanako0129:fix/claude-keychain-credentials

Conversation

@Nanako0129

Copy link
Copy Markdown
Contributor

Summary

This changes the Claude OAuth credential lookup order used by the Agent limits quota request.

Before After
Environment override → ~/.claude/.credentials.json → macOS Keychain Environment override → macOS Keychain → ~/.claude/.credentials.json

Fixes #16.

Why

On macOS, Claude Code can have a fresh OAuth credential in Keychain while a legacy ~/.claude/.credentials.json file still exists. Tokcat previously returned the file credential first, so the quota lookup could use a stale credential and show a Claude OAuth error even though Claude Code itself was authenticated.

This only changes the Agent limits OAuth quota lookup. Local usage history still comes from local session logs.

Verification

Check Result
cargo check Passed
Local app install smoke test Built and launched /Applications/Tokcat.app successfully during manual validation

@handlecusion

handlecusion commented Jun 11, 2026

Copy link
Copy Markdown
Owner

I've reviewed it. Thank you for the contribution!

@handlecusion handlecusion merged commit ef5b69d into handlecusion:main Jun 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude quota lookup can prefer stale file credentials over Keychain credentials

2 participants