Feature: Add usage reset time to status line metadata for customization
Environment
- Platform: Anthropic API
- Claude CLI version: 1.0.102 (Claude Code)
- Operating System: Linux 6.6.67
- Terminal: Terminal
Feature Request
Description
Add usage reset time information to the status line metadata so users can customize how and when this information is displayed in their custom status line.
Current Behavior
- Status line only shows "nearing usage limits" when close to limit
- Only shows "will reset at 4pm" when limit is actually hit
- No metadata available for custom status line configuration
- No visibility into reset time during normal usage
Proposed Behavior
Add usage reset time fields to the status line metadata, such as:
usage_reset_time_absolute: "16:00 UTC"usage_reset_time_relative: "2h 34m"usage_reset_timestamp: Unix timestamp for calculations
This would allow users to customize their status line to show this information in their preferred format and timing.
Motivation
Users need:
- Constant visibility into when usage limits will reset
- Ability to customize how this information is displayed
- Control over when this information appears in their status line
- Consistent access to reset time data, not just when approaching limits
Expected Implementation
Expose usage reset time data in the status line metadata alongside existing fields, enabling users to configure custom status lines that include this information in their preferred format.
Additional Context
This would provide the underlying data for users to create custom status line configurations showing usage reset information proactively, rather than only seeing reactive warnings when limits are approached or exceeded.
14 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
+1 on this feature request. This is a great idea. Having that reset time visible before you hit the limit would be super helpful for pacing usage throughout the day.
While we wait for the Anthropic team to consider this, I stumbled upon a fantastic community project that actually solves this exact problem: ccusage by ryoppippi.
It's a full-blown analysis tool, but it has a dedicated
statuslinecommand that provides a ton of real-time info. The output looks like this, and it includes the time remaining in the current 5-hour billing block, which is a perfect way to track this:Setting it up is really straightforward. You just need to add this to your
~/.claude/settings.json(or~/.config/claude/settings.json):(If you don't use
bun, you can usenpx ccusage@latest statuslineinstead.)Anyway, thought I'd share it here as a great temporary fix for anyone else who wants this functionality right now. Hopefully, we'll still see something like this get integrated natively into Claude Code eventually, but this is an amazing community solution in the meantime.
Here are some other statuslines
CC should have customized statuslines and advanced reporting, so we won't need external statuslines and that very buggy ccusage
CC does not provide session expiration information in the official status line metadata, so while I certainly use https://github.com/sirmalloc/ccstatusline because it is awesome, there's nothing that it can do.
ccusagemust be a different API to get CC usage information?This issue report is specifically about providing remaining time through the official
statuslineAPI, which currently only has the following fields:this gives me what I want from both
statuslineandccusage, but it would still be nice to have the information in the metadata:produces
With the release of Claude Code v2.0.0 today, there is a new
/usagecommand which provides the percentage of current usage, along with the reset time (for both session + weekly) without any 3rd party tools, and is a very welcomed addition in my eyes.It would be great to get its metadata into statusline, but currently it is not exposed.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Do not autoclose; this needs to be reviewed by a developer
+1 on not closing this issue.
Using
/usagein 2.0.x helps, but you need to run it manually from time to time in order to see the current usage percentage and next reset time.Please expose this information to the status line hook so it can be displayed in custom status lines.
@yehudab , this is my workaround. Feel free to convert it to whichever language you like to use.
Thanks @KJ7LNW for the workaround!
I've translated (some of it) to bash and it works well.
For macOS users: Claude Code now stores credentials in the Keychain instead of a JSON file. Here's how to fetch the OAuth token:
This can then be used with the API call from the script above.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.