How to sync Claude Code memory across machines
Last updated: 23 September 2026
Claude Code remembers things between sessions, on the machine where it learned them. Open the same repository on your second laptop, or hand it to a teammate, and that knowledge is not there. Here is what Claude Code keeps and where, what it shares officially, the workarounds people use for the rest, and how flanner shares the memories you choose.
What Claude Code remembers, and where
- CLAUDE.md files hold instructions you write. The project's file travels with the repository like any other file.
- Auto memory holds notes Claude writes for itself, on by default, in
~/.claude/projects/<project>/memory/: aMEMORY.mdindex and topic files. Each session loads the first 200 lines or 25 KB of the index, and reads topic files when it needs them.
The documentation is explicit that auto memory is machine-local. It is not shared across machines, or with cloud sessions.
What Claude Code shares officially
Sharing goes through git. Commit CLAUDE.md and .claude/rules/, and a subagent configured with project memory keeps its notes in .claude/agent-memory/, which you can commit too. Memory in Claude Projects on claude.ai belongs to one person, and is not available in the terminal.
You may read that Claude Code syncs team memory through Anthropic's servers. As of September 2026, no such feature is documented.
The workarounds, and what they cost
A synced folder
The autoMemoryDirectory setting moves auto memory elsewhere. Point it at a folder that Dropbox or Syncthing keeps in step, and every machine sees the same notes.
A private git repository
Keep the memory folder in its own repository, and pull it at the start of each session with a hook. This gives you history and works across a team.
The costs they share
- All or nothing. Every note goes everywhere, including the ones about one person's setup.
- Secrets travel too. Nothing checks a note for a token before it leaves the machine.
- Conflicts. Two machines writing the same index at once leave you to merge it.
- No author. A note arriving from elsewhere carries no proof of who wrote it.
Sharing memory with flanner
Flanner Memory keeps durable memories as Markdown files, reached by Claude Code and Codex through the same MCP tools. Project memories live in .flanner/memory/ in the repository, and personal ones in your home folder. You can save one yourself:
flanner mem remember "Staging rebuilds every Sunday at 02:00 UTC" --category factMore often your agent proposes one and you approve it. The guidance flanner writes into CLAUDE.md and AGENTS.md asks the agent to recall relevant memories at the start of each task, so a later session finds them without being told they exist.
Sharing is one memory at a time, and only when you ask. Find the memory's id with flanner mem list, then:
flanner mem share IDflanner mem withdraw ID- A shared memory is signed by the machine that wrote it. The receiving device checks the signature, runs the same secret check it runs on its own memories, and stores it marked as received.
- Joining a team shares nothing by itself, and personal memory can never be shared.
- Withdrawing asks every device to stop recalling a memory. It does not delete the file from a device that already has it.
Flanner Mesh carries shared memories directly between your devices, and your teammates'. Flanner's servers handle accounts, devices and access, and never receive the memories themselves. Mesh is the paid part: Personal Mesh covers your own devices, and Team Mesh a team, each with a trial first. The pricing page has the numbers.
The memory docs list every command, and the Mesh docs show what sharing looks like on the receiving side.
Sources
Checked on 23 September 2026, against Claude Code v2.1.280.