memory-fork
Reviewed
at commit fca4b17
New version, not yet reviewed
After each turn Haiku decides whether memory needs a change; a tool-less fork of the session drafts it and the mod writes it, with a band and a pane showing…
0 upvotes
Log in to upvote or save- Made by
- Ray Amjad
- Pinned commit
-
fca4b17785b1460ab7b55f570dcd5e8bdbe3ef7b - What we checked
-
After each finished turn, Haiku decides on your Claude account whether something from the conversation belongs in Claude's memory. If so, a tool-less fork of the session drafts the change and the mod writes or deletes the memory files itself. It tells Claude not to edit memory files, blocks edits there, and shows a band and a pane with what changed. It makes no network calls of its own.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since 465d8d4; the rest carries over from the review at that commit. Registers session.start, command.run (/memory-fork), prompt.compose (adds a system section telling Claude that memory writes are handled by the plugin), tool.call for Write and Edit (denies the main session writing inside the project's memory folder), turn.complete, and ui.render for the AbovePrompt band and a pane. After each answer it sends the memory index and the latest exchange (message text and tool names, up to 12000 characters) to Haiku with $.model.complete, then to $.model.fork, both on the user's own account and using tokens. It reads and writes only the memory folder at CLAUDE_CONFIG_DIR or ~/.claude/projects/<slug>/memory. File names the model returns must match a plain .md name pattern with no path separators; MEMORY.md cannot be deleted. Deletion runs PowerShell Remove-Item on Windows or rm -f elsewhere on the validated paths, passed through an environment variable rather than a script string. Memory content is model-written, so it can change or remove existing memory files. Failures are shown in the band and nothing else is touched. New in this version: in headless (non-interactive) sessions it skips the pane and the /memory-fork command, and when the environment variable MEMORY_FORK_WAIT is 1 the turn.complete hook waits for the memory write to finish before returning; the write pipeline itself is unchanged.
- What it uses
-
- Reads your prompts: yes
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): yes
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: yes
After each turn Haiku decides whether memory needs a change; a tool-less fork of the session drafts it and the mod writes it, with a band and a pane showing what changed
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/memory-fork/)