Skip to content

fix(agent-engine): read a Codex Sharing allowance as a usage limit - #7984

Merged
jan-kubica merged 1 commit into
mainfrom
fix/codex-sharing-limit
Nov 5, 2026
Merged

jan-kubica merged 1 commit into
mainfrom
fix/codex-sharing-limit

Conversation

@jan-kubica

Copy link
Copy Markdown
Contributor

What

classifyTurnFailure treats a Codex stream disconnect whose text says a ChatGPT Subscription Sharing allowance ran out as usage_limit, with resetsAt: null.

Why

Codex reports this limit as responseStreamDisconnected, so the turn ended as a generic provider error and the user was told nothing about the limit. The plan's rate limits describe a different allowance, so they do not give a reset time here.

Approach from pingdotgg/t3code#25341 (MIT). The text comes from that report; its response shape has not been confirmed against a live account.

Tests

errors.test.ts: the reported text is a usage limit with no known reset, and any other stream disconnect stays a provider error.

Codex reports an exhausted ChatGPT Subscription Sharing allowance as a stream
disconnect, so the turn ended as a provider error rather than a limit. The
reset stays unknown: the plan's rate limits do not describe this allowance.
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: stella/stella
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 1e4e65f
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 61ba6675-916a-4966-b4ce-2cfac838b2e9
Commits

Reviewing files that changed from the base of the PR and between 1e4e65f and 8226550.

Files selected for processing: 2

  • packages/agent-engine/src/harness/codex/errors.test.ts
  • packages/agent-engine/src/harness/codex/errors.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added bug Something is not working size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 5, 2026
@jan-kubica
jan-kubica enabled auto-merge November 5, 2026 10:14
@jan-kubica
jan-kubica added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit c3c804f Nov 5, 2026
224 of 226 checks passed
@jan-kubica
jan-kubica deleted the fix/codex-sharing-limit branch November 5, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant