fix(switching): improve account switching reliability and UX#22
fix(switching): improve account switching reliability and UX#22Fzhiyu1 wants to merge 1 commit intoLampese:mainfrom
Conversation
124adf6 to
20cc287
Compare
|
In my testing, I was not able to get the account switched properly without needing to quit codex. 2026-03-12_09-57-06_compressed_50fps.mp4 |
|
I watched the video and your observations are basically correct. What this PR is trying to do is not hot-switch the currently running Codex app / CLI process. The non-restart path is only meant to update the auth for the next launch / next new process, without forcing the current one to restart immediately. So for And for CLI, I also agree with your point about I think the confusing part here is the wording. If that behavior is too confusing or not a good fit for the project, I'm okay reducing the scope of the PR and removing that part. |
|
Hi @Fzhiyu1 That version of codex-switcher used to gray out account switching option when Codex.app or Codex CLI was running in the background which is I think the more stable flow. Could you take a look at the code in the main branch and make refinements there, If your changes still align with how the app works right now? Thank you for your contribution. |
Summary
Switch New Sessions OnlyoptionCodex.app app-serverwhen detecting blocking Codex foreground processes and surface switching failures in the UI~/.codex/auth.json.lockfiles left behind by dead processesTest Plan
node --test --experimental-strip-types tests/switching.test.tspnpm buildcargo test auth::fs_utils::tests::acquire_reclaims_stale_lock_filecargo test commands::account::testscargo test commands::process::tests