[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-101344":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":38,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":15,"starSnapshotCount":15,"syncStatus":42,"lastSyncTime":43,"discoverSource":44},101344,"claude-desktop-multiple-windows-different-api","TonF1917\u002Fclaude-desktop-multiple-windows-different-api","TonF1917","Multiple windows for Claude Desktop with different APIs at the same time: keep your official Claude subscription in one window and run other windows on custom \u002F third-party APIs (cc-switch). Windows. 多开 Claude Desktop,多个窗口同时使用不同 API(官方订阅 + 第三方 API 同时工作)。","",null,"PowerShell",985,65,102,0,1,389,59.96,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31,32,33,34,35,36,37],"anthropic","api-switcher","cc-switch","claude","claude-code","claude-desktop","custom-api","different-api","multi-account","multi-api","multi-window","multiple-windows","third-party-api","windows","2026-11-11 06:30:40","2026-11-16 19:48:27","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fclaude-violet.png\" width=\"128\" alt=\"Claude Multi Violet Icon\" \u002F>\n\u003C\u002Fp>\n\n# Claude Desktop: multiple windows with different APIs at the same time\n\n**English** · [简体中文](README.zh-CN.md)\n\n**Use several Claude Desktop windows at once, each on a different API.** Keep your **official Claude subscription** in one window and run as many other windows as you like on **custom \u002F third-party APIs** (driven by [cc-switch](https:\u002F\u002Fgithub.com\u002Ffarion1231\u002Fcc-switch)). Multi-API, multi-window, multi-account Claude Desktop - on **Windows** (tested) and **macOS** (experimental).\n\nEvery window has its own data, its own **recoloured icon** (desktop, taskbar, system tray), its own taskbar button and - if you choose - its own API. The default third-party colour is the official icon in **purple-black with a white star**; pick any palette (Gemini, GPT, Perplexity, DeepSeek, WorkBuddy) or any `#RRGGBB`.\n\n> Unofficial community tool. Not affiliated with or endorsed by Anthropic or cc-switch. Icons are generated **locally** from the icon of your installed app; no Anthropic artwork is shipped in this repository.\n\n## Features\n\n* **Official + third-party at the same time.** The official window keeps your subscription login; other windows run on whatever API cc-switch points them at.\n* **A different API per window.** Pick a cc-switch provider for each window (it then talks to that provider's upstream directly), or let a window *follow* cc-switch's current selection.\n* **As many windows as you want**, in a small GUI in the Anthropic look (English by default, 中文 switch built in).\n* **Separate icons everywhere:** desktop shortcut, taskbar button, window icon, **system-tray icon and tooltip**.\n* **Shared sessions:** new sessions, titles, pinned\u002Fstarred sessions, pin order and MCP servers are mirrored between windows; idle background windows restart silently to load them.\n* **`claude:\u002F\u002F` links** open in the window you used last (or a fixed one).\n* **Same session in two windows?** You get a Windows notification before the two transcripts drift apart.\n* **Update-proof:** nothing is patched or copied on Windows; the install path is resolved from the Store package at every launch.\n\n## Windows - quick start\n\nRequirements: Windows 11 (10 should work), PowerShell 5.1+, Claude Desktop from the Microsoft Store (`AnthropicPBC.Claude`), [cc-switch](https:\u002F\u002Fgithub.com\u002Ffarion1231\u002Fcc-switch) with a *Claude Desktop* provider.\n\n```powershell\ngit clone https:\u002F\u002Fgithub.com\u002FTonF1917\u002Fclaude-desktop-multiple-windows-different-api\ncd claude-desktop-multiple-windows-different-api\n.\\claude-multi.ps1 install        # icons + shortcuts for every window in instances.json\n.\\claude-multi.ps1 gui            # or use the Desktop shortcut \"Claude Multi Manager\"\n```\n\nThen right-click each new Desktop shortcut and choose **Pin to taskbar** (Windows does not let scripts pin).\n\n| Command | What it does |\n|---|---|\n| `gui` | the manager window |\n| `add -Id off2 -Name \"Claude Official 2\" -Kind official -Palette perplexity [-Proxy \u003Curl>] [-Timezone \u003Ctz>]` | add a secondary official direct window (supports custom tint, dedicated proxy & process timezone) |\n| `add -Id gem -Name \"Claude Gemini\" -Palette gemini [-Provider \u003Cid>] [-Proxy \u003Curl>] [-Timezone \u003Ctz>]` | add a third-party window (any palette name or `\"#E11D48\"`) |\n| `init [-Id \u003Cid>]` (alias `setup`) | provision\u002Frepair instance environment (creates Data dir, mirrors MCP config, junctions sessions, generates tinted icon & desktop shortcut) |\n| `check [-Id \u003Cid>]` (alias `test-ip`) | audit instance egress IP, residential\u002Fdatacenter status, risk score (0-100), Claude region eligibility & timezone alignment |\n| `install [-Force]` | (re)build icons and shortcuts; rewires your existing pinned Claude shortcuts |\n| `launch -Id gem` | start a window |\n| `list`, `providers`, `sync`, `remove -Id gem`, `icons -Force`, `uninstall` | housekeeping |\n\n## macOS - experimental\n\nThe port lives in [`macos\u002F`](macos) (Python 3 from the Xcode Command Line Tools, standard library only). It was written **without access to a Mac**: configuration, palettes, icon recolouring, cc-switch profiles, session mirroring and the GUI are exercised on Windows; the macOS-only steps (cloning `Claude.app`, `codesign`, `open`, `iconutil`) follow the documented tool behaviour but have **not been run on real hardware**. Bug reports with the terminal output are very welcome.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FTonF1917\u002Fclaude-desktop-multiple-windows-different-api\ncd claude-desktop-multiple-windows-different-api\npython3 macos\u002Fclaude_multi.py gui\npython3 macos\u002Fclaude_multi.py add --id gem --name \"Claude Gemini\" --palette gemini\npython3 macos\u002Fclaude_multi.py install      # one tinted APFS clone of Claude.app per extra window (~\u002FApplications\u002FClaude Multi)\npython3 macos\u002Fclaude_multi.py launch --id gem\npython3 macos\u002Fclaude_multi.py agent &      # session mirroring + silent background refresh\n```\n\nNot ported yet on macOS: pin\u002FMCP sync, `claude:\u002F\u002F` routing, tray icon, official-window isolation (launching Claude from the Dock while cc-switch has a third-party profile applied can switch it to third-party mode).\n\n## Multi-Official Account Support & Anti-Risk Isolation\n\nIn addition to 1 Official + N Third-Party windows, the tool now fully supports **running multiple official subscription accounts (1P) and third-party accounts (3P) concurrently side-by-side**:\n\n1. **Pure Direct Multi-Official Connections**: The primary official instance uses the default home directory. Secondary official instances (e.g., `official2`) get isolated virtual data directories and private `LOCALAPPDATA` with empty `Claude-3p`, completely stripping `configLibrary` checks to guarantee 100% pure 1P direct connections without session collisions.\n2. **Dedicated Network & Proxy Isolation (`-Proxy`)**: Bypasses the client-side block on `--proxy-server` by dynamically injecting `$env:HTTPS_PROXY` at the child-process level. Assigns dedicated residential proxy exits per account to prevent multi-account IP association bans.\n3. **Process-Level Timezone Alignment (`-Timezone`)**: Dynamically injects `$env:TZ` (e.g. `America\u002FToronto`, `Asia\u002FJakarta`) into the child process. The Electron \u002F V8 JavaScript layer aligns 100% with the egress IP's physical location **without mutating Windows system timezone**, eliminating cross-regional mismatch flags.\n4. **Automated Provisioning & Egress Audit (`init` & `check`)**:\n   - `.\\claude-multi.ps1 init [-Id \u003Cid>]`: Provisions the complete environment in one click (creates Data dir, mirrors MCP `claude_desktop_config.json`, junctions `claude-code-sessions`, and generates tinted icons and shortcuts).\n   - `.\\claude-multi.ps1 check [-Id \u003Cid>]`: Audits all instances' egress IP, residential\u002Fdatacenter status, fraud risk score (0-100), Claude regional support, and timezone alignment.\n\n## Using cc-switch\n\nChoose a *Claude Desktop* provider in cc-switch (not \"Official\"). cc-switch starts its gateway on `127.0.0.1:15721` and writes the profile into the shared 3P config folder. Windows that **follow** cc-switch use that gateway and its *currently selected* provider. Windows with a **specific provider** get a profile built from that provider's own base URL, key and model routes and talk to its upstream directly (Anthropic-format providers only; model ids are the real upstream ids). That is how two windows use two different APIs at the same moment. A hand-written profile can be set per window with `\"profile\": \"path\\\\to\\\\profile.json\"` (see `examples\u002Fprofile.example.json`).\n\nWhen cc-switch is set to *Official*, third-party windows have no profile and show the normal sign-in screen.\n\n## What is synced between windows\n\n| Item | Synced? | How \u002F when it shows up in another window |\n|---|---|---|\n| Sessions (new ones, titles, archive state) | yes | files mirrored within seconds; the other window loads them after its silent background restart |\n| Pinned \u002F starred sessions and pin order | yes | the `isStarred` flag in each session, plus `starred-*` and `pinnedOrder` in `claude_desktop_config.json`; written into a window only while it is closed (or just before its background restart) so the app cannot overwrite it |\n| MCP servers | yes | same mechanism (`mcpServers`); switch off in the GUI |\n| Conversation transcripts | yes (natively) | they live in `~\\.claude\\projects`, shared by every window |\n| Login, provider, model list, window size\u002Fposition | no | per window on purpose |\n\n**Known limit - pins.** Each Claude Desktop keeps its pinned list in memory and rewrites it itself: a running window keeps showing its own pins until it is restarted, and a starting window trims the list it reads (tested: 17 pins written while closed came back as 12 within 8 seconds; the dropped ones are sessions created after 12 Oct 23:50 plus one older one - the rule is the app's, not ours). This tool keeps the config files identical and never lets an empty or new window wipe them, but it cannot force two windows to *display* the same pins.\n\n**Why not instantly?** Claude Desktop does read these folders - but only when it starts, and again only when the signed-in account or organisation changes. It has no file watcher, rewriting its `config.json` does not make it re-read anything, and remote debugging is blocked in the production build, so nothing outside the app can tell a running window to re-read the folder. The closest safe thing is the silent restart: a window restarts in the background **only** if it is not focused, has not written a session file in the last 45 s, and none of its agent\u002Ftool child processes is using CPU. The restarted window comes back **minimised and without taking the focus** (it is started with `SW_SHOWMINNOACTIVE`), and syncing shows no pop-ups at all: notifications are off by default and can be switched on in the manager. A window you are using right now (focused **and** keyboard\u002Fmouse input in the last 90 s) is never restarted: you get a Windows notification with a **Reload now** button instead (or use *Restart selected* in the manager); once you have been idle for 90 s it is refreshed automatically. Session folders may be shared between windows through junctions - the check is therefore per running window (\"does it know every session file that exists?\"), not based on copying. The official window is excluded unless you tick *Also live-refresh the official window* (it may hold unsent drafts).\n\n**Same session in two windows.** Every window runs its own Claude Code process per session (`--resume=\u003Cid>`). If you send in both, both append to the same transcript while each keeps its own context, so the history interleaves and the windows disagree. The agent notifies you when a session is live in two windows and one of them is working - keep a session active in one window at a time.\n\n**How sessions look.** Every window shows the same merged list; there is no per-window badge. A session keeps its folder, model and effort, but when you open it in another window it runs through **that window's** login\u002Fprovider (subscription in the official one, the chosen provider in a third-party one).\n\n## How it works (what was found the hard way)\n\n1. **One config library for everyone.** The app reads `configLibrary` from `%LOCALAPPDATA%\\Claude-3p`; cc-switch writes the third-party profile there; a profile with `disableDeploymentModeChooser` forces *every* window that reads it into 3P mode - including the official one on its next start.\n2. **`--user-data-dir` and `CLAUDE_USER_DATA_DIR` do not help on Windows.** The production build strips the env var and overrides the data dir in 3P mode, so a second 3P window collides with the first and exits silently.\n3. **`%LOCALAPPDATA%` does.** The 3P data dir is derived from that variable, so each extra window starts with its own private `LOCALAPPDATA` (`~\\.claude-multi\\\u003Cid>\\Local`) and its own profile.\n4. **Official isolation.** The official app is started with a private `LOCALAPPDATA` whose `Claude-3p` is empty (`Claude` and `Packages` are junctions to the real ones), so it can never be forced into 3P.\n5. **Separate taskbar buttons and tray icons.** Electron gives every window the same AppUserModelID. A small background agent sets a per-window ID and icon (`SHGetPropertyStoreForWindow`, `WM_SETICON`) and re-skins the window's notification-area icon (`Shell_NotifyIcon`, `NIM_MODIFY`); the shortcuts carry matching IDs.\n6. **Icons must not live in `AppData\\*\\ClaudeMulti`.** Explorer and the taskbar render a blank page for `.ico` files under such a folder (a `.ico` anywhere else works), so icons are generated into `~\\.claude-multi\\icons`.\n7. **Update-proof.** The install path is resolved from the MSIX package on every launch; nothing is copied or patched, and no version number is stored.\n\n## Caveats\n\n* Windows: the official window picks up its isolation the next time it is **restarted**; a running window is never touched.\n* Shortcuts that bypass this tool (Start-menu tile, protocol links registered elsewhere) start the official app without isolation.\n* Everything relies on undocumented app behaviour and may break with a future Claude Desktop release.\n* cc-switch is an independent project.\n\n## License\n\nMIT - see [LICENSE](LICENSE).\n","这是一个为 Windows（兼容 macOS）设计的 Claude Desktop 多开管理工具，支持在同一系统中并行运行多个独立窗口，每个窗口可绑定不同 API 后端（如官方 Anthropic 订阅或第三方 cc-switch 提供的 API）。核心功能包括：按窗口隔离 API 配置、独立图标与任务栏标识、共享会话状态（如 pinned 会话、MCP 服务）、本地生成图标、`claude:\u002F\u002F` 协议路由及防会话漂移提示。项目基于 PowerShell 实现，无需修改原始应用，通过动态解析 Microsoft Store 安装路径保持更新兼容性。适用于需同时使用官方服务与多个第三方 Claude 接口的开发者、研究人员及多账号协作场景。",2,"2026-11-24 04:18:41","CREATED_QUERY"]