# Cross-Machine Memory Sync

Your Claude Code feedback memories are synced across machines via the repo. The canonical store is `operator/memory/`. The local Claude Code cache at `~/.claude/projects/<sanitised-project-path>/memory/` is a write-through cache, not the source of truth.


## How it works

Sync is handled by `core/tools/memory-sync/`:

- `SessionStart` hook runs `memory-sync pull` (repo -> cache) so every session boots with the latest memories.
- `SessionEnd` hook runs `memory-sync push` (cache -> repo) so any new/edited memories land in git.
- Hooks live in `.claude/settings.json` at the repo root and travel with the project.


## How to use it

Save new memories the normal way; write to the local cache path. The sync handles propagation.

On a fresh machine, `git clone` the repo and start a Claude Code session; the SessionStart hook populates the cache automatically.


## CLI

```
node core/tools/memory-sync/bin/memory-sync pull
node core/tools/memory-sync/bin/memory-sync push
node core/tools/memory-sync/bin/memory-sync status
```
