Skip to content

[codex] Surface Claude CLI scoped weekly limits#1993

Open
janpollak wants to merge 1 commit into
steipete:mainfrom
janpollak:codex/fix-claude-cli-fable-usage
Open

[codex] Surface Claude CLI scoped weekly limits#1993
janpollak wants to merge 1 commit into
steipete:mainfrom
janpollak:codex/fix-claude-cli-fable-usage

Conversation

@janpollak

@janpollak janpollak commented Jul 8, 2026

Copy link
Copy Markdown
  • Preserve model-scoped weekly limits from the Claude CLI /usage parser as named extra windows.
  • This surfaces Current week (Fable) from Claude CLI as Fable only in CodexBar, matching the OAuth/Web scoped-limit behavior.
  • Handles live CLI reset variants (Reset vs Resets) and falls back to the all-model weekly reset when a scoped weekly reset line is omitted by the TUI capture.

Verification:

  • swift test --filter ClaudeUsageTests
  • Live proof: .build/arm64-apple-macosx/debug/CodexBarCLI usage --provider claude --source cli --format json --pretty
    • Claude CLI 2.1.204
    • extraRateWindows[0].id: claude-weekly-scoped-fable
    • extraRateWindows[0].title: Fable only
    • extraRateWindows[0].window.usedPercent: 70
    • extraRateWindows[0].window.resetDescription: Resets Jul 10 at 3am (Europe/Prague)
    • extraRateWindows[0].window.resetsAt: 2026-07-10T01:00:00Z

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 8, 2026, 12:56 PM ET / 16:56 UTC.

Summary
The branch parses Claude CLI model-scoped Current week (...) panes into named extra rate windows, wires them into Claude CLI snapshots, merges them with web extras, and adds focused Swift tests.

Reproducibility: not applicable. as a strict bug reproduction: this is a provider-data display improvement. Source inspection shows current main drops CLI extra windows, while the PR provides focused parser/fetcher coverage and copied live CLI output for the new path.

Review metrics: 3 noteworthy metrics.

  • Diff scope: 3 files, +236/-7. The change is bounded to Claude CLI parsing, snapshot wiring, and one focused test file.
  • Review continuity: 1 prior P2 finding addressed. The latest head adds CLI/web extra-window merge and dedupe logic for the earlier web-extra replacement concern.
  • Validation signal: 1 focused test command claimed, 1 live CLI output proof. The PR body reports swift test --filter ClaudeUsageTests and copied live CLI output showing the new scoped Fable window.

Root-cause cluster
Relationship: canonical
Canonical: #1993
Summary: This PR is the active CLI-specific implementation for Claude scoped weekly windows; the merged OAuth/Web scoped-window PR is related but did not cover the CLI TUI parser path.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • [P2] No repair lane is needed; the remaining action is ordinary maintainer review of a focused, proven PR.

Security
Cleared: The diff changes Swift parsing/wiring and tests only; no dependency, workflow, secret, release, or supply-chain execution surface changed.

Review details

Best possible solution:

Land the focused CLI parser and wiring after maintainer review, keeping CLI scoped-window IDs, titles, and web-extra merging aligned with the existing Claude scoped-weekly behavior.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a strict bug reproduction: this is a provider-data display improvement. Source inspection shows current main drops CLI extra windows, while the PR provides focused parser/fetcher coverage and copied live CLI output for the new path.

Is this the best way to solve the issue?

Yes: extraRateWindows is already the Claude rendering surface for scoped limits, and the latest diff keeps the CLI implementation narrow while preserving web extras. I do not see a smaller supported path that would cover CLI TUI scoped panes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against aa401f1d8b74.

Label changes

Label justifications:

  • P2: This is a normal-priority Claude provider usage-display improvement with limited parser and snapshot-wiring blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes copied live CLI output showing the after-fix Claude scoped Fable extra window with ID, title, percent, reset text, and parsed reset timestamp.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes copied live CLI output showing the after-fix Claude scoped Fable extra window with ID, title, percent, reset text, and parsed reset timestamp.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: Git blame and file history tie the current Claude CLI parser and snapshot wiring to recent Claude provider work by this contributor. (role: recent area contributor; confidence: high; commits: a83a83fa4131, cfd747f8, 02bd8e8d; files: Sources/CodexBarCore/Providers/Claude/ClaudeStatusProbe.swift, Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift)
  • konon4: Authored the merged OAuth/Web scoped weekly limit implementation and shared mapper that this CLI path is matching. (role: introduced related behavior; confidence: high; commits: 21e3beb37743; files: Sources/CodexBarCore/Providers/Claude/ClaudeScopedWeeklyLimitMapper.swift, Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift, Sources/CodexBarCore/Providers/Claude/ClaudeWeb/ClaudeWebExtraRateWindowParser.swift)
  • Yuxin-Qiao: Recent history includes Claude CLI subscription /usage and fallback handling near the same parser/fetcher surface. (role: adjacent CLI fallback contributor; confidence: medium; commits: 126dc923; files: Sources/CodexBarCore/Providers/Claude/ClaudeStatusProbe.swift, Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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-review comments, 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-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to 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 explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (5 earlier review cycles)
  • reviewed 2026-07-08T08:03:29.531Z sha a50ebd4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-08T08:11:49.070Z sha a50ebd4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-08T09:37:56.057Z sha b174473 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T09:44:07.408Z sha b174473 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T13:37:29.149Z sha b174473 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. labels Jul 8, 2026
@janpollak janpollak force-pushed the codex/fix-claude-cli-fable-usage branch from a50ebd4 to b174473 Compare July 8, 2026 09:27
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 8, 2026
@janpollak janpollak marked this pull request as ready for review July 8, 2026 13:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b174473925

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift
@janpollak janpollak force-pushed the codex/fix-claude-cli-fable-usage branch from b174473 to 5f6a7cc Compare July 8, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant