Claude Code
Claude Code gets session recording, memory at session start, memory on each prompt, the four memory tools, and transcript backfill.
What install changes
| What | Where | How |
|---|---|---|
| 7 hooks | ~/.claude/settings.json | Added under hooks, next to any hooks you already have |
Memory tools (MCP server weavekeep) | ~/.claude.json, user scope | Registered by running claude mcp add --scope user |
| The Weavekeep skill | ~/.claude/skills/weavekeep/SKILL.md | A new file in your personal skills folder |
Your CLAUDE.md is never edited.
If you set CLAUDE_CONFIG_DIR, Weavekeep uses settings.json and skills/ in that folder instead. To edit a different settings file, pass --settings <path> to install and uninstall.
settings.json is backed up before it changes, as settings.json.bak-<timestamp>; the newest 3 of these backups are kept, plus the one from before the first install. Hooks from other tools are left as they are. Running install again replaces Weavekeep's own entries and never adds duplicates.
The hooks
| Claude Code event | Weavekeep command | Timeout | What it does |
|---|---|---|---|
SessionStart | hook session-start | 10 s | Adds memory to the session's context |
UserPromptSubmit | hook user-prompt-submit | 10 s | Stores your prompt and adds matching memory to it |
PostToolUse | hook post-tool-use | 30 s, async | Stores the tool call and its result. Runs in the background, so it never delays the agent |
PostToolUseFailure | hook post-tool-use-failure | 30 s, async | Stores a tool call that failed, with its error (Claude Code sends no PostToolUse for it). Runs in the background too |
Stop | hook stop | 10 s | Stores the agent's final message for the turn. Now and then, asks the agent to save any rule or decision you stated |
PostCompact | hook post-compact | 10 s | Stores the compaction summary |
SessionEnd | hook session-end | 5 s | Marks the session ended and reads the transcript in the background |
The timeout is Claude Code's limit. Weavekeep's own limit is shorter: each hook gives up after 2 seconds (1.2 seconds for SessionEnd) and exits cleanly. See How it works.
Each hook runs Node and Weavekeep by their full paths, for example:
"/usr/local/bin/node" "/usr/local/lib/node_modules/@weavekeep/cli/dist/cli/index.js" hook session-startRun weavekeep install --dry-run --verbose to see the exact commands for your machine.
The memory tools
Install runs:
claude mcp add --scope user --transport stdio weavekeep -- <node> <weavekeep>/dist/cli/index.js serveClaude Code then starts weavekeep serve itself and offers the agent recall, remember, timeline and forget. The server and the tool descriptions tell the agent when to use them.
The skill
The skill tells Claude Code when to use memory. When you state a lasting rule, preference or decision, Claude Code saves it to its own memory as usual and also calls remember, so your other agents learn it too. It calls recall before asking you something you may have settled already, and forget when you take something back or a new decision replaces an old one. It never stores secrets.
Install updates the skill when a newer Weavekeep changes it. If you edit the file, install leaves it as it is and warns you; delete it and run weavekeep install to get the current one.
Its own memory notes
Claude Code keeps its own notes about you and your projects (its auto memory, in ~/.claude/projects). If you say yes when weavekeep install asks, or run weavekeep memory import --on, Weavekeep copies those notes into your memory so Codex and Cursor know them too. It only reads Claude Code's files and never changes, moves or locks them.
- Notes about you apply to every project. Feedback you gave and notes about a project apply to that project. Notes that point to outside resources are found with
recallonly. - Your other agents see each note's name and one-line description at session start;
recallfinds the full note. - Claude Code already loads its own notes, so it does not get them a second time. In another project it does get your notes about you.
- A changed note replaces its earlier copy, and a deleted note's copy is removed. New and changed notes are copied when a session starts or ends, in the background, so they show up from the next session on.
- The copies are not added to your
decisions.mdorfacts.md. - A project in a subfolder of a repository also gets the repository's notes, since Claude Code keeps one memory folder per repository.
- If you forget a copied note, it stays forgotten until Claude Code changes the note.
To stop, run weavekeep memory import --off; it also removes the copies made on this device. weavekeep uninstall stops copying and keeps the copies with the rest of your memory. weavekeep status shows how many notes were copied and whether copying is on.
What works
| Feature | Works |
|---|---|
| Records sessions | Yes |
| Memory at session start | Yes, also again after compaction |
| Memory added to each prompt | Yes |
| Memory tools | Yes |
| Reminder to save a rule on the prompt that states it | Yes |
| Transcript backfill | Yes. At session end, and when you resume a session, the transcript is read to fill in anything the hooks missed |
| Shares its own memory notes with your other agents | Yes, if you agree at install |
Manual steps
Usually none. Start a new Claude Code session after installing.
Two cases need a step:
- The
claudecommand is not on yourPATH. Install adds the hooks but cannot register the tools. It prints theclaude mcp addline; run it yourself. - A server named
weavekeepalready exists in another scope. Install warns you and prints theclaude mcp removecommand for the old entry. Run it, then runweavekeep installagain.
Check that it works
weavekeep doctorLook for these lines:
✓ Claude Code hooks: 7 of 7 hooks present
✓ Claude Code hook command: /usr/local/bin/node and /usr/local/lib/node_modules/@weavekeep/cli/dist/cli/index.js exist
✓ Claude Code memory tools: registered in ~/.claude.json
✓ Claude Code skill: ~/.claude/skills/weavekeep/SKILL.md is currentThen start a session in a project where you have saved a decision (weavekeep remember "…"). The decision is in the context from the start; ask the agent what Weavekeep told it. Afterwards, weavekeep recent lists the session with agent claude.
Cursor and Claude Code hooks
Cursor can run the hooks in ~/.claude/settings.json too. When Weavekeep's Claude Code hooks are called from Cursor, they skip the event, because Weavekeep's own Cursor hooks record that session. Nothing is stored twice.