| name | codex-account-switcher |
|---|---|
| description | Maintain and publish the macOS Codex Account Switcher app. Use when Graham asks to tweak, build, package, sanitize, or publish the menu-bar account switcher. |
Use this skill for the local/public Codex Account Switcher project.
Work from the root of this repository.
- Never commit
~/.codex/auth.json,~/.codex/accounts/,registry.json, tokens, account IDs, real account emails, or usage snapshots. - Never commit
build/or module caches. - Public account initials must be generic: use the first alphanumeric character from each account email unless the app user sets a custom label.
- Switch commands should use email queries, not numeric selectors like
01or02.
./build.sh./install.sh- Current local update is v1.8.3.1 / build 1831.
- Menu bar supports detailed and compact 5-hour or weekly usage displays.
- Active account is bright; inactive accounts are dimmed.
- Dropdown shows 5-hour usage for all accounts.
- The main panel supports three/four saved accounts with a compact 2x2 card grid and an empty slot.
- Reset-credit reads use a five-minute cache independent from the fast active-usage refresh, and account reset checks run concurrently with a cap of three.
- Reset redemption is not automatically retried and is only reported as confirmed after both the credit count and live usage windows agree.
- External helper commands have timeouts, Computer Use discovery is version-independent, and only the ten newest auth backups per account are retained.
- Verification is
./run-tests.sh,./build.sh,./install.sh, then./verify-install.sh. - Live usage values that come back as 400/401 should be treated as expired login, not healthy unknown usage. Ask Graham to remove/re-add or re-login that labelled account.
- The relaunch path may see leftover Codex helper PIDs; if Codex can still open, do not treat helper survivors alone as a failed relaunch.
- Low-usage auto-switch is notification/action based: the user clicks
Switch Now. - Launch-at-login is handled via a user LaunchAgent.
- If the menu-bar title gets stuck on
Adding accountafter a manual login, quitCodexAccountSwitcherand reopen/Applications/Codex Account Switcher.app, then runcodex-auth listto confirm the registry. - If the device-code button crashes or fails, inspect the Terminal/AppleScript helper path first. Do not assume the account registry is broken if
codex-auth listalready shows the re-added account with live usage. - After every local tweak, run
./build.sh,./install.sh, quitCodexAccountSwitcher, reopen/Applications/Codex Account Switcher.app, and verify the running process path.