The Separate app (Claude Magpie.app, #5671) kept its own Desktop
userData, but its Code tab's bundled Claude Code still read and wrote
the user's ~/.claude: their CLAUDE.md, skills, plugins and history went
into the twin, and the twin's sessions into theirs (xMopf7RF on X).
An opt-in, macOS-only switch under the Separate app's Advanced fold
(settings.DesktopIsolatedClaude, POST /api/settings/desktop-isolated-
claude, `magpie claude-desktop launcher claude-dir on|off`) gives it
~/.claude-magpie-desktop:
- desktopiso.Script exports CLAUDE_CONFIG_DIR in the app's launch
script; turning the option on or off remakes the app, and the hint
says to quit and reopen Claude Magpie, since a running one keeps its
environment.
- desktopOn writes Desktop's model windows, caps and explore entries
into that folder's settings.json instead of ~/.claude's while it is on
(desktopCodeDir, desktopClaudeSync); off moves them back. The folder
is kept when it is turned off, and shows as the claude# row "Claude
Code · Claude Magpie".
- The fold is drawn by claudemagpie.js, imported the first time it
shows; what stays in app.js is the import (isoLazy) and the fold's
place, 216 bytes, so the core budget goes up by 180 (the 36 of room
there was taken first).
Run:
- gofmt -l clean; go vet ./internal/... on darwin, GOOS=windows and
GOOS=linux -tags nogui vet of agent, cli, desktopiso, gui, settings,
settingsapi (mote).
- go test agent, cli, desktopiso, desktopdir, settings, settingsapi,
gui, library on mote: all ok except cli's three healthcheck/update
tests, which ask the gateway mote's own magpie serves on :3425
(#6223, the same with or without this change).
- TestCoreScriptBudget and TestSettingsSaveKeepsWhatItDoesNotSend at
this commit and the next.
- GUI on mote, Chromium and WebKit: desktop-isolated-claude (five
languages, 1100 and 640px), desktop-isolated, i18n-keys,
i18n-en-no-cjk, old-webkit, and every agent*/desktop*/claude* file
(98 files, 1,595 of 1,662 pass). Every red is the same on origin/main
92bce5c72 run alone: old-webkit (#6467, #5919), agent-details-ready
(#6373), agent-switch-accounts (#5925), claude-quota-onboarding
(#6179), agent-menu-label (#6371), desktop-tiers Chromium (#6475).
- A real Claude Desktop on mote in a sandbox HOME (~/sb6459, removed
after): `claude-desktop magpie`, `launcher add`, `launcher claude-dir
on`. The window and caps moved into .claude-magpie-desktop/
settings.json, ~/.claude kept only its theme, the script exported
CLAUDE_CONFIG_DIR, and the launched Desktop's main process and
children had it in their environment. `claude-dir off` moved them
back and dropped the export; `launcher remove` removed the app.
mote's real ~/.claude was listed before and after: unchanged.
Broken by hand:
- desktopOn without the clone-folder branch: TestClaudeDesktopIsolated
ClaudeDir red (the window stays in ~/.claude).
- The fold without its ontoggle: desktop-isolated-claude red ("shut by
the redraw").
- settingsapi not keeping the field: TestSettingsSaveKeepsWhatItDoes
NotSend red.
Not tried: a Code-tab session driven in the real Desktop's UI, so
bundled Claude Code writing into the folder was not seen in this run
(an earlier look at #6459 saw it). Library has no targets for the
clone's folder yet (#6469). The whole GUI suite (1,484 files) was not
run; the files on the Agents page and every i18n file were.
baranwang on X asked to keep Claude Desktop's own (1P, Anthropic) sign-in
while using magpie. Turning on "Separate app" in Claude Desktop's row on
the Agents page (or `magpie claude-desktop launcher add`) moves magpie's
3P wiring into ~/Library/Application Support/Claude-Magpie-3p and adds
~/Applications/Claude Magpie.app. That launcher opens Claude.app with
--user-data-dir on that folder, so it runs side by side with the user's
own Claude.app. Its icon is Claude's icon with a magpie badge. Off is the
default, and turning it off (`launcher remove`) moves the wiring back
and removes the app. It is macOS only: Desktop's packaged app strips
CLAUDE_USER_DATA_DIR, and on Windows it hardcodes LOCALAPPDATA\Claude-3p.
The folder ends in -3p because Desktop adds -3p to any other name.
Restarting the isolated app ends only its own process (pkill on its
--user-data-dir) and opens the launcher again.
Run at 1b25cda26 (this change on origin/main be9dbce02); rebased onto
fdabddeb4 (catalog only), then go build ./..., vet and the budget and
launcher tests again: ok. All
on mote:
- gofmt -l clean; go vet ./internal/...; GOOS=linux go vet -tags nogui
and GOOS=windows go vet on agent, cli, desktopiso, desktopdir, gui.
- go test (whole packages) desktopiso, desktopdir, settings, settingsapi,
proc: ok. -run Isolated|TestDesktopInstance|TestAddStartsDesktopOnTheFolder|
TestScript|TestAddLeavesTheirs|ClaudeDesktop|Restart in agent;
TestClaudeDesktopLauncher|TestEveryRouteHasACommandOrIsNamed|Help in cli;
TestCoreScriptBudget|TestSettingsSaveKeepsWhatItDoesNotSend|Budget|Desktop
in gui and gateway: ok.
- An earlier full `go test ./...` at fef23255f had four reds, all from
this change and fixed here: the route without a command (now in
notYet), settings_keep's DesktopIsolated, os/exec instead of proc, and
the core script budget (paid by sharing the switch helper with the
largest-window line and cutting comments; no raise). A second full run
of the touched packages queued ~7h on mote's suite lock behind other
sessions and was stopped; the targeted runs above replace it.
- GUI on mote, both engines: desktop-isolated (new; en, zh, zh-TW, ja,
de; 1100 and 640; aria-checked, posts, status text, no scroll, no
select, absent without `isolated`), desktop-longest, click-scroll,
plain-names, i18n-keys: ok. page-width-steady, panel-fold and
zero-priced-free are red, the same 33 tests at origin/main be9dbce02
(diffed): #4541/#5013, #5796, #5262. i18n-keys' "a plugin's words are
its own" is red on main too (#5332).
- Whole GUI suite on WSL at an older head: 400 of 22778 red across
~100 files of other pages, in line with #5559 (478 of 21666 on main
there). Not rerun on mote.
Real use, on mote in a sandbox HOME with Claude.app 4.23118 linked in:
`claude-desktop magpie`, then `launcher add`, moved the wiring to
Claude-Magpie-3p (deploymentMode 3p, mcpServers and locale carried).
Opening Claude Magpie.app started Claude with
--user-data-dir=.../Claude-Magpie-3p; it wrote configLibrary and
model-catalog there (3P mode) and no -3p-3p folder. A second, 1P Claude
ran beside it on its own sandbox folder. Opening the launcher again
kept one instance; the pkill pattern matched only the isolated pid; both
quit on SIGTERM. `launcher remove` put the wiring back and removed the
app.
Broken by hand: a folder without -3p (Desktop made -3p-3p), the
CLAUDE_USER_DATA_DIR env route (ignored by the packaged app), os/exec in
the quit (TestNoCommandBypassesProc red).
Not tried: a screenshot of the running app (screencapture fails over
ssh); a model request through a gateway from the isolated app; Windows
and Linux (not offered there). Known: the Dock shows Claude's own icon
for the running isolated app, and Chrome pairing is off in a moved
userData folder.