DEV Community

Cover image for How to run multiple Claude accounts at once (Desktop + Claude Code), and why the obvious hacks break
Sebastian Balog
Sebastian Balog

Posted on Originally published at doubleclaude.com

How to run multiple Claude accounts at once (Desktop + Claude Code), and why the obvious hacks break

Disclosure up front: I build Claude Sessions Pro, a paid Mac app that does this. Most of this post is the free way to do it yourself, plus what I learned about why the DIY versions misbehave. The app gets one short section near the end.

If you have a company Claude account and a personal one, or one account per client, you've hit this: Claude Desktop is signed in to one account. To check the other one, you sign out, sign in, lose your place, and do it again an hour later.

Claude Code in the terminal has the same problem, just with a different config folder.

Here's how to fix it, from "free, two lines of shell" to "one click", and the gotchas nobody mentions until you've already set it up.

TL;DR

You want Do this
Two Claude Code (CLI) accounts CLAUDE_CONFIG_DIR=~/.claude-work claude for the second one
Two Claude Desktop windows, free Start a second copy with --user-data-dir (commands below)
Separate Dock icons, ‚åò-Tab, Google sign-in that lands in the right window, survives updates You need each account to be its own app, not just its own folder (see "Why the hacks break")

Why Claude Desktop can only hold one login

Claude Desktop is an Electron app, so it's Chromium underneath. Everything for the signed-in account (session cookies, settings, connectors, MCP config, the list of Claude Code sessions) lives in one user data directory:

  • macOS: ~/Library/Application Support/Claude
  • Windows: %APPDATA%\Claude (the Microsoft Store version redirects this into its package folder, under %LOCALAPPDATA%\Packages\Claude_‚Ķ\LocalCache\Roaming\Claude)

One folder, one cookie jar, one login. Signing in to account B overwrites account A's session.

Your chats aren't lost when you switch; they live in your account on Anthropic's side. What you lose is time, context, and the ability to see both at once.

So every working solution comes down to the same idea: give each account its own data directory.

Claude Code (CLI): one environment variable

The CLI is the easy part. It reads its login and settings from a config directory, which you can override:

# second account, one-off
CLAUDE_CONFIG_DIR=~/.claude-work claude
Enter fullscreen mode Exit fullscreen mode

Make it permanent with an alias in ~/.zshrc or ~/.bashrc:

alias claude-work='CLAUDE_CONFIG_DIR="$HOME/.claude-work" claude'
alias claude-personal='CLAUDE_CONFIG_DIR="$HOME/.claude-personal" claude'
Enter fullscreen mode Exit fullscreen mode

Run claude-work once, log in with the work account, done. Each folder keeps its own login, history and settings. This works the same on macOS, Linux and Windows (in PowerShell: $env:CLAUDE_CONFIG_DIR="$HOME\.claude-work"; claude).

Claude Desktop on macOS: a second copy, for free

Chromium apps accept --user-data-dir, and Claude Desktop honors it. This starts a second, independent Claude next to your normal one:

open -n -a Claude --args --user-data-dir="$HOME/Library/Application Support/Claude-Work"
Enter fullscreen mode Exit fullscreen mode
  • -n opens a new instance even though Claude is already running.
  • Everything after --args goes to Claude itself.

Sign in to the second account in the new window. Wrap it in a shell function so you can have as many as you want:

# ~/.zshrc
claude-profile() {
  local name="${1:?usage: claude-profile <name>}"
  open -n -a Claude --args --user-data-dir="$HOME/Library/Application Support/Claude-$name"
}
Enter fullscreen mode Exit fullscreen mode
claude-profile Work
claude-profile ClientA
Enter fullscreen mode Exit fullscreen mode

Want it clickable? Open Script Editor, paste do shell script "open -n -a Claude --args --user-data-dir=$HOME/Library/Application\\ Support/Claude-Work", then File ‚Üí Export ‚Üí File Format: Application. Drop it in the Dock.

That's the whole free method, and for a lot of people it's enough. Now the part the copy-paste guides skip.

Why the hacks break (the interesting part)

All of these come from one fact: to the operating system, both windows are still the same app.

1. One Dock icon, one ‚åò-Tab entry

macOS groups windows by bundle identifier (com.anthropic.claudefordesktop). Your two instances share it, so they share a Dock icon, a name, and a single ‚åò-Tab slot. You can't tell which window is which account without looking inside it.

A Script Editor launcher doesn't fix this. The launcher is its own app, but the Claude window it opens still belongs to Claude.

2. Google sign-in comes back to the wrong window

This one costs people the most time. When you click Continue with Google, Claude opens your browser. After you log in, the browser hands the result back through a claude:// link.

The OS routes that link to the app registered for claude://, not to the specific window that started the login. With two instances of the same app, the link goes to whichever instance the OS picks, usually the first one. So you sign in to your work account and it lands in your personal window, or nowhere useful.

On Windows it's even more deterministic. Chromium's single-instance logic means a new launch first checks for a lock file in the default data folder; if that instance is running, the link gets forwarded to it. So the default Claude window always wins.

Workarounds: use email sign-in for the extra profiles, or quit every other Claude window while you sign in to the new one.

3. Claude Code sessions don't follow you

The Code tab in Claude Desktop lists sessions from the data directory it's using. A fresh Claude-Work folder starts empty, even if that account has sessions in your main Claude. They aren't gone; they're in the other folder. You'd have to copy the right ones over by hand.

4. "Just copy Claude.app and rename it" doesn't survive updates

The natural next step is duplicating Claude.app, changing its bundle ID and name in Info.plist, and re-signing it, so each account really is a separate app with its own Dock icon. That does fix #1.

But Claude updates itself, and an update can bring back the original bundle or leave you with a copy that's stuck on an old version. Then you're redoing the copy, re-signing, and re-pointing it at the right data folder after every Claude release.

Claude Desktop on Windows: the same trick

Claude for Windows installs through the Microsoft Store, with a command alias you can call directly. In PowerShell:

Start-Process "$env:LOCALAPPDATA\Microsoft\WindowsApps\claude-desktop.exe" `
  -ArgumentList "--user-data-dir=`"$env:USERPROFILE\ClaudeProfiles\Work`""
Enter fullscreen mode Exit fullscreen mode

Same rules as on the Mac: each --user-data-dir is a separate login. And the same gotchas apply:

  • All windows share one taskbar icon and the title "Claude".
  • Google sign-in returns to the default Claude window (see #2), so sign in to extra profiles with email, or close the main Claude first.
  • If Claude's own "start with Windows" setting is on, the default instance is always running and always catches the sign-in.

The other options, briefly

  • A second browser profile with claude.ai. Totally fine for chatting. You lose the desktop-only features for that account: the Code tab, local MCP servers and desktop connectors.
  • A second OS user account. Fully isolated, including Claude Code. But you only see one user's desktop at a time, and none of your files or apps come along.
  • Sign out and back in. Free and built in. Fine weekly, painful hourly.
  • Apps that do it for you. Parall (a general launcher for many apps, $9.99 in the Mac App Store), Multi-Claude ($20) and Claude Sessions Pro ($15) all turn each account into its own app.

What I built

I got tired of doing all of the above by hand, so I built Claude Sessions Pro for macOS. It makes each account a real, separate Mac app built from your installed Claude, which is what fixes the gotchas above:

  • Own app per account: "Claude Work", "Claude Personal", each with a colored letter badge on its Dock icon and its own ‚åò-Tab spot.
  • Google sign-in works with the other accounts still open, and returns to the profile that asked for it.
  • Claude Code sessions and pins come along: sessions from your main Claude move into the matching account's profile, and the CLI opens per profile with its own CLAUDE_CONFIG_DIR.
  • Survives Claude updates: when Claude updates, each profile app is rebuilt from the new version the next time it isn't running. Logins and data stay put.
  • Menu bar switcher to open or switch accounts.

It's $15 one-time for up to 2 computers, with a 1-hour free preview that starts once you've signed in to a profile. I'd rather you see it working with your own accounts before paying.

A Windows version is coming soon. Same idea, built for Windows' quirks: it routes Google sign-in to the right window and labels every window with its account. If you want to know when it ships, doubleclaude.com is where it'll land.

Here's the full comparison table with every method: How to run multiple Claude accounts on one Mac.

Is this allowed?

Plenty of people have legitimate separate accounts: a company Team account plus a personal Pro one, or one per client. Everything above runs the official Claude app and doesn't change how Claude works.

But Anthropic's terms apply to each account. Creating extra accounts specifically to dodge usage limits is the kind of thing that gets accounts suspended. Read the Consumer Terms and Usage Policy, and only use accounts you're allowed to use.


If you've found another approach (or another gotcha), drop it in the comments. I'm especially curious how people handle this on Linux, where Claude Desktop isn't official.

Top comments (0)