[BUG] Statusline JSON: rate_limits.five_hour.used_percentage returns epoch timestamp instead of 0/null when 5h window has no data yet

Resolved 💬 1 comment Opened Apr 23, 2026 by abcarletti Closed May 27, 2026

Preflight Checklist

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

What's Wrong?

At the start of a new conversation, when the 5-hour usage window has no data yet, the rate_limits.five_hour.used_percentage field in the statusline JSON input appears to contain the Unix epoch timestamp value (e.g.
1776950400, which is 2026-04-23 00:00:00 UTC — the same value as resets_at) instead of 0, null, or being omitted.

Observed statusline rendering
user | ~/path | branch | 󰚩 Opus 4.7 (1M context) | ctx 0% | 5h 1776950400%

What Should Happen?

Either used_percentage: 0, used_percentage: null, or the five_hour object omitted entirely until real data is available.

Error Messages/Logs

Steps to Reproduce

  1. Open a new Claude Code session (subscribed Claude.ai account, not API key).
  2. Use a custom statusline script that reads .rate_limits.five_hour.used_percentage from stdin.
  3. Observe the value on the first few renders before any actual usage accumulates.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.118

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

  • Once the window has real data, the field is a normal integer (0–100) as expected.
  • resets_at in the same block holds exactly the value that leaks into used_percentage, suggesting a fallback/initialization bug where the wrong field is read.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗