Repository navigation
feat: show usage-limit resets; fix Claude API rows on the 1st - #13
Merged
Merged
Conversation
Codex reports rate_limit_reset_credits.available_count in every
/wham/usage reply; the soonest expiry comes from
/wham/rate-limit-reset-credits, read at most every 15 minutes and only
while resets exist. Claude's usage endpoint adds the cedar_ember
(granted resets) and juniper_tide (weekly 5-hour reset) blocks when
asked with ?cedar_ember=1, as Claude Code's usage menu does; the plain
URL returns them as null.
Both become one "Resets" row ("1 available · until Dec 1") that also
appears among the closed section's meters and never becomes the
balance headline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cost report holds only finished UTC days. Asking from 00:00 on the 1st (today) returns http 400 "Invalid date range: ending date must be after starting date", which turned both Claude API rows into "Http 400" until midnight UTC. On the 1st, ask from yesterday and skip that bucket when summing the month. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Codex and Claude get a Resets row while a free usage-limit reset is waiting, e.g.
Resets · 1 available · until Dec 1. It shows under the provider's meters in the closed section and in the expanded limits table.Sources
rate_limit_reset_credits.available_countcomes back in every/wham/usagereply, the same field Codex's own "You have N usage limit resets available" message reads. The soonestexpires_atcomes fromGET /wham/rate-limit-reset-credits, fetched only while resets exist and cached for 15 minutes (polls run every 10–30 s). Fleet never calls/consume./api/oauth/usagereturnscedar_ember(granted resets:grants[].resets_left,ends_at,paused) andjuniper_tide(the once-a-week 5-hour reset) only when asked with?cedar_ember=1, which is the request Claude Code's usage menu makes. With the plain URL both come back null. Fleet does not sendat_wall=1, which Claude Code sends only once a limit is actually reached.Verification
test_a_key_written_to_the_windows_registry_turns_its_provider_on) also fails on unmodifiedmainon this machine.Resets · 1 available · until Dec 1. The offscreen render at 100% scale fits.cedar_ember.eligible: false(ineligible_reason: "surface") with no grants.Also: Claude API rows showed "Http 400" on the first UTC day of each month
Anthropic's
cost_reportholds only finished UTC days. A range starting at 00:00 on the 1st (today) returns400 Invalid date range: ending date must be after starting date. Both admin rows failed until midnight UTC. On the 1st, Fleet now asks from yesterday and skips that bucket when summing the month. Verified live: both rows read again. New test:test_first_of_the_month_asks_from_yesterday_and_keeps_it_out.🤖 Generated with Claude Code