Skip to content

feat: expose Codex saved reset availability and apply action for accounts #1014

@Jorgesrab

Description

@Jorgesrab

Pre-flight checklist

  • I searched existing issues and discussions for similar proposals.
  • This is a concrete proposal, not an open-ended question.

Problem / motivation

Codex recently introduced saved / banked usage resets that users can apply manually when they need capacity back, instead of waiting for the normal reset window.

Today codex-lb already tracks account usage and can force-probe stale /wham/usage state, but operators do not have a codex-lb-native way to see whether an upstream account has a saved reset available or to apply that reset from the dashboard/API. This makes account state confusing: Codex may show that a reset can be applied, while codex-lb only shows the current exhausted or near-exhausted usage windows.

Proposed change

Add support for detecting and exposing saved Codex reset state per account, when available from upstream.

Desired behavior:

Accounts dashboard shows whether an account has a saved reset available.
Add a per-account Apply reset action, separate from the existing Force probe action.
Add an admin API endpoint, for example:
POST /api/accounts/{account_id}/usage-reset/apply
After applying a reset, codex-lb immediately refreshes /wham/usage and updates account status, remaining usage, reset timestamps, and dashboard rows.
The action should be disabled when no saved reset is available, the account requires re-auth, or the upstream API does not expose reset application.
The UI should clearly warn that applying a saved reset consumes one upstream reset credit/token.

Default behavior: no automatic reset application. Manual operator action only.

Alternatives considered

No response

Area

Account management & quota tracking

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions