Skip to content

Add optional profile-based Codex account discovery#631

Open
igneous-prose wants to merge 2 commits intosteipete:mainfrom
igneous-prose:codex/profile-discovery-source
Open

Add optional profile-based Codex account discovery#631
igneous-prose wants to merge 2 commits intosteipete:mainfrom
igneous-prose:codex/profile-discovery-source

Conversation

@igneous-prose
Copy link
Copy Markdown

This complements the managed Codex account flow added in 0.20.0-beta.1 by adding an advanced live-system account source based on already-signed-in local Codex profiles. Managed accounts remain the default path; this only affects Codex when the user explicitly selects a discovered local profile. Follow-up to #630.

  • discovers existing local Codex profiles/auth files
  • shows discovered profiles in Codex settings and the menu as selectable identities
  • routes Codex usage, credits, and OpenAI web/dashboard fetches through the selected profile, failing closed if the saved profile is unavailable

This is an advanced optional path for users who already manage multiple Codex identities locally; it does not replace or broaden the managed-account model.

Testing

  • env CLANG_MODULE_CACHE_PATH=.build/clang-module-cache SWIFT_DRIVER_SWIFT_FRONTEND_MODULECACHE_PATH=.build/swiftpm-module-cache swift test --filter CodexProfileStoreTests
  • env CLANG_MODULE_CACHE_PATH=.build/clang-module-cache SWIFT_DRIVER_SWIFT_FRONTEND_MODULECACHE_PATH=.build/swiftpm-module-cache swift test --filter CodexProfileRoutingTests
  • env CLANG_MODULE_CACHE_PATH=.build/clang-module-cache SWIFT_DRIVER_SWIFT_FRONTEND_MODULECACHE_PATH=.build/swiftpm-module-cache swift test --filter CodexAccountsSettingsSectionTests
  • env CLANG_MODULE_CACHE_PATH=.build/clang-module-cache SWIFT_DRIVER_SWIFT_FRONTEND_MODULECACHE_PATH=.build/swiftpm-module-cache swift test --filter StatusMenuCodexSwitcherTests

@igneous-prose igneous-prose marked this pull request as ready for review April 1, 2026 05:17
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fb5b99ba6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@murongg
Copy link
Copy Markdown

murongg commented Apr 2, 2026

This is a very useful feature; I desperately need it.
I'm now using it instead of https://github.com/midhunmonachan/codex-profiles

@igneous-prose igneous-prose force-pushed the codex/profile-discovery-source branch from 2945970 to db909ec Compare April 2, 2026 08:02
@igneous-prose igneous-prose force-pushed the codex/profile-discovery-source branch from db909ec to d72d5a0 Compare April 3, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants