Claude CLI source drops "Current week (all models)" when /usage redraws over earlier screen content
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start with ClaudeCLIScreen replay and weeklyModelName(from:) in the Claude status probe, and see how ClaudeStatusProbe.parse consumes the captured /usage bytes. Reproduce by replaying the saved bytes through parse to confirm weekly=-1 and the Fable-only extra window. Done means the all-models weekly window parses from a capture that starts mid-session, while the full-stream capture still gives weekly=47. Pick one of the three fixes in the issue first, since the thread does not settle which.
Written by the indexing model from the issue text.
Description
Summary
With the Claude CLI source, CodexBar shows only the "Fable only" weekly bar. It drops the all-models weekly window, although /usage shows it.
Environment
- CodexBar 0.84.0 (Homebrew), macOS 27.2, Apple Silicon
- Claude Code 2.1.330, Ultra plan (weekly limits only, no session row)
- Source: Auto. OAuth fails with "Claude Code credentials changed … Click Refresh", so Auto falls back to the CLI.
What happens
codexbar usage --provider claude --source cli --json returns primary: null, secondary: null, and one extra window, claude-weekly-scoped-fable (8% used). The probe log reads sessionPercentLeft=-1 weeklyPercentLeft=-1.
/usage in the same probe directory shows:
Current week (all models)
██████████████████████████▌ 53% used
Resets Nov 24 at 4:59am (America/Los_Angeles)
Current week (Fable)
████ 8% used
Cause
The capture starts when /usage is sent. Claude Code's renderer writes only the cells that differ from the screen it already shows, and that screen predates the capture. ClaudeCLIScreen replays the capture onto a blank screen, so those unchanged cells stay blank. The captured bytes for the label row are:
ESC[3GCur ESC[7Gent week (all models)
The column-6 "r" is never written, and the replayed line reads Cur ent week (all models). weeklyModelName(from:) requires current\s*week\s*\(, so the line is never recognized. The fuzzy all-models match in matchesLabel runs only after that regex matches, so it never runs here. The Fable row is drawn later on rows that were blank, so it survives. Other labels lose characters the same way: Conf g, S ats, Re ets.
Reproduced on 0.84.0 and on main at 5dd48ca by replaying the saved /usage bytes through ClaudeStatusProbe.parse: weekly=-1, extra=["Fable only 8.0"]. A capture of the full PTY stream from process start parses correctly (weekly=47) with the same parser.
Possible fixes
- Feed the pre-
/usageoutput into theClaudeCLIScreenreplay, so the diff redraw lands on the real prior screen. - Or force a full repaint before capturing, for example by sending a redraw or clearing the screen before
/usage. - Or make
weeklyModelNametolerate one dropped character in "current week", asmatchesLabelalready does for "all models".
The capture also included a "Refreshing usage…" redraw that changed only the percent digit (52% to 53%), so the same replay gap can also report a stale percent.
- Dominant language
- Swift
- Stars
- 23.3k
- Forks
- 2.2k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 231
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from steipete/CodexBar
-
clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr impact:other issue-rating: 🦪 silver shellfish P2
Difficulty 1/5 Under an hour Newbie friendliness 72/100
steipete/CodexBar#5147 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
googledeveloper: unclaimed Ultra credit (null remaining amount) fails with "unrecognized response" instead of "Not applied"Possibly taken @djbclark claimed this today. Openclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 28/100
steipete/CodexBar#5145 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr impact:other issue-rating: 🦪 silver shellfish P2
Difficulty 3/5 1-2 days Newbie friendliness 50/100
steipete/CodexBar#5144 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-info clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr impact:ux-friction issue-rating: 🦐 gold shrimp P2
Difficulty 4/5 3-5 days Newbie friendliness 42/100
steipete/CodexBar#5132 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
issue-rating: 🌊 off-meta tidepool
Difficulty 1/5 Under an hour Newbie friendliness 1/100
steipete/CodexBar#5131 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
All issues in steipete/CodexBar
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nwverse/persona#12800 · 1 comment ·
Maintainers usually reply within 1 day
-
bug documentation
Difficulty 1/5 Under an hour Newbie friendliness 86/100
ajithrnayak/xpunge#7 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DuarteSantos8/openGym#1469 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day