CodexBar icon indicating copy to clipboard operation
CodexBar copied to clipboard

Session stats are missing for Codex

Open obrizan opened this issue 4 months ago • 6 comments

Session stats are missing for Codex.

Image

Probe logs:

{
   "rateLimitsByLimitId":{
      "codex":{
         "credits":{
            "hasCredits":false,
            "balance":"0",
            "unlimited":false
         },
         "primary":{
            "usedPercent":5,
            "resetsAt":1784533528,
            "windowDurationMins":10080
         },
         "planType":"plus",
         "limitId":"codex"
      }
   },
   "rateLimits":{
      "limitId":"codex",
      "primary":{
         "resetsAt":1784533528,
         "windowDurationMins":10080,
         "usedPercent":5
      },
      "credits":{
         "hasCredits":false,
         "balance":"0",
         "unlimited":false
      },
      "planType":"plus"
   }
}
codex.oauth (oauth) available
No log yet. Update OpenAI cookies in Providers → Codex to run an import.

CodexBar version 0.42.1 (103).

obrizan avatar Jul 13 '26 10:07 obrizan

Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 9, 2026, 1:45 AM ET / 05:45 UTC.

Summary Current main correctly keeps the returned 10,080-minute Codex limit in the weekly lane, so the reported swapped-lane presentation is addressed. Keep this issue open only for the repository owner’s explicit UX choice on whether an absent upstream session window needs a visible unavailable-state cue.

Reproducibility: yes. at source level: a payload with only a 10,080-minute window follows the tested weekly-only mapping. A live account probe was not run because it would require provider credentials and the supplied diagnostics already establish the upstream omission.

Maintainer decision needed

Question Recommendation
When Codex omits the five-hour limit but returns weekly usage, should the UI remain weekly-only or show an explicit unavailable-session state? Keep weekly-only presentation: Treat an omitted upstream session window as unavailable and show only the correctly labeled weekly lane.

Why: Current main fixes the misleading weekly-lane placement, but the remaining cue is a user-facing presentation policy rather than a parser correction.

Next step The only remaining action is the owner’s presentation decision, so an autonomous repair PR is not appropriate.

Review details

Best possible solution:

Retain semantic weekly-lane mapping and, if desired, add a clearly upstream-sourced unavailable-session cue without inventing a session value.

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

Yes, at source level: a payload with only a 10,080-minute window follows the tested weekly-only mapping. A live account probe was not run because it would require provider credentials and the supplied diagnostics already establish the upstream omission.

Is this the best way to solve the issue?

Unclear: current normalization is the narrow solution to the misplaced weekly lane, while an explicit unavailable-session indicator is a product presentation choice.

AGENTS.md: found and applied where relevant.

Remaining risk / open question:

  • Adding a persistent unavailable-session row could imply a CodexBar fetch failure when the API is intentionally withholding that limit, so its wording and visual weight need owner approval.

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

Label changes

Label justifications:

  • P3: The remaining work is a low-risk presentation decision after the underlying weekly-only mapping is handled.
  • impact:ux-friction: A missing session window can make the quota layout confusing, but the user can still read the returned weekly usage.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: The owner’s discussion comment establishes the remaining choice: whether an absent upstream session window needs an explicit presentation state. (role: repository owner and product-decision author; confidence: high; files: VISION.md)
  • Andrew Green: Introduced the current duration-based normalizer and its focused weekly-only regression tests in the current-main implementation. (role: recent Codex quota-path contributor; confidence: high; commits: f33095395e19; files: Sources/CodexBarCore/Providers/Codex/CodexRateWindowNormalizer.swift, Tests/CodexBarTests/CodexCLIWindowNormalizationTests.swift)
  • Yuxin Qiao: Authored the preceding rate-window classification work that is relevant to the semantic session/weekly boundary. (role: adjacent Codex quota classification contributor; confidence: medium; commits: b841e34e5f91; files: Sources/CodexBar/Providers/Codex/CodexConsumerProjection.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-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.

clawsweeper[bot] avatar Jul 13 '26 11:07 clawsweeper[bot]

Thanks for reporting this! I came across an update from OpenAI that may explain what we’re seeing: the five-hour usage limit is being temporarily removed for Plus, Business, and Pro plans. That seems consistent with the payload here—it contains the weekly 10,080-minute window, but no 300-minute session window. CodexBar therefore has no session value to display. Since this appears to be a temporary upstream change, perhaps no CodexBar fix is needed for now. It may be worth monitoring and checking again once OpenAI restores the five-hour limit. If the session window returns upstream but is still missing here, we can investigate further.

Zihao-Qi avatar Jul 13 '26 13:07 Zihao-Qi

It would be nice if the weekly usage bar would still be the lower one. Right now, it got switched, and became the upper usage bar, while the lower usage bar is (correctly) grayed out.

arnodirlam avatar Jul 13 '26 16:07 arnodirlam

@Zihao-Qi thanks, for checking!

OpenAI confirmed:

https://x.com/thsottiaux/status/2076365965915467978

  • Temporarily removing the 5 hour usage limit restriction for all Plus, Business and Pro plans

obrizan avatar Jul 14 '26 05:07 obrizan

The diagnostics in this thread confirm that the Plus-plan RPC payload contained only the 10,080-minute weekly window and omitted the 300-minute five-hour session window. The linked OpenAI update confirms this was a temporary upstream limit change, not a CodexBar parsing failure.

CodexBar can only render the windows the API returns, so there is no session value to show in that payload. We’ll keep this issue open and track whether the five-hour window returns upstream. If the omission persists, we should add an explicit “session window unavailable” state so the weekly lane keeps its normal placement and the missing session lane is clear instead of looking like a rendering bug.

steipete avatar Jul 17 '26 00:07 steipete

Closing: the diagnostics in this thread established that the Plus-plan RPC payload temporarily omitted the 300-minute session window — an upstream OpenAI limit change, not a CodexBar parsing failure. CodexBar renders whatever windows the API returns, and the session window has since returned for affected plans. If session stats go missing again with a payload that does contain the window, please open a fresh issue with the redacted RPC payload.

steipete avatar Aug 14 '26 03:08 steipete