Auto-memory is shared between accounts on one machine, and .claude/launch.json accumulates configs of every past session
Summary
On a Windows machine with two Claude accounts (both used in the desktop app, Code tab) and several checkouts of one repository (main folder, worktrees, a release clone in a sibling folder), two kinds of per-session state leak into places where they do not belong:
- Auto-memory is shared across accounts.
~/.claude/projects/<sanitized-cwd>/memory/is keyed on the working-directory path only. A session started under account B in a folder reads and writes the memory that sessions under account A built up there, including notes about which ports and servers belong to "the other account". The assistant then orients itself on another account's context before the user has said anything. There is no indication in the UI that the memory it quotes was written under a different account.
.claude/launch.jsonaccumulates session-created dev-server configs forever. Each session that callspreview_startadds a configuration (name, port, often aruntimeArgspath into that session's scratchpad). In a parent folder that has hosted many sessions the file now holds 18 configurations on ports 8765 to 8790, most pointing at scratchpad start scripts of sessions that no longer exist. The file is a project file (it is what the docs tell users to edit), so this stale state is also visible to the repository and to other people when the folder is shared.
The fragmentation of memory across worktrees and clones of the same repository is already reported in #34437 and #81391; this issue is about the opposite direction (state that should stay separate but is merged) and about the launch.json growth.
Environment
- Windows 11 Pro 10.0.26200, Claude desktop app, Code tab
- Two accounts used on the same machine, same Windows user
- Repository checked out in
C:\DATA\ClaudeDDOP\WoningModeler(branchontwikkeling) and as a clone inC:\DATA\ClaudeDDOP\WoningModeler-0.2.0; sessions started in both folders and in the parent folderC:\DATA\ClaudeDDOP
Steps to reproduce
- Under account A, start a session in a folder and let the assistant save memory (it writes to
~/.claude/projects/<folder>/memory/). - Switch to account B in the desktop app and start a session in the same folder.
- The session under account B loads the
MEMORY.mdof account A and acts on it. - In a folder that has hosted several sessions, open
.claude/launch.json: everypreview_startconfig of every past session is still there.
Expected
- Memory (and ideally session history) scoped per account, or at least labelled with the account that wrote it, so a session can tell its own notes from another account's.
- Configurations that a session adds to
.claude/launch.jsonon its own (as opposed to ones the user wrote) either live in the session's scratchpad, or are removed when the session ends or when the start script they point to no longer exists.
Why it matters
The user's words after noticing it: this pollutes the sessions and the integrity of the assistant as a whole. When a new session confidently "remembers" things that came from another account or from a session that was deleted, the user can no longer trust what the assistant says it knows.