Status bar: used_percentage returns resets_at timestamp after /clear
Bug description
After running the /clear command, the status bar displays an obviously wrong value in the used_percentage field of rate_limits.five_hour — the field receives the value from resets_at (a Unix timestamp, e.g. 1779124800) instead of an actual usage percentage (0–100).
Steps to reproduce
- Start Claude Code in any project
- Run
/clear - Observe the status bar immediately after — it shows something like
5h ████ (1779124800%)
Expected behavior
used_percentage should be a number in the range 0–100 representing the fraction of the 5-hour rate limit used.
Actual behavior
used_percentage equals the value of resets_at (Unix timestamp). Example from /tmp/cc-statusline.json captured right after /clear:
"rate_limits": {
"five_hour": {
"used_percentage": 1779124800,
"resets_at": 1779124800
}
}
Both fields are identical, suggesting the server puts the reset timestamp into the wrong field when the session is freshly cleared.
Environment
- Claude Code version: 2.1.143
- Platform: macOS Darwin 25.4.0
- Model: claude-sonnet-4-6
Workaround
In a custom statusLine script, clamp used_percentage values outside [0, 100] and hide the block. Note: this also requires using a non-whitespace IFS delimiter when parsing jq output, because IFS=$'\t' read in bash collapses consecutive tab delimiters (empty fields), causing the timestamp from resets_at to bleed into the used_percentage variable.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗