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.
Last scanned: 8/14/2026
{
"issues": [
{
"file": "SKILL.md",
"line": 62,
"type": "prompt-injection",
"message": "Possible concealment directive: \"do not tell the user\"",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-08-14T05:37:58.007Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}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 94 GitHub stars.
Yes. codex-multi-profile passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
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!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Unofficial helper for Codex Desktop on Windows when you need more than one authorized ChatGPT login and still want one shared workspace. Not for account sharing, quota bypass, or Terms-of-Use violations.
The product is Codex Accounts (Show-CodexAccountApp.ps1): a dark WPF window that lists profiles (masked email, last-used, depleted, sticky paths). Click a row launches Launch-CodexProfile.ps1 -FastSwitch (closes any open clone, uses saved auth.json, no password). This app does not implement chatgpt.com / device-code login; first-run still uses AuthSwap bootstrap inside Codex.
$root = "$env:LOCALAPPDATA\CodexParallelDesktop"
powershell -NoProfile -STA -ExecutionPolicy Bypass -File "$root\Show-CodexAccountApp.ps1"
# or
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action accounts
CLI route / pool / stick / depleted stay for agents.
| 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 |
| Account picker | Show-CodexAccountApp.ps1 (Desktop: Codex Accounts) |
| Profile launcher | Launch-CodexProfile.ps1 |
| Restore main | Launch-CodexMain.ps1 |
| Manager | CodexProfile.ps1 (accounts, new, list, status, doctor, pool, stick, route, depleted, layer, models, …) |
| Profiles | ...\profiles\<name>\ |
| Clone | ...\versions\<ver>\app\ChatGPT.exe |
| Shared home | %USERPROFILE%\.codex |
$root = "$env:LOCALAPPDATA\CodexParallelDesktop"
# Recommended: account picker
powershell -NoProfile -STA -ExecutionPolicy Bypass -File "$root\Show-CodexAccountApp.ps1"
# Recommended launch (AuthSwap, one named profile)
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 doctor
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action processes
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action repair
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action sync-check
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action diagnostics
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
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action pool
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action stick -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action route
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action depleted -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action layer
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action models
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action accounts
Show-CodexAccountApp.ps1 (or -Action accounts). Do not treat PowerShell route as the product UI.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 doctor / -Action verify.-Action repair (close clones first).-Action diagnostics or Redact-LaunchTrace.ps1.Humans pick in Codex Accounts. Agents use the actions below. Windows counterpart of b-nnett/codex-subscription-router routing, still AuthSwap (one auth.json).
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action pool
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action stick -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action route
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action depleted -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action depleted -Name codex1 -Disable
New work -> least-recently-used non-depleted profile. Same git repo -> sticky. Depleted owner -> failover. All depleted -> one message. If a Codex window is open, print the choice (do not launch a second window).
Layer and ChatGPT Web models are off by default:
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action layer
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action layer -Disable
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action models
powershell -NoProfile -ExecutionPolicy Bypass -File "$root\CodexProfile.ps1" -Action models -Disable
Layer targets the cloned ChatGPT.exe only. Models only write config.toml (no BOM) for a local Responses bridge on 127.0.0.1. This repo does not log into chatgpt.com and does not name a companion app.
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.
Unofficial helper. Not affiliated with OpenAI. Needs Codex Desktop from the Microsoft Store.
After install, open Codex Accounts on the Desktop. That is the product: a dark account list (name, masked email, last-used, depleted, sticky paths). Click a row or press Enter to launch that login via AuthSwap.
If a Codex window is already open, the app closes it and switches to the saved login. No password prompt when auth.json is present and not poisoned. First-run sign-in still happens inside Codex (this app does not collect a ChatGPT login).
Agents keep using the CLI: pool / stick / route / depleted.
One command. It downloads this repo and runs the Windows installer (AuthSwap + Codex Accounts):
irm https://raw.githubusercontent.com/Hung2124/codex-multi-profile/main/install.ps1 | iex
Until 0.2.0 is merged, that main URL still installs 0.1.4. Use the PR branch:
irm https://raw.githubusercontent.com/Hung2124/codex-multi-profile/feature/windows-codex-accounts-app/install.ps1 | iex
That is the Windows counterpart of b-nnett/codex-subscription-router curl | bash -- without patching ChatGPT.exe or unpacking app.asar.
scripts\Install-CodexMultiProfile.ps1).| Shortcut | What it does |
|---|---|
| Codex Accounts | See every login. Click / Enter to open that profile |
| Codex1 | Jump straight to the first secondary account |
| Codex Main | Restore the original account and open Store Codex |
| Codex Profiles | Legacy text picker |
Rule: close one Codex UI before opening the other.
From a git clone instead of the one-liner:
git clone https://github.com/Hung2124/codex-multi-profile.git
cd codex-multi-profile
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Install-CodexMultiProfile.ps1
Quick check after install:
$m = "$env:LOCALAPPDATA\CodexParallelDesktop\CodexProfile.ps1"
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action doctor
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action verify
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action pool
Humans: open Codex Accounts. Agents: CodexProfile.ps1 -Action route (and pool / stick / depleted).
Windows routing in the spirit of b-nnett/codex-subscription-router. Still one Codex window because AuthSwap uses a single ~\.codex\auth.json. Full table: docs/router.md.
| Situation | Behaviour |
|---|---|
| New chat / new folder | Least-recently-used non-depleted profile |
| Follow-up in the same git repo or workspace | Sticky owner |
| Sticky owner marked depleted | Fail over to another non-depleted profile |
| Every profile depleted | One combined message (masked emails). Nothing launches |
| A Codex window is already open | Print the choice. Do not open a second window |
$m = "$env:LOCALAPPDATA\CodexParallelDesktop\CodexProfile.ps1"
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action pool
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action stick -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action route
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action depleted -Name codex1
powershell -NoProfile -ExecutionPolicy Bypass -File $m -Action depleted -Name codex1 -Disable
Use only authorized personal / work accounts you own. Marking depleted is a local flag. This is not a quota-bypass product and not a live multi-account mux.
This repository is a local, open-source utility for Windows developers who already hold multiple authorized ChatGPT accounts (for example personal and work) and need to switch between them in Codex Desktop while keeping one shared workspace.
It is not intended for:
Use only accounts you own or are explicitly allowed to use. Changes that enable abuse are out of scope (CONTRIBUTING.md).
A second CODEX_HOME often does not switch accounts. The Desktop app-server still reads ~\.codex\auth.json, so you land on the main ChatGPT user.
| You try... | What actually happens |
|---|---|
Copy ~\.codex + set CODEX_HOME |
UI still shows the main account |
Start-Process with $env:CODEX_HOME |
Env is dropped -> wrong account |
Run ChatGPT.exe from WindowsApps |
Access Denied |
Launch Codex.exe |
Process exits with code 1 |
AuthSwap keeps sessions, skills, MCP, and memories in ~\.codex. Only auth.json moves for the profile window, then restores on close.
Set $root once, then call the actions you need:
$root = "$env:LOCALAPPDATA\CodexParallelDesktop"
$m = "$root\CodexProfile.ps1"
| Goal | Command |
|---|---|
| Open the account picker | ...\Show-CodexAccountApp.ps1 (or -Action accounts) |
| Open secondary account | ...\Launch-CodexProfile.ps1 -Name codex1 |
| Restore main + Store app | ...\Launch-CodexMain.ps1 |
Create codex2 |
-Action new -Name codex2 |
| List / status / doctor | -Action list / status / doctor |
| Pool / stick / route / depleted | -Action pool / stick / route / depleted |
| Repair stale AuthSwap lock | -Action repair |
| Install file sync check | -Action sync-check |
| JSON status | -Action status -AsJson |
| Running processes | -Action processes |
| Diagnostic bundle | -Action diagnostics |
| Verify install | -Action verify |
| Remove a profile | -Action remove -Name codex2 -Force |
| Optional clone layer | -Action layer / layer -Disable |
| Optional ChatGPT Web models | -Action models / models -Disable |
| Safe bug-report log | ...\Redact-LaunchTrace.ps1 |
| Update from git clone | .\scripts\Update-CodexMultiProfile.ps1 |
Existing 0.1.4 launch (Codex1 / Codex Main / doctor / verify / AuthSwap) is unchanged until you opt in to router, layer, or models.
Tests (no Codex UI required):
powershell -NoProfile -ExecutionPolicy Bypass -File .\tests\Run-All.ps1
~\.codex\config.toml (UTF-8, no BOM) with chatgpt-web/luna|light|medium|high|xhigh|pro pointing at a local Responses bridge you already run on 127.0.0.1 (default http://127.0.0.1:1455/v1). This repo does not log you into chatgpt.com and does not ship or name a companion scraper.Install also copies SKILL.md to:
%USERPROFILE%\.codex\skills\codex-multi-profile\%USERPROFILE%\.cursor\skills\codex-multi-profile\So Codex / Cursor agents know not to launch Codex.exe, not to use WindowsApps, and not to Start-Process without a .cmd wrapper.
| Does | Does not |
|---|---|
Copy auth.json locally between ~\.codex and profiles\<name> |
Upload tokens or set a permanent CODEX_HOME |
Clone ChatGPT.exe out of the Store package |
Run the Store binary in-place |
| Restore main auth on close; refuse to save if active email == main | Delete ~\.codex history |
| Choose among your profiles (sticky / LRU / depleted) | Mux many accounts in one window, patch asar, or bypass quotas |
Do not commit auth.json or *.bak. Prefer Redact-LaunchTrace.ps1 before pasting logs.
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Uninstall-CodexMultiProfile.ps1
# add -PurgeProfiles to also delete local profile auth copies
~\.codex is never deleted.
| Doc | Topic |
|---|---|
| Router | Codex Accounts app + pool / stick / route / depleted |
| Layer | Optional clone-only desktop tweaks |
| Architecture | Why AuthSwap exists |
| Troubleshooting | Wrong account, locks, BOM |
| FAQ | Common questions |
| Recipes | Daily command cards |
| Support | Bef |