{"slug": "multiple-claude-desktop-instances-on-macos-color-coded-no-duplicate-launchers", "title": "Multiple Claude Desktop instances on macOS — color-coded, no-duplicate launchers (personal + work accounts)", "summary": "A developer created a method to run multiple isolated Claude Desktop instances on macOS, each with a color-coded Dock launcher that focuses existing windows instead of spawning duplicates. The solution uses Electron's --user-data-dir flag to create separate profiles and a smart launcher script that detects running instances to prevent duplicate windows. This allows users to maintain separate personal and work accounts simultaneously without conflicts.", "body_md": "Run **two (or more) fully isolated Claude Desktop instances** side by side on macOS — e.g. one\nsigned into your **personal** account and one into your **work** account — each with its own\n**color-coded Dock launcher** that **focuses the existing window instead of spawning duplicates**.\n\nThis builds on Philipp Stracker's excellent\n[ --user-data-dir approach](https://gist.github.com/stracker-phil/9f84927a556632c7f9cc06663b534f14)\n(\n\n[write-up](https://philippstracker.com/multiple-claude-instances/)) and adds two things:\n\n**Recolored icons** so you can tell the launchers apart at a glance (blue work / red personal / etc.).- A\n**smart, self-contained launcher** that fixes the \"every click opens another window\" problem.\n\nThe most reliable setup is to create a\n\nseparate, dedicated instance for each account — including your \"personal\" one — and stop using Claude's built-in default profile for day-to-day use.Don't try to make one launcher target the shared default profile.Why: Claude has\n\nno per-profile single-instance lock, so two processes can run on one profile at once — andonly theIf a \"personal\" launcher points at the default profile (which the stock Claude icon also uses), you end up with duplicate, logged-out windows. Giving each account its own dir guaranteesfirstinstance on a profile can use its login database. Every additional instance on that same profile shows up logged out.one profile → one instance → always logged in, and makes the focus-don't-duplicate logic rock-solid.Already logged into the default profile and don't want to re-auth? See\n\n[Migrating an existing login]— you can copy your current profile into the new dedicated dir.\n\nClaude Desktop is an Electron app. Electron's `--user-data-dir`\n\nflag points the app at a\ncompletely separate profile folder (config, sessions, **auth tokens**, MCP servers, Cowork data):\n\n```\nopen -n -a \"/Applications/Claude.app\" --args --user-data-dir=\"$HOME/.claude-instances/work\"\n```\n\nA tiny macOS `.app`\n\n\"wrapper\" just runs that command, so it shows up in Launchpad/Dock like a\nnormal app. Each wrapper stores its instance name in `Contents/MacOS/config.sh`\n\nand runs\n`Contents/MacOS/claude-launcher`\n\n.\n\nThe naive launcher uses `open -n`\n\n— the `-n`\n\nflag means *\"open a NEW instance, even if one is\nalready running.\"* Claude has **no per-profile single-instance lock**, so **every click spawns\nanother process** against the same profile dir. That stacks up duplicate windows and risks\ncorrupting the shared profile.\n\nThe **smart launcher** in this gist fixes it. On click it inspects *that specific instance*\n(matched by `--user-data-dir`\n\n; for the default instance, the main process that has *no*\n`--user-data-dir`\n\n) and does one of three things:\n\n**Running with a window**→ focuses that process's window by PID via System Events. No duplicate.** Running but windowless**→ opens a fresh window. Claude keeps its main process alive after you close the window, and a windowless instance*cannot*be re-shown per-instance (all instances share one bundle id, so`open -a`\n\n/ \"activate\" can't target it). We deliberately**do not kill** the windowless process: it is often windowless precisely because it's still doing background work (e.g. a chat that's \"thinking\"), and killing it would lose that work. The leftover windowless process is harmless and goes away when you fully**Quit (⌘Q)** Claude.**Not running**→ launches fresh with`open -n`\n\n.\n\nHow \"has a window?\" is detected: a live window shows up as one or more `--type=renderer`\n\nprocesses\nfor that profile; closing the window drops that count to 0.\n\nSo \"always click the launcher you want\" reliably **focuses-or-launches** the right instance, even\nafter you've closed its window.\n\nTip:to keep the focus-don't-relaunch behavior working,close Claude with ⌘W(close window, app keeps running) when you want it to stay live, and⌘Qwhen you truly want it gone.\n\nThe recolored icon lives on the **launcher you click**. Because all instances share the one\n`/Applications/Claude.app`\n\nbinary, **while running they all show the same stock Dock icon and the\nname \"Claude\"** — the color only marks the launcher. The reliable in-app tell is the signed-in\naccount. (Truly distinct *running* Dock icons would require a full standalone copy of Claude.app.)\n\n```\n# 0. Have Claude Desktop installed at /Applications/Claude.app  (https://claude.ai/download)\n\n# 1. Download the scripts from this gist, then make the helper executable\nchmod +x make-claude-instance.sh\n\n# 2. Create a WORK instance (isolated profile) with a BLUE launcher\n./make-claude-instance.sh work Work 135\n\n# 3. Create a PERSONAL instance (its own isolated profile) with a RED-ORANGE icon\n./make-claude-instance.sh personal Personal -7\n\n# 4. Launch from Launchpad / drag to Dock:  \"Claude Work\"  and  \"Claude Personal\"\n#    First launch of each is a fresh profile -> sign into the right account once.\n```\n\n- The\n**first** time a launcher focuses a running window, macOS asks*\"Claude … wants to control System Events\"*→ click**OK**(one time per launcher). **Give every instance its own isolated dir**— use a real name like`personal`\n\n/`work`\n\n,**not**`default`\n\n. One profile → one instance (see the ⭐ callout above for why).- The instance name\nis still supported (it uses Claude's built-in profile with no`default`\n\n`--user-data-dir`\n\n) for folks who want one launcher onto the stock profile — but it's only safe if that profile is*never*run by more than one instance at a time (i.e. don't also use the stock Claude icon). A dedicated dir is the robust, recommended choice.\n\n| Look | hueShift | satGain (optional) |\n|---|---|---|\n| Stock orange | `0` |\n`1.0` |\n| Red-orange | `-7` |\n`1.08` |\n| Green | `+80` |\n`1.0` |\n| Blue | `+135` |\n`1.0` |\n| Purple | `+170` |\n`1.0` |\n\nIcon recoloring is **optional** — it only runs if Python 3 + [Pillow](https://pypi.org/project/Pillow/)\nare available (`pip install Pillow`\n\n). Without them you still get a fully working launcher with the\nstock icon.\n\nIf you're already signed into Claude's **default** profile and want your new dedicated instance to\nstart out logged in (with your settings, MCP servers, and sessions intact), copy the profile across\n**while Claude is fully quit** so the copy is consistent:\n\n```\n# 1. Quit Claude completely first (⌘Q every window; make sure nothing is running):\nps -axo command | grep \"[C]laude.app/Contents/MacOS/Claude\"   # should print nothing\n\n# 2. Copy the default profile into your new dedicated dir, skipping lock files + caches:\nrsync -a \\\n  --exclude 'Singleton*' \\\n  --exclude 'Cache' --exclude 'Code Cache' --exclude 'GPUCache' \\\n  --exclude 'DawnGraphiteCache' --exclude 'DawnWebGPUCache' --exclude 'ShaderCache' \\\n  --exclude 'Crashpad' --exclude 'blob_storage' \\\n  \"$HOME/Library/Application Support/Claude/\"  \"$HOME/.claude-instances/personal/\"\n```\n\nYour original default profile is left untouched (the stock Claude icon still opens it). The auth token lives in the copied profile (and/or the shared macOS Keychain), so the new instance should launch already signed in. If it doesn't, just sign in once — it sticks from then on.\n\nHeads-up on size: the local-agent / Cowork runtime lives in a\n\n`vm_bundles/`\n\nfolder that can bemany GB. The copy above includes it. To save disk, you can`rm -rf`\n\nthe`vm_bundles`\n\nfolder in the new dir afterward — it re-downloads on demand the next time you use that feature.\n\n```\n# List running Claude instances and their profiles\nps -axo pid,command | grep \"[C]laude.app/Contents/MacOS/Claude\"\n\n# Remove a wrapper + its profile\nrm -rf \"/Applications/Claude Work.app\"\nrm -rf \"$HOME/.claude-instances/work\"\n```\n\n— builds the`make-claude-instance.sh`\n\n`.app`\n\nwrapper (Info.plist, config, smart launcher) and optionally recolors the icon.— the self-contained smart launcher template (embedded into each wrapper).`claude-launcher`\n\n— hue/saturation recolor of the`recolor-icon.py`\n\n`.icns`\n\n(used by the helper; needs Pillow).\n\nCore `--user-data-dir`\n\nisolation technique by\n[Philipp Stracker](https://philippstracker.com/multiple-claude-instances/). Smart focus-or-launch\nbehavior and icon recoloring added here.", "url": "https://wpnews.pro/news/multiple-claude-desktop-instances-on-macos-color-coded-no-duplicate-launchers", "canonical_source": "https://gist.github.com/aoxborrow/5a3a0ac0aa37819cc19439b70a552221", "published_at": "2026-06-16 05:33:33+00:00", "updated_at": "2026-07-10 02:35:16.529871+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Claude Desktop", "Anthropic", "macOS", "Philipp Stracker", "Electron"], "alternates": {"html": "https://wpnews.pro/news/multiple-claude-desktop-instances-on-macos-color-coded-no-duplicate-launchers", "markdown": "https://wpnews.pro/news/multiple-claude-desktop-instances-on-macos-color-coded-no-duplicate-launchers.md", "text": "https://wpnews.pro/news/multiple-claude-desktop-instances-on-macos-color-coded-no-duplicate-launchers.txt", "jsonld": "https://wpnews.pro/news/multiple-claude-desktop-instances-on-macos-color-coded-no-duplicate-launchers.jsonld"}}