Feature Request: codex-reset tool
Problem
OpenAI introduced banked rate-limit resets for Codex on 2026-06-12. Every eligible ChatGPT plan (Plus/Pro/Business) was granted at least one free reset, plus up to 3 more via referrals. However, the redemption UI exists only in:
- Codex Desktop App (Windows/macOS only)
- VS Code / Cursor / Windsurf extension
- Codex CLI v0.142.0+
/usage TUI
Linux CLI users who rely on this plugin have no way to view or redeem their banked resets without switching to another tool. The plugin already has codex-limits to view quota but cannot act on available resets.
Proposed Solution
Add a new codex-reset tool that can:
- List available banked rate-limit reset credits with expiry dates and current usage
- Redeem one reset credit (with confirmation prompt)
- Support
--json and --dry-run flags
Technical Analysis
The plugin already has most of the infrastructure needed:
| What exists |
Where |
CODEX_BASE_URL = "https://chatgpt.com/backend-api" |
lib/constants.ts |
createCodexHeaders() for auth headers |
lib/request/fetch-helpers.ts |
fetchCodexUsage() calling GET /wham/usage |
lib/codex-usage.ts |
Tool factory pattern (createCodexLimitsTool(ctx)) |
lib/tools/codex-limits.ts |
Tool registration via createToolRegistry() |
lib/tools/index.ts |
New API endpoints needed:
| Endpoint |
Method |
Purpose |
/wham/rate-limit-reset-credits |
GET |
List banked credits and statuses |
/wham/rate-limit-reset-credits/consume |
POST |
Redeem one credit (body: credit_id, redeem_request_id) |
These use the same auth headers (Authorization: Bearer, ChatGPT-Account-Id) as the existing /wham/usage call.
Reference Implementation
The community script aaamosh/codex-reset demonstrates the full API interaction in ~300 lines of Python (MIT license). The plugin's TypeScript implementation would follow the same API contract.
Proposed Interface
codex-reset # show available credits + usage
codex-reset consume # redeem one credit (with confirmation)
codex-reset consume --yes # skip confirmation
codex-reset consume --dry-run # preview without redeeming
codex-reset format="json" # machine-readable output
Output example (text mode)
banked credits: 2 available
- RateLimitResetCredit_xxx status=available granted=2026-06-12 expires=2026-07-12
"One free rate limit reset"
current usage:
5h limit: 12% left (resets 14:30)
Weekly limit: 73% left (resets Jul 18 23:12)
Why this belongs in the plugin
The plugin already manages ChatGPT OAuth tokens, queries /wham/usage for quota visibility, and provides 21 codex-* tools for account management. Adding reset redemption completes the quota management story without requiring users to switch to a separate tool or the Codex Desktop App.
Feature Request:
codex-resettoolProblem
OpenAI introduced banked rate-limit resets for Codex on 2026-06-12. Every eligible ChatGPT plan (Plus/Pro/Business) was granted at least one free reset, plus up to 3 more via referrals. However, the redemption UI exists only in:
/usageTUILinux CLI users who rely on this plugin have no way to view or redeem their banked resets without switching to another tool. The plugin already has
codex-limitsto view quota but cannot act on available resets.Proposed Solution
Add a new
codex-resettool that can:--jsonand--dry-runflagsTechnical Analysis
The plugin already has most of the infrastructure needed:
CODEX_BASE_URL = "https://chatgpt.com/backend-api"lib/constants.tscreateCodexHeaders()for auth headerslib/request/fetch-helpers.tsfetchCodexUsage()callingGET /wham/usagelib/codex-usage.tscreateCodexLimitsTool(ctx))lib/tools/codex-limits.tscreateToolRegistry()lib/tools/index.tsNew API endpoints needed:
/wham/rate-limit-reset-credits/wham/rate-limit-reset-credits/consumecredit_id,redeem_request_id)These use the same auth headers (
Authorization: Bearer,ChatGPT-Account-Id) as the existing/wham/usagecall.Reference Implementation
The community script aaamosh/codex-reset demonstrates the full API interaction in ~300 lines of Python (MIT license). The plugin's TypeScript implementation would follow the same API contract.
Proposed Interface
Output example (text mode)
Why this belongs in the plugin
The plugin already manages ChatGPT OAuth tokens, queries
/wham/usagefor quota visibility, and provides 21codex-*tools for account management. Adding reset redemption completes the quota management story without requiring users to switch to a separate tool or the Codex Desktop App.