Skip to content

Feature Request: Support multiple OAuth tokens with automatic fallback #933

@Krlosimc

Description

@Krlosimc

Use Case

Currently, Hermes only supports a single Codex OAuth token at a time. Users with multiple ChatGPT/Codex accounts (e.g., personal + work, or to handle rate limits) have no way to configure automatic failover.

Proposal

Allow users to configure multiple OAuth tokens in auth.json and optionally set one as fallback:

{
  "codex": {
    "accounts": [
      {"id": "primary", "access_token": "...", "refresh_token": "..."},
      {"id": "backup", "access_token": "...", "refresh_token": "..."}
    ],
    "fallback": "backup"
  }
}

When the primary account hits a rate limit or quota, Hermes would automatically try the fallback account.

Benefits

  • Better resilience against rate limits
  • No manual intervention needed when one account is exhausted
  • Seamless failover for users with multiple accounts

Alternative

A simpler approach could be a simple fallback_model style config pointing to a secondary account, but the above approach gives users more control.


CC: @Krlosimc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions