Skip to content

Regression of #1031 on 0.28.0: "still loading usage data" error reappears with Claude CLI 2.1.148 #1116

@nischal94

Description

@nischal94

Summary

The fix from #1031 / PR #1032 (commit 1dd2804f) is included in my build,
but the exact symptom and error message it addressed have returned with
Claude CLI 2.1.148:

Could not parse Claude usage: Claude CLI /usage is still loading usage data.

The CodexBarClaudeWatchdog helper spawns within ~5s of every relaunch,
confirming the CLI PTY fallback is being used rather than OAuth or browser
cookies. The loading-state retry added in #1032 appears not to be
recovering on this CLI version.

Scope of the failure

The Claude tab's cost/token histogram (computed locally from
~/.claude/projects/*.jsonl) renders correctly — showing today's spend,
30-day spend, top model, etc. The failure is isolated to the
session/weekly quota probe path (OAuth → cookies → CLI PTY). Local-log
cost computation and the quota probe are independent codepaths; only the
latter is broken.

Environment

  • CodexBar 0.28.0 (build 66, commit 855945a8) — 41 commits ahead of
    the Fix Claude usage loading stalls #1032 fix commit (gh api repos/steipete/CodexBar/compare/1dd2804f...855945a8
    ahead_by: 41, behind_by: 0), so the fix is in this build
  • macOS Darwin 25.x
  • Claude CLI 2.1.148 at ~/.local/bin/claude
  • Logged in to claude.ai in both Chrome (active session) and Safari
    (freshly authenticated during testing)

Suspected root cause

ClaudeStatusProbe.isUsageStillLoading matches the normalized substring
"loadingusage". Direct (non-PTY) invocation of claude /usage on
2.1.148 returns a single line:

You are currently using your subscription to power your Claude Code usage

That text does not contain "loadingusage" after normalization, so the
loading detector would return false for the final response. The error
in the menu bar therefore implies CodexBar's PTY probe is reading the
buffer before the final response materializes — catching the
intermediate "Loading usage…" render and emitting the loading-state error
without the retry succeeding.

Observed behavior

After each relaunch:

/Applications/CodexBar.app/Contents/Helpers/CodexBarClaudeWatchdog -- \
  ~/.local/bin/claude --allowed-tools …

…appears in ps aux within ~5 seconds, and the Claude tab shows the
error above. Persisted across ~10 hours of uptime and multiple restarts.

Steps to reproduce

  1. Install Claude CLI 2.1.148.
  2. Be logged in to claude.ai in a supported browser.
  3. Launch CodexBar 0.28.0, open the Claude tab.
  4. Observe: "Could not parse Claude usage: Claude CLI /usage is still loading usage data."
  5. ps aux | grep CodexBar shows the watchdog helper running.
  6. Quit + relaunch CodexBar multiple times — symptom persists.

What I tried (none fixed it)

Possible directions

  1. The PTY probe's short first attempt may be reading the buffer before
    Claude CLI 2.1.148 has settled — the CLI may have slower cold-start
    on 2.1.148 than earlier versions.
  2. The retry-with-longer-probe added in PR Fix Claude usage loading stalls #1032 may not be triggering on
    the "loadingusage" detection in 0.28.0, or the longer probe is also
    timing out before the final response renders.
  3. Worth verifying: does ClaudeStatusProbe correctly retry when
    isUsageStillLoading returns true, and does that retry path log
    anywhere I could inspect to confirm?

Diagnostic output

Happy to provide a CodexBar log bundle (Console.app filter, or wherever
the app writes its log) — just let me know which output is most useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions