Notify on Claude extra-window quota thresholds (Fable, Daily Routines)#1887
Conversation
Claude's model-scoped weekly windows (claude-weekly-scoped-*, e.g. the
promotional Fable carve-out) and Daily Routines (claude-routines) reach
the menu but were silent for quota-warning notifications. Only the
session and weekly lanes fired, so you can hit 100% Fable with no warning.
Add a generic extra-window notification lane mirroring the Antigravity
special case:
- Generic over the Claude extra-window ids, so a future carve-out (or
Fable's return) surfaces automatically.
- Reuses the existing weekly toggle/thresholds; no new settings surface.
- Adds a windowID discriminator to QuotaWarningStateKey so sibling
windows keep independent fired-threshold state.
- Notification copy shows the real window name ("Fable only",
"Daily Routines"); OS notification ids stay unique per window.
- Prunes fired-threshold state when a scoped window disappears.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 12:24 PM ET / 16:24 UTC. Summary Reproducibility: yes. at source level: current main emits Claude extraRateWindows, while quota-warning transitions only process primary and secondary lanes. I did not run a live Claude account in this read-only review. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the branch if maintainers accept that Claude weekly quota-warning preferences cover named extra windows; otherwise keep current behavior as the default and add an explicit policy gate for extra-window alerts. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main emits Claude extraRateWindows, while quota-warning transitions only process primary and secondary lanes. I did not run a live Claude account in this read-only review. Is this the best way to solve the issue? Likely yes: the per-window state key and notification identifier/copy changes are narrow and reuse the existing weekly warning path. The remaining decision is whether weekly warning settings should intentionally cover these extra windows. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3191f129f994. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d73e24d418
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A failed web-extras fetch returns a snapshot with empty extraRateWindows while the main usage data is intact. The unconditional prune treated that transient miss as every scoped window disappearing and cleared their fired-threshold state, so the next successful fetch re-posted an already-crossed Fable/Routines warning. Only prune when the refresh actually delivered extra-window data (at least one active window); a window that genuinely ends while others remain is still reconciled. Also derive the active-id set immutably after the transition loop. Addresses the Codex review feedback on steipete#1887. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks @chatgpt-codex-connector — good catch, that's a real duplicate-notification path. Fixed in 0c91c0c.
The lane now only prunes when the refresh actually delivered extra-window data (≥1 active window); a window that genuinely ends while others remain is still reconciled. Added a regression test ( |
|
To use Codex here, create an environment for this repo. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e7ee2042f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Claude's model-scoped weekly windows (
claude-weekly-scoped-*, such as the promotional Fable carve-out) and Daily Routines (claude-routines) already render in the menu, but quota-warning notifications only covered the primary session and weekly lanes.This extends the existing quota-warning path to Claude's named extra windows:
windowID, so sibling windows notify independently.Scope notes
NamedRateWindow.titleis provider-supplied and currently English, matching its existing menu presentation.Validation
swift test --filter 'ClaudeExtraWindowQuotaWarningTests|QuotaWarningNotificationLogicTests|UsageStoreSessionQuotaTransitionTests'— 43 tests passed.make check— format, lint, locale, repository, security, release, and package checks passed.make test— all 47 shards passed.37733252d174cc47dab3c88117daf3209dfb0143— no accepted/actionable findings../Scripts/compile_and_run.sh— built, packaged, launched, and remained running.Claude Fable only quota lowoverlay at 26% remaining. Account identity was redacted and the screenshot stayed local.Regression coverage