Skip to content

Consider optional profile-based Codex account discovery for advanced users #630

@igneous-prose

Description

@igneous-prose

Thanks for the Codex multi-account work in 0.20.0-beta.1. I think the managed-account flow you added is the right default.

I have a narrower advanced-user case: I already use multiple Codex accounts locally on one Mac, each backed by separate Codex auth/profile files, and I want CodexBar to follow those existing identities without creating separate app-managed copies.

For that workflow, recreating accounts inside CodexBar means managing the same identities twice: once in Codex CLI state, and again in CodexBar. An optional discovery mode could let CodexBar reuse existing local Codex auth/profile files instead.

The practical benefit is mostly operational:

  • no duplicate login/account management between CodexBar and the Codex CLI
  • no re-auth if the local profiles already work
  • deterministic routing based on the selected auth/profile path

I do not think this should replace the new managed-account UX. It is a different use case, and it depends on local Codex profile/auth-file structure, so it should stay advanced/optional and off by default.

I have a local proof of concept in a fork that:

  • discovers existing Codex profiles/auth files and extracts account identity
  • exposes those profiles as selectable Codex identities
  • persists the active selection by profile path and routes Codex auth/environment through that selected profile

The implementation is centered around CodexProfileStore, CodexSettingsStore, and SettingsStore+TokenAccounts.

Would you be open to an optional Codex account source based on discovered local profiles/auth files, alongside the managed-account flow you just added?

If that direction sounds reasonable, I’d be happy to narrow this into a small design note instead of dumping a fork diff.

Related earlier discussion: #545

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions