by Hung2124
Windows Codex Desktop multi-account via AuthSwap. Shared workspace, separate ChatGPT logins.
# Add to your Claude Code skills
git clone https://github.com/Hung2124/codex-multi-profileGuides for using ai agents skills like codex-multi-profile.
codex-multi-profile is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Hung2124. Windows Codex Desktop multi-account via AuthSwap. Shared workspace, separate ChatGPT logins. It has 62 GitHub stars.
codex-multi-profile's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/Hung2124/codex-multi-profile" and add it to your Claude Code skills directory (see the Installation section above). codex-multi-profile ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
codex-multi-profile is primarily written in PowerShell. It is open-source under Hung2124 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh codex-multi-profile against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Unofficial helper for Codex Desktop on Windows when you need more than one ChatGPT login and still want one shared workspace.
| Piece | Where it lives |
|---|---|
| Sessions, skills, MCP, memories, projects | Always %USERPROFILE%\.codex |
| Account | profiles\<name>\auth.json, swapped into ~\.codex\auth.json at launch |
| On close | Watcher saves secondary auth back, then restores main auth.json |
| Electron UI | --user-data-dir=profiles\<name> (profile root, not a nested electron\ folder) |
Do not open the main Store Codex and a profile at the same time.
CODEX_HOME)The Desktop app-server sometimes ignores CODEX_HOME and reads ~\.codex\auth.json anyway. A second home then shows the main account. AuthSwap puts the secondary token in the path the app actually reads.
WindowsApps (Access Denied). Clone ChatGPT.exe first.ChatGPT.exe. Codex.exe exits 1.Get-AppxPackage.InstallLocation can be empty — prefer an existing local clone.CODEX_ELECTRON_USER_DATA_PATH and --user-data-dir to the profile root.Start-Process inheriting $env:CODEX_HOME. Write a .cmd with set and start.Set-Content -Encoding UTF8 writes a BOM. That can invalidate config.toml. Use [IO.File]::WriteAllText(..., UTF8Encoding $false).CODEX_HOME.auth.json between machines or into git.| Item | Path |
|---|---|
| Install root | %LOCALAPPDATA%\CodexParallelDesktop |
| Shared module | CodexMultiProfile.psm1 |
| Profile launcher | Launch-CodexProfile.ps1 |
| Restore main | Launch-CodexMain.ps1 |
| Manager | CodexProfile.ps1 (new, list, stop, shortcut, launch) |
| Profiles | ...\profiles\<name>\ |
| Clone | ...\versions\<ver>\app\ChatGPT.exe |
| Shared home | %USERPROFILE%\.codex |
$root = "$env:LOCALAPPDATA\CodexParallelDesktop"
# Recommended launch (AuthSwap)
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\Launch-CodexProfile.ps1" -Name codex1
# Restore main Store Codex
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\Launch-CodexMain.ps1"
# Manager
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action new -Name codex2
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action list
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action status
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action status -AsJson
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action verify
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action stop -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action remove -Name codex2 -Force
Launch-CodexProfile.ps1.-Action new, then launch with Launch-CodexProfile.ps1.auth.json files; fix launch (cmd wrapper); do not tell the user to log in again if profile auth is still valid.ChatGPT.exe, never WindowsApps, never empty InstallLocation.CodexMultiProfile.psm1 and the launchers into %LOCALAPPDATA%\CodexParallelDesktop and into scripts\ in this skill. Launchers import the module from $PSScriptRoot.-Action status (emails are masked) then -Action verify.If the user opens Codex Main while a profile is still running, restore can write the main token into profiles\<name>\auth.json.
Guards already in the scripts:
Launch-CodexMain only save profile auth when the active email differs from auth.json.__main__auth.json.secondary.bakauth.jsonCodex.exe or a WindowsApps pathStart-Process without an explicit cmd/CODEX_HOMEconfig.toml with Set-Content -Encoding UTF8 on Windows PowerShell 5.1Details: docs/architecture.md, docs/troubleshooting.md.
Two ChatGPT logins on Codex Desktop for Windows. One shared workspace.
A second CODEX_HOME often fails: the app-server still reads ~\.codex\auth.json and you land on the main account. This repo swaps the token the app actually reads (AuthSwap), then restores the main account when the profile window closes.
Unofficial. Not affiliated with OpenAI. Requires Codex Desktop from the Microsoft Store.
| What you tried | What actually happens |
|---|---|
Copy ~\.codex to another folder and set CODEX_HOME |
Desktop still shows the main ChatGPT user |
Start-Process with $env:CODEX_HOME |
Env is often dropped; you get the wrong account |
Run ChatGPT.exe from WindowsApps |
Access Denied |
Launch Codex.exe |
Process exits 1 |
AuthSwap keeps sessions, skills, MCP, and memories in ~\.codex. Only auth.json moves.
git clone https://github.com/Hung2124/codex-multi-profile.git
cd codex-multi-profile
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Install-CodexMultiProfile.ps1
Or one line (downloads the repo zip, then runs the same installer):
irm https://raw.githubusercontent.com/Hung2124/codex-multi-profile/main/install.ps1 | iex
| Shortcut | Does |
|---|---|
| Codex1 | Secondary ChatGPT login (first run asks you to sign in) |
| Codex Main | Restore the original account and open Store Codex |
| Codex Profiles | List / create another profile |
Close one Codex UI before opening the other.
$root = "$env:LOCALAPPDATA\CodexParallelDesktop"
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\Launch-CodexProfile.ps1" -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\Launch-CodexMain.ps1"
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action new -Name codex2
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action list
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action status
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action status -AsJson
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action verify
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action remove -Name codex2 -Force
# tests (no Codex UI required)
powershell -NoProfile -ExecutionPolicy Bypass -File .\tests\Run-All.ps1
Install copies SKILL.md to:
%USERPROFILE%\.codex\skills\codex-multi-profile\%USERPROFILE%\.cursor\skills\codex-multi-profile\The skill tells Codex/Cursor not to launch Codex.exe, not to use WindowsApps, and not to Start-Process without a .cmd wrapper.
| Does | Does not |
|---|---|
Copies auth.json locally between ~\.codex and profiles\<name> |
Upload tokens or set a permanent CODEX_HOME |
Clones ChatGPT.exe out of the Store package so it can start |
Run the Store binary in-place |
| Restores main auth on close, and refuses to save if active email == main | Delete ~\.codex history |
Do not commit auth.json, *.bak, or launch-trace.log (the log can contain emails).
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Uninstall-CodexMultiProfile.ps1
# add -PurgeProfiles to delete local profile auth copies too
~\.codex is never deleted.
MIT. See LICENSE.