GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): Codex seat workspaces with a zero credit cap are no longer out of usage by joaosamouco · Pull Request #34239 · pingdotgg/t3code

Conversation

@joaosamouco

@joaosamouco joaosamouco commented Nov 11, 2026

Copy link
Copy Markdown

Fixes #34234

On ChatGPT Business/Team workspaces that use paid seats, Codex reports an individualLimit with a 0 credit cap (limit: "0", remainingPercent: 0). T3 Code mapped that to a "Monthly credit limit" window at 100%, so the whole provider looked exhausted: new threads switched to the fallback model with "Codex is out of usage · resets <1st of next month>", even though the session and weekly allowance had room.

A 0 credit cap means no credits are allocated, and credits are only spent once the seat allowance runs out, so codexRateLimitsToWindows now leaves the individual window out when its limit is 0. Usage-based Enterprise plans, where the credit cap is the real allowance, keep the window. Because the fallback picker, text-generation fallback, MCP thread creation and codexUsageLimitResetAt all read these windows, they all stop treating Codex as out of usage.

Added a test with the snapshot from the issue; it fails on main and passes here.

Claude Opus 5.5 via Claude Code in T3 Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 11, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 11, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 6950292

Macroscope's review found this PR approvable — Zero credit caps no longer make Codex seat workspaces appear exhausted while seat allowance remains. The change is limited to usage interpretation and related fallback/reset behavior; provider-enforced limits remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 31eea88
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2c4309a2-dc7f-4073-be89-ce477689a2de
Commits

Reviewing files that changed from the base of the PR and between 69a5396 and e02aac0.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Codex usage-limit conversion now omits the individual monthly credit window when its configured limit is zero. A test verifies that the primary and secondary windows remain and that codexUsageLimitResetAt returns null.

Changes: Codex usage limits

Layer / File(s) Summary
Individual limit conversion and test
apps/server/src/provider/codexUsageLimits.ts, apps/server/src/provider/codexUsageLimits.test.ts
The snapshot type adds an optional individual limit. The conversion omits the individual monthly window when its numeric limit is zero. The test checks that the other two windows remain and the reset time is null.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • pingdotgg/t3code#27792 — This issue describes Codex fallback when included allowance is exhausted despite spendable credits; this change addresses the distinct zero-credit-cap case.

Possibly related PRs

  • pingdotgg/t3code#21173 — Adds Codex credit metadata and supports credit-only limits without usage windows.
  • pingdotgg/t3code#18721 — Changes Codex usage-limit reset selection, which this change tests after omitting the zero-cap window.

Suggested labels: bugfix, size:S

Suggested reviewers: t3dotgg, macroscopeapp

Merge Risk: Minimal · previous review 69502

This change stops Codex from being treated as out of usage for paid-seat workspaces whose credit cap is zero. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly identifies the main change: preventing zero-credit-cap Codex seat workspaces from being treated as out of usage. It is specific and uses a conventional commit format.
Description check Passed The description explains the problem, the code change, the affected workspace types, the linked issue, and the verification result. It does not use the template headings and does not provide the exact…
Linked Issues check Passed For issue #34234, codexRateLimitsToWindows now omits the individual window when individualLimit.limit is "0". The added test uses the reported team snapshot and verifies that only primary an…
Out of Scope Changes check Passed The changes stay within issue #34234. They add the optional individualLimit.limit field, apply the zero-cap filter in apps/server/src/provider/codexUsageLimits.ts, and add a focused regression tes…
Full details: Description check

Explanation

The description explains the problem, the code change, the affected workspace types, the linked issue, and the verification result. It does not use the template headings and does not provide the exact test command or explicit approval details, but it is sufficiently complete and focused.

Full details: Linked Issues check

Explanation

For issue #34234, codexRateLimitsToWindows now omits the individual window when individualLimit.limit is "0". The added test uses the reported team snapshot and verifies that only primary and secondary remain. It also verifies that codexUsageLimitResetAt returns null. The change preserves the individual window for nonzero or missing limits. The reported fallback and reset consumers read these windows, so the zero-cap window no longer marks Codex as exhausted.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #34234. They add the optional individualLimit.limit field, apply the zero-cap filter in apps/server/src/provider/codexUsageLimits.ts, and add a focused regression test in codexUsageLimits.test.ts. No unrelated behavior or files are changed.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 8c9af54
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f5f4db7-b7d4-45a6-98e0-88aee4c8372b
Commits

Reviewing files that changed from the base of the PR and between 8c9af54 and 6950292883ae5a96dff7c1f0ccbe64f168c2c575.

Files selected for processing: 2

  • apps/server/src/provider/codexUsageLimits.test.ts
  • apps/server/src/provider/codexUsageLimits.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joaosamouco
fix(server): Codex seat workspaces with a zero credit cap are no long…
69a5396
…er out of usage
@joaosamouco
joaosamouco force-pushed the fix/issue-34234 branch from 6950292 to 69a5396 Compare November 11, 2026 12:24
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/issue-34234
e02aac0
@juliusmarminge

juliusmarminge commented Nov 11, 2026

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

the proof has no capture anyone can open:

  • Permanent blocker: first-party ChatGPT OAuth usage flows are unavailable on this VM, preventing the required zero-credit-cap Business/Team workspace reproduction.
  • Base fallback selection and monthly-limit warning were not observed.
  • Head retention of the configured Codex model and omission of the zero-cap monthly row were not observed.

It stays open for a person to finish or close.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@theashleygirl

theashleygirl commented Nov 12, 2026

Copy link
Copy Markdown

Note

Comment written by Claude Sonnet 5.5 in T3 Code, on behalf of Jaiden

The "out of usage" symptom this PR fixes is already fixed on main by #34243, merged 2026-11-11, so this PR looks superseded.

How I checked: #34243 changes exhaustedUsageWindow in packages/shared/src/usageLimits.ts. For Codex, the individual credit window no longer counts as exhausted while the primary or secondary plan windows exist. A seat-based workspace with a zero credit cap therefore stays usable, and #34243's test covers that case.

The two differ in one way: this PR drops the "Monthly credit limit" row when its limit is 0, while main still reports that row. If hiding the row is wanted, a rebased PR limited to that would be worth keeping. Otherwise this can likely be closed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg

t3dotgg commented Nov 12, 2026

Copy link
Copy Markdown
Member

Note

🤖 Claude Opus 5.5 responding on behalf of Theo

Closing. Main already fixes this through #34243. That PR adds a Codex case to exhaustedUsageWindow in packages/shared/src/usageLimits.ts, so a seat with a zero-credit cap no longer marks Codex as out of usage. The report in #34234 was useful.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg t3dotgg closed this Nov 12, 2026
@coygeek coygeek mentioned this pull request Nov 12, 2026
[Bug]: A zero-credit Codex cap delays usage-limit recovery until the monthly credit reset #34974
Closed
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Codex seat-based workspace with a 0-credit monthly cap is treated as out of usage, new threads switch to the fallback model

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@joaosamouco @juliusmarminge @theashleygirl @t3dotgg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.