memanto memory sync
Recall an agent’s highest-value standing memories and write them into the instruction files of the coding agents you connected withmemanto connect — so they are in context from the first message of a session.
--agent,-a TEXT- Agent to sync from (default: the active agent)--project-dir,-p PATH- Project directory whose connections are updated (default: current directory)--connection TEXT- Update only this connected integration (e.g.claude-code,codex,cursor) — use it when runningsyncby hand and the target is ambiguous--scope TEXT- Update onlylocalorglobalconnections--limit,-n INTEGER- Maximum memories to inject,1–100(default:10). With--okf, the maximum per memory type.--okf- Sync an OKF bundle into<project-dir>/okf/instead--split TEXT- OKF layout:auto(default),file, ortype(only used with--okf)
What gets injected
sync runs one semantic recall for global project standards, architectural rules, agent workflows, and core user preferences, restricted to:
- types
instruction,preference, andgoal activememories with a confidence of at least0.8
- [TYPE] content, between the dynamic-memory sentinels that memanto connect places in every instruction file:
sync prints No active dynamic memories found. Cleared dynamic sections (if any). Nothing outside the sentinels is touched, and memanto connect update leaves the block alone.
Which files are updated
sync updates the instruction file of each connection registered for the project:
- With
--connection, only that integration. - Otherwise, every integration connected locally to
--project-dir; if there are none, every integration connected globally. --scope localor--scope globalrestricts either case to that scope.
has no dynamic section and left unchanged — run memanto connect update to add them.
If no connection applies, sync exits with No Memanto connections found for <project>. Run 'memanto connect' first.
Notes:
syncno longer writes a projectMEMORY.md. For a full markdown snapshot of an agent’s memories, usememanto memory export.- Connected agents run
syncfor you: theclaude-code,codex, andcursorconnectors install session-start and pre-compaction hooks,pigets a session-start extension, and the instruction template tells every agent to sync at the start of a fresh session. - After syncing,
syncprints a one-line notice if any connected agent is running an older instruction template. Runmemanto connect updateto refresh them. - With
--okf,syncexports a fresh bundle into<project-dir>/okf/. If the backend is unreachable, it reuses the previous bundle (reported asstale-cache) rather than emptying the directory.