Skip to content

[CI check] fix/rare-candy-reset-jitter - #5

Closed
heli-os wants to merge 1 commit into
mainfrom
fix/rare-candy-reset-jitter
Closed

heli-os wants to merge 1 commit into
mainfrom
fix/rare-candy-reset-jitter

Conversation

@heli-os

@heli-os heli-os commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Fork-internal CI check before opening the upstream PR. Will be closed. Upstream: chattymin#434

…imit

Claude's usage API returns the same window's resets_at with different
sub-second digits on every response. Since chattymin#334 the candy grant compared
the raw string, so a window held at 100% looked new on each poll and
granted a candy plus a notification about once a minute.

Compare reset times instead: a window is new only when its reset moves
by more than 10 minutes (real windows move by hours). Unix-second epochs
from Codex follow the same rule; non-timestamp values keep string
equality. Jitter no longer rewrites the stored epoch, so polls stop
saving the companion state too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@heli-os heli-os changed the title fix(companion): stop re-granting Rare Candy on every poll at a full limit [CI check] fix/rare-candy-reset-jitter Oct 9, 2026
@heli-os heli-os closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant