Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ authmux parallel --install # Write aliases to shell rc file

### How it works

Each profile gets its own config directory at `~/.claude-accounts/<name>`. Shell aliases/functions set `CLAUDE_CONFIG_DIR` before launching `claude`, so each instance uses isolated credentials, settings, and history. `authmux parallel --install` writes Bash/Zsh aliases or Fish autoload functions based on `$SHELL`. Login and logout commands bypass Cue so refreshed OAuth tokens are written back to the right account directory. Generated login wrappers use `authmux parallel --login <name> --fresh --require-distinct`, which backs up stale Claude auth first and rejects a login that resolves to another configured profile. Run profiles in separate terminal tabs or tmux panes for true parallel usage.
Each profile gets its own config directory at `~/.claude-accounts/<name>`. Shell aliases/functions launch Claude from a per-session copy of that profile, so already-open sessions keep their original credentials even after a later `/login`. If a session refreshes login credentials, Authmux syncs the changed Claude auth files back to `~/.claude-accounts/<name>` so future `claude-<name>` launches use the new login. `authmux parallel --install` writes Bash/Zsh aliases or Fish autoload functions based on `$SHELL`. Login and logout commands bypass Cue so refreshed OAuth tokens are written back to the right account directory. Generated login wrappers use `authmux parallel --login <name> --fresh --require-distinct`, which backs up stale Claude auth first and rejects a login that resolves to another configured profile. Run profiles in separate terminal tabs or tmux panes for true parallel usage.

`authmux parallel --list` warns when two profiles contain the same Claude credentials or the same fresh Claude OAuth account UUID. Those profiles are not independent: logging in or out of one can invalidate the other because Claude sees them as the same account session. Re-run `authmux parallel --login <name> --fresh --require-distinct` and choose a different Anthropic account for any profile that should have its own subscription/session. If `.claude.json` is older than the active credentials, Authmux marks it as `claudeAccountState=stale` and does not use that stale UUID for duplicate-account detection.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-06-29
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# agent-codex-preserve-claude-login-credentials-for-fu-2026-06-29-22-49 (minimal / T1)

Branch: `agent/codex/preserve-claude-login-credentials-for-fu-2026-06-29-22-49`

Preserve live Claude parallel sessions by launching them from per-session config copies, while syncing changed login credentials back to the canonical profile for future launches.

## Handoff

- Handoff: change=`agent-codex-preserve-claude-login-credentials-for-fu-2026-06-29-22-49`; branch=`agent/codex/preserve-claude-login-credentials-for-fu-2026-06-29-22-49`; scope=`src/commands/parallel.ts src/tests/json-parity.test.ts README.md`; action=`add session-isolated Claude parallel launcher and finish via PR`.
- Copy prompt: Continue `agent-codex-preserve-claude-login-credentials-for-fu-2026-06-29-22-49` on branch `agent/codex/preserve-claude-login-credentials-for-fu-2026-06-29-22-49`. Work inside the existing sandbox, review `openspec/changes/agent-codex-preserve-claude-login-credentials-for-fu-2026-06-29-22-49/notes.md`, continue from the current state instead of creating a new sandbox, and when the work is done run `gx branch finish --branch agent/codex/preserve-claude-login-credentials-for-fu-2026-06-29-22-49 --base main --via-pr --wait-for-merge --cleanup`.

## Verification

- `npm run build` passed.
- `node dist/tests/json-parity.test.js` passed; sandboxed run hit `spawnSync node EPERM`, so verification ran with Guardex-approved escalation.
- `npm test` passed: 200 tests.

## Cleanup

- [ ] Run: `gx branch finish --branch agent/codex/preserve-claude-login-credentials-for-fu-2026-06-29-22-49 --base main --via-pr --wait-for-merge --cleanup`
- [ ] Record PR URL + `MERGED` state in the completion handoff.
- [ ] Confirm sandbox worktree is gone (`git worktree list`, `git branch -a`).
Loading
Loading