[BUG] /usage panel leaves stale characters when switching day/week views if the panel is taller than the terminal

Status Open
Reported on v2.1.294
Maintainer reply None cached
Activity 0 comments · opened Oct 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When the /usage panel is taller than the terminal, switching between the day and week views (d / w) leaves stale characters on screen. Parts of the old frame survive inside the new one, and copies of the panel pile up in scrollback. Examples from one run:

  56oc-cascade                    3%      <- percentage from a previous line, mixed with the skill name
  /d c-cascade                    3%      <- one character blanked
  12neral-purpose              ubage ts under "general-purpose"
  dmtdel or tighteneng th ir prompts.
  d to d y · w to week

The renderer writes cell-level diffs and skips cells it believes are unchanged. For example, the redraw of the footer is d to d CSI 10 G y · w to week, which skips the a because the renderer assumes it is still there. Once the panel no longer fits, the cursor-relative moves it relies on (e.g. CSI 49 A / CSI 49 B on a 50-row screen) clamp at the screen edge, so the renderer's model of the screen drifts away from what is actually displayed.

Not a terminal bug

The same corruption appears in two independent terminal emulators:

| Terminal | Geometry (rows×cols) | Result |
|---|---|---|
| tmux 3.7c | 60×170 | corrupted |
| kitty 0.49.0 | 64×165 | corrupted |

The geometry that triggers it depends on the panel's height, which changes with the usage data. When the panel fits on screen (e.g. 100×160), the output is always clean.

What Should Happen?

Switching between the day and week views should repaint the panel cleanly, whatever the terminal height.

Steps to Reproduce

  1. tmux -f /dev/null new-session -x 170 -y 60 claude (any terminal works; the screen just has to be shorter than the /usage panel)
  2. Type /usage, press Enter, then switch to the Usage tab if it isn't already selected
  3. Press w, d, w, d, w, d with about 2 s between presses
  4. Look at the panel and the scrollback (tmux capture-pane -p -S -): you'll see stale or mixed characters and duplicated panel copies

If you don't see it, try a few row counts around the panel's height; the exact trigger moves with the panel's content.

Claude Code Version

2.1.294 (native, macOS arm64)

Platform

Claude subscription (Max)

Operating System

macOS 26.4.1

Terminal/Shell

tmux 3.7c, kitty 0.49.0 (both reproduce)

Additional Information

Possibly related: #74122 (garbled rendering in tmux that only repaints on a forced redraw).

View original on GitHub ↗