Skip to content

Import existing Codex accounts from Orca #4393

Description

@MeroZemory

Area

Authentication and account pool

What are you trying to accomplish?

I have several Codex accounts signed into Orca and want to use them in OpenCodex without logging into each account again. Repeating the import should not create duplicate pool entries or replace existing accounts.

What prevents this today?

There is no account command for importing Orca's registered Codex accounts. A one-off access-token copy expires, while copying refresh tokens gives two applications control of the same refresh grant.

What should OpenCodex do?

Add a local import command with a preview by default and an explicit apply flag. Read only accounts listed in the selected Orca profile, check each managed-home marker, and skip account IDs already known to OpenCodex.

Keep Orca responsible for refresh. Store a source link and read its current access token when needed, without copying or using its refresh token. Reject missing, expired, or identity-mismatched sources. New accounts should still go through the existing validation step.

Example usage or interface

ocx account import-orca --source "$env:APPDATA\orca" --registry "$env:APPDATA\orca\profiles\local-default\orca-data.json" --json
ocx stop
ocx account import-orca --source "$env:APPDATA\orca" --registry "$env:APPDATA\orca\profiles\local-default\orca-data.json" --apply
ocx start

After import, use Refresh quotas in Codex Auth to validate the new accounts. Command output should contain counts, not tokens or account details.

Alternatives or workarounds

Logging into each account again works, but is cumbersome for several accounts. Manually copying access tokens requires repeating the process after expiry.

Additional context

Orca records its account list in settings.codexManagedAccounts and writes a .orca-managed-home marker:

The initial scope is local host homes. WSL and remote homes can stay out of scope. Matching by ChatGPT account ID deliberately skips separate members of the same workspace too. Orca must keep the source login available and refreshed.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

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

    account-poolOAuth, credentials, Codex pool, quota, failover, plansenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions