From 9ca48fb47c588f7ee127d84f3503dd4862e6e644 Mon Sep 17 00:00:00 2001 From: NagyVikt Date: Sat, 11 Apr 2026 14:36:58 +0200 Subject: [PATCH] Document real VS Code repo layout and codex-auth pairing workflow Add a concrete Source Control layout example that mirrors how musafety sets up main + agent worktrees in one VS Code window, and add a companion section describing codex-auth for multi-account switching. Constraint: User requested branch + PR flow for this README-only change Rejected: Keep docs edit directly on main | user explicitly asked for PR merge flow Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep this section focused on integration context; defer full codex-auth CLI reference to its upstream repo Tested: npm test (46/46), node --check bin/multiagent-safety.js Not-tested: Rendered markdown preview in GitHub UI --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/README.md b/README.md index bfe480b..cca9332 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,66 @@ By default this writes: ![musafety source control multi-agent screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/workflow-source-control.svg) +#### Real VS Code Source Control example (after `musafety setup`) + +This is the exact layout you should expect in VS Code Source Control after setup +and a few `agent-branch-start` runs: + +```text +multiagent-safety (main) +agent_codex_-- +agent_bot_-- +agent_bot_-- +``` + +That gives you one stable main repo view plus parallel agent worktrees in the +same VS Code window, so branch ownership and progress stay visible at once. + +## Companion tool: `codex-auth` account switcher + +If you run multiple Codex identities, this workflow pairs well with +[`codex-auth`](https://github.com/recodeecom/codex-account-switcher-cli/tree/main), +a CLI that snapshots `~/.codex/auth.json` per account and lets you switch fast +without repeated login/logout loops. + +> [!WARNING] +> Not affiliated with OpenAI or Codex. Not an official tool. + +How `codex-auth` works: + +- stores named snapshots in `~/.codex/accounts/*.json` +- switches by replacing active `~/.codex/auth.json` +- keeps lightweight per-terminal session memory (default key is shell PPID), + so older terminals can keep their original account context + +Requirements: Node.js 18+ + +Install: + +```sh +npm i -g @imdeadpool/codex-account-switcher +``` + +Common commands: + +```sh +codex-auth login [name] +codex-auth save +codex-auth use +codex-auth list --details +codex-auth current +codex-auth status +codex-auth self-update --check +``` + +Optional shell-hook helpers: + +```sh +codex-auth setup-login-hook +codex-auth hook-status +codex-auth remove-login-hook +``` + ## Copy prompt for your AI (Codex / Claude) ```sh