claude-code - 💡(How to fix) Fix [BUG] /usage bars render correctly on mount then collapse to broken layout [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49523Fetched 2026-04-17 08:38:42
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

In the /usage dialog, the quota bars render correctly for a split second on mount and then flip to a broken layout. Once in the broken state, the "Current session" bar is missing entirely, the "Current week (all models)" bar is squeezed onto the same line as the Resets … text instead of appearing on its own line, and the "Extra usage" line has the trailing word used jammed onto the reset text with no separator or bar. The "Current week (Sonnet only)" bar, which has no reset text preceding it, renders correctly. Resizing the terminal has no effect.

Reproduces in every terminal I've tried. Screenshot and video attached.

<img width="918" height="600" alt="Image" src="https://github.com/user-attachments/assets/17dfbfa5-c412-4e27-b989-eb2f717fedaa" />

https://github.com/user-attachments/assets/b672d0b2-321a-4f0d-b208-728a48e69a94

Error Message

Error Messages/Logs

Root Cause

The only section that survives the re-render correctly is "Current week (Sonnet only)", which is also the only section without a Resets … line immediately preceding the bar. That suggests the post-mount layout pass isn't reserving bar width before laying out the reset-text line, so the bar gets pushed onto the wrong line or dropped when the Resets … text is long (full date + timezone). Because the bug is terminal-agnostic, it's almost certainly in the Ink/React TUI layout logic rather than terminal emulation.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Summary

In the /usage dialog, the quota bars render correctly for a split second on mount and then flip to a broken layout. Once in the broken state, the "Current session" bar is missing entirely, the "Current week (all models)" bar is squeezed onto the same line as the Resets … text instead of appearing on its own line, and the "Extra usage" line has the trailing word used jammed onto the reset text with no separator or bar. The "Current week (Sonnet only)" bar, which has no reset text preceding it, renders correctly. Resizing the terminal has no effect.

Reproduces in every terminal I've tried. Screenshot and video attached.

<img width="918" height="600" alt="Image" src="https://github.com/user-attachments/assets/17dfbfa5-c412-4e27-b989-eb2f717fedaa" />

https://github.com/user-attachments/assets/b672d0b2-321a-4f0d-b208-728a48e69a94

What Should Happen?

Each section ("Current session", "Current week (all models)", "Current week (Sonnet only)", "Extra usage") should render as:

  • Header label
  • Resets … line
  • Progress bar on its own line
  • N% used (or $X / $Y spent) to the right of the bar

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in any terminal
  2. Run /usage
  3. Switch to the Usage tab
  4. Watch the first frame render — bars are correct — then the dialog re-renders into the broken state

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.112 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Environment

  • Claude Code version: 2.1.112
  • OS: macOS (Darwin 25.3.0)
  • Terminals tested: iTerm2, Superset.sh — bug reproduces in both
  • Shell: zsh + oh-my-zsh (also reproduces with zsh -f)
  • $TERM: xterm-256color

Notes (written by claude)

The only section that survives the re-render correctly is "Current week (Sonnet only)", which is also the only section without a Resets … line immediately preceding the bar. That suggests the post-mount layout pass isn't reserving bar width before laying out the reset-text line, so the bar gets pushed onto the wrong line or dropped when the Resets … text is long (full date + timezone). Because the bug is terminal-agnostic, it's almost certainly in the Ink/React TUI layout logic rather than terminal emulation.

extent analysis

TL;DR

The issue can likely be fixed by adjusting the layout logic in the Ink/React TUI to reserve space for the progress bars before rendering the reset text lines.

Guidance

  • Review the layout logic in the Ink/React TUI code to ensure it accounts for the width of the progress bars when rendering the reset text lines.
  • Verify that the issue is indeed caused by the layout pass not reserving bar width before laying out the reset-text line by adding debug logging or visual indicators to the code.
  • Consider adding a minimum width or padding to the progress bar elements to prevent them from being pushed onto the wrong line or dropped when the reset text is long.
  • Investigate why the "Current week (Sonnet only)" section renders correctly, as it may provide clues about the root cause of the issue.

Example

No code snippet is provided as the issue does not include specific code references.

Notes

The issue is likely related to the layout logic in the Ink/React TUI code, but without access to the codebase, it's difficult to provide a more specific solution. The fact that the issue reproduces in different terminals suggests that it's not a terminal emulation issue.

Recommendation

Apply a workaround by adjusting the layout logic in the Ink/React TUI code to reserve space for the progress bars, as this is likely to fix the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] /usage bars render correctly on mount then collapse to broken layout [2 comments, 2 participants]