Skip to content

Allow re-authentication or API key entry after reaching plan limits #3366

Open

Description

@dpolivaev

What feature would you like to see?

When the CLI session reaches plan limits (e.g. 5-hour or 7-day cap), it should not terminate completely. Instead, it should allow:

  • Entering a new API key, or
  • Logging in with a different account, without losing the current session context.

The /logout command should also not act like quit. Instead, it should return to a state where I can provide new credentials and continue in the same session.

Are you interested in implementing this feature?

No response

Additional information

Currently, hitting plan limits stops the CLI entirely, leaving code edits unfinished.
This is disruptive, especially when Codex has partially modified code and the process stops mid-flow, leaving files inconsistent.
Supporting credential re-entry within the same session would make the tool more resilient and usable in real workflows.

Activity

  1. dlukt commented on Sep 9, 2025

    @dlukt

    Not re-entry but stored refresh tokens that could be rotated on demand.
    id and refresh tokens are already stored in the auth.json file

  2. deksden commented on Sep 13, 2025

    @deksden

    If OpenAI implements seamless continue with another account, it can sell more Plus accounts for users that require more usage, but did not want (yet) spend $200 on pro plan.

    great for marketing, imho

  3. added
    authIssues related to authentication and accounts
    on Nov 16, 2025
  4. 3ld0ct0r commented on Jan 28, 2026

    @3ld0ct0r

    Chunky Workaround via .bash_profile

    _codex_with_profile() {
      export CODEX_HOME="$1"
      command codex "${@:2}"
    }
    
    # Personal profile (default)
    codex() {
      _codex_with_profile "$HOME/.codex" "$@"
    }
    
    # Personal profile A
    Acodex() {
      _codex_with_profile "$HOME/.codex-A" "$@"
    }
    
    # Personal profile B
    Bcodex() {
      _codex_with_profile "$HOME/.codex-B" "$@"
    }
    
    # Personal profile C
    Ccodex() {
      _codex_with_profile "$HOME/.codex-C" "$@"
    }
    
    # Personal profile D
    Dcodex() {
      _codex_with_profile "$HOME/.codex-D" "$@"
    }
    
    # Personal profile E
    Ecodex() {
      _codex_with_profile "$HOME/.codex-E" "$@"
    }
    

    You can use Acodex or Bcodex with different auths and different config.toml (s) independently in different profiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues related to authentication and accountsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions