Operator OS
All pages

Accounts

Multiple accounts and the NDA boundary

Maya has two lives on one Mac: side projects (personal account) and a job at Acme Corp (work account, under NDA). This layer keeps them apart without making her live in two worlds.

Why more than one account

  • Employer rules. Work data must not mix with personal data. Separate accounts give separate logins, history and memory.
  • Usage limits. When one account runs out, you open the other and keep going.
  • Clarity. You always know whose context you are in.

How it works

Claude Code reads its whole state from one folder. CLAUDE_CONFIG_DIR picks the folder. So an "account" is just a folder plus a login.

Account Folder Command
personal ~/.claude claude
work ~/.claude-work claude-work
work2 (optional) ~/.claude-work2 claude-work2

Setup

  1. Make the accounts:
    multi-account/scripts/claude-accounts.sh add work
    multi-account/scripts/claude-accounts.sh add work2
    Add --dry-run first to see what it would do.
  2. Add the aliases: source multi-account/shell-aliases.zsh from ~/.zshrc.
  3. Run claude-work once and log in with the work login. Repeat for work2.
  4. Two work accounts that should share history and memory:
    multi-account/scripts/claude-accounts.sh link work2 --share-with work
  5. Check: claude-accounts.sh status.
  6. Rerun claude-accounts.sh sync-skills whenever you install a new personal skill.

What is shared and what is not

Thing Shared? How
Your rules (CLAUDE.md) Yes Work folders symlink to ~/.claude/CLAUDE.md
Skills Yes, one way Sync script symlinks personal skills into each work account. Never overwrites a real folder, so account-specific skills stay
Transcripts (projects/) Between work accounts Symlink via link
Work memory Between work accounts Lives in the encrypted work repo, symlinked
Personal memory Never Marked with an empty .private-memory file: never merge
Plugins and marketplaces No Install per account
Connectors (Gmail, Calendar, etc.) No Authorize again in each account
Login and billing No Each account has its own

The NDA boundary

  1. Work data lives in one folder: ~/Work/acme/.
  2. That folder is a git-crypt repo: encrypted on disk in git and on the remote.
    multi-account/scripts/git-crypt-setup.sh ~/Work/acme ~/.config/work/acme.key
  3. The key is backed up off the machine (password manager or private drive). It cannot be rebuilt.
  4. Never copy work facts into personal memory, personal repos or side-project folders.
  5. Asked to do work stuff from the personal account? Fine, same file tree. But write the facts into the work repo, not personal memory.
  6. The work account's settings allow-list only specific work scripts, not broad commands.
  7. Deploy and publish rights follow the work rules. Reading is looser than writing.

One VS Code window per account

The Claude Code extension reads claudeCode.environmentVariables at machine scope. One VS Code profile means one account for every window. The fix is a separate --user-data-dir per account.

multi-account/scripts/vscode-account.sh work "#f4b6c2"
multi-account/scripts/vscode-account.sh work2 "#b7e4c7"

Each run writes the profile settings (CLAUDE_CONFIG_DIR plus a status bar color) and makes a launcher in ~/Applications. Extensions are shared, so nothing reinstalls. Pick one color per account. Personal stays uncolored. Glance at the bar and you know where you are.

When an account hits its limit

  1. In the full account, note the session id (claude --resume lists sessions).
  2. Open the other account's window or terminal.
  3. claude-work2 --resume <session-id>. This works because work accounts share projects/.
  4. Do not return to the first account for that session until the other one is closed.

Lessons

  • Machine-scope env var forces separate VS Code profiles. There is no per-window setting for it.
  • Never open the same session in two accounts at once. Both write to one transcript file and corrupt it.
  • Connectors are per account. A new account starts with none; authorize each one.
  • Plugins do not sync. Install them again, or accept the difference.
  • Sync skills one way. Two-way sync creates conflicts. Personal is the pool.
  • Back up the git-crypt key before the first commit. Not after.
  • Run status after any change. A broken symlink fails silently.