Skip to content

[PR #3] Fix needed: macOS Keychain hex-encoding breaks rate limit indicators #4

@gcko

Description

@gcko

Hi @pstuart, just wanted to flag that I've opened PR #3 which fixes a regression in the rate-limits module affecting macOS 15.x (Sequoia) users.

The issue is that recent macOS / Claude Code updates changed security find-generic-password -w to return hex-encoded credentials instead of plain JSON. This silently breaks _get_claude_usage(), causing the 5h and 7d indicators to always display --.

I've fixed that in #3. This adds a _get_claude_token() helper with a 3-stage fallback (plain JSON → hex decode → hex decode + regex). This will maintain backward compatibility with older macOS versions.

Would love a review when you get a chance! Happy to make any adjustments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions