Claude weekly reset confetti can fire twice after a stale usage rebound
Summary
After a genuine Claude weekly quota refill, CodexBar can show weekly reset confetti twice for the same reset when the usage source briefly returns a stale pre-refill value.
Evidence
Local persisted history and event logs for one Claude account showed:
| Observation | Value |
|---|---|
| Usage sequence around the refill | 73% → 0% → 73% → 0% |
| Weekly reset boundary across all samples | 2026-07-20 00:00 UTC (unchanged) |
| Weekly reset celebrations | 2 |
| Time between celebrations | 14.5 seconds |
| Later usage sample | 6% at 04:56, with the same boundary |
The first drop to 0% was the real refill. The following 73% was a stale rebound that re-armed the detector, so the next correct 0% sample produced duplicate confetti.
Claude can refill the weekly token allowance without changing the displayed weekly counting boundary, so requiring a boundary change would suppress valid celebrations.
Expected behavior
- One Claude weekly refill produces at most one celebration, even if usage briefly rebounds to a stale value.
- Reset-detector recovery is tracked independently per Claude account and survives an app restart.
- A later genuine refill may celebrate after post-reset usage recovery has been confirmed.
Relation to #2222
Related to #2222, but distinct:
- #2222 covers a false first celebration caused by a bogus low sample such as
3% → 0% → 3%. - This issue covers a duplicate celebration after a real refill, such as
73% → 0% → 73% → 0%.
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 16, 2026, 11:54 AM ET / 15:54 UTC.
Summary This is a credible current-main bug with a distinct stale-rebound failure mode, but the linked draft pull request is still open and explicitly owns the fix, so the issue should remain open until that implementation is reviewed and merged.
Reproducibility: no. live current-main run was performed, but there is a high-confidence source reproduction: an authentic above-to-low crossing celebrates, one stale above-threshold sample re-arms the detector, and the next correct low sample celebrates again.
Ways to help us reproduce this
- Add a screenshot or short recording showing the behavior.
- Add expected vs actual behavior.
- Include redacted logs or terminal output.
Next step Do not create a competing repair PR; review, narrow if necessary, and land or close the existing draft pull request that explicitly owns this fix.
Review details
Best possible solution:
Review and land a narrowly scoped per-account persisted recovery state that requires sustained post-reset usage before re-arming, preserves boundary-independent Claude refills, and covers stale rebounds, restarts, migration, account isolation, and a later genuine refill.
Do we have a high-confidence way to reproduce the issue?
No live current-main run was performed, but there is a high-confidence source reproduction: an authentic above-to-low crossing celebrates, one stale above-threshold sample re-arms the detector, and the next correct low sample celebrates again.
Is this the best way to solve the issue?
The proposed recovery-confirmation direction is appropriate, but the exact draft implementation still needs review because it introduces persisted migration state and substantially expands the detector tests and logic.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- The linked draft PR changes persisted detector state and reports 528 additions and 133 deletions across three files, so maintainers should verify migration behavior, delayed stale rebounds, account isolation, restart persistence, and later genuine resets before landing it.
- The fix must not require the displayed Claude weekly boundary to advance, because the reported provider behavior allows a real allowance refill while that boundary remains unchanged.
Codex review notes: model internal, reasoning high; reviewed against 6d71af30b84d.
Label changes
Label changes:
- add
P2: Duplicate full-screen confetti is a valid, bounded reset-detector bug without data loss, availability failure, or a blocked core workflow. - add
impact:ux-friction: A single weekly refill can visibly trigger the same celebration twice, creating confusing and disruptive native-app behavior while leaving usage access functional. - add
issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label. - add
clawsweeper:source-repro: Current issue advisory state selects this label. - add
clawsweeper:linked-pr-open: Current issue advisory state selects this label. - add
clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
Label justifications:
P2: Duplicate full-screen confetti is a valid, bounded reset-detector bug without data loss, availability failure, or a blocked core workflow.impact:ux-friction: A single weekly refill can visibly trigger the same celebration twice, creating confusing and disruptive native-app behavior while leaving usage access functional.
Evidence reviewed
What I checked:
- Concrete source-level reproduction: The persisted sequence
73% → 0% → 73% → 0%explains how the current threshold state can celebrate once, re-arm on the stale rebound, and celebrate again without a second weekly refill. (Sources/CodexBar/UsageStore+PlanUtilization.swift, 6d71af30b84d) - Distinct sibling behavior: https://github.com/steipete/CodexBar/issues/2222 concerns a transient bogus low sample causing the first false celebration; this issue concerns a second celebration after an authentic refill, so the reports overlap in detector hardening but are not duplicates. (
Sources/CodexBar/UsageStore+PlanUtilization.swift, 6d71af30b84d) - Open closing implementation: The draft pull request https://github.com/steipete/CodexBar/pull/2231 uses closing syntax for this issue and proposes persisted, per-account recovery confirmation plus regression coverage; an open candidate PR is not grounds to close its issue before merge. (
Tests/CodexBarTests/UsageStorePlanUtilizationTests.swift, a5cbe042af2f) - Release and main status: The latest release is v0.43.0 at
5a0cbc07119ac04d998e2fd5267442ed9358fff0, while the proposed fix is based on current main6d71af30b84d8ee0b02361648b2123e0921a8277; neither the release nor the reviewed main SHA contains the open PR's fix. (6d71af30b84d) - Product scope: VISION.md describes accurate provider usage telemetry and polished native behavior as core CodexBar responsibilities, making reset-celebration correctness aligned with the product rather than optional external functionality. citeturn782834view0. (
VISION.md, 6d71af30b84d)
Likely related people:
- zats: Introduced the opt-in limit-reset confetti behavior through the original weekly-reset celebration work, making them relevant to the intended celebration semantics. (role: feature introducer; confidence: high; files:
Sources/CodexBar/UsageStore+PlanUtilization.swift,Sources/CodexBar/Settings/GeneralSettingsView.swift) - Yuxin-Qiao: Authored recent work that confirmed apparent Codex weekly resets before publishing, directly adjacent to the Claude detector-hardening problem described here. (role: recent reset-detection contributor; confidence: high; files:
Sources/CodexBar/UsageStore+PlanUtilization.swift,Tests/CodexBarTests/UsageStorePlanUtilizationTests.swift) - steipete: Has reviewed and merged the established reset-celebration feature area and is the clearest routing candidate for deciding whether the draft recovery-state design is appropriately scoped. (role: repository owner and feature merger; confidence: medium; files:
Sources/CodexBar/UsageStore+PlanUtilization.swift,Tests/CodexBarTests/UsageStorePlanUtilizationTests.swift)
How this review workflow works
- ClawSweeper keeps one durable marker-backed review comment per issue or PR.
- Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
- A fresh review can be triggered by eligible
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch. - PR/issue authors and users with repository write access can comment
@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto request a fresh review only. - Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
- Maintainer-only repair and merge flows require explicit commands such as
@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review. - Maintainers can comment
@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.
Fixed by #2231 (6fb8c012296e817264525e70e4feb00b7b733ce0).
The reset detector now stays disarmed after a celebration until two consecutive above-threshold samples re-arm it. That directly covers the reported 73% → 0% → stale 73% → 0% sequence: the stale rebound cannot re-arm the detector by itself, so only one celebration posts. The recovery state is persisted per account, migrates legacy state, and has restart and multi-account coverage.
Verification: swift test --filter UsageStorePlanUtilizationTests passed 76/76 tests locally; make check was clean; exact-head CI passed all required jobs.
Happy to provide a test build if you would like to verify the field behavior before the next release.