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

WhatWhereHow
7 hooks~/.claude/settings.jsonAdded under hooks, next to any hooks you already have
Memory tools (MCP server weavekeep)~/.claude.json, user scopeRegistered by running claude mcp add --scope user
The Weavekeep skill~/.claude/skills/weavekeep/SKILL.mdA 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 eventWeavekeep commandTimeoutWhat it does
SessionStarthook session-start10 sAdds memory to the session's context
UserPromptSubmithook user-prompt-submit10 sStores your prompt and adds matching memory to it
PostToolUsehook post-tool-use30 s, asyncStores the tool call and its result. Runs in the background, so it never delays the agent
PostToolUseFailurehook post-tool-use-failure30 s, asyncStores a tool call that failed, with its error (Claude Code sends no PostToolUse for it). Runs in the background too
Stophook stop10 sStores the agent's final message for the turn. Now and then, asks the agent to save any rule or decision you stated
PostCompacthook post-compact10 sStores the compaction summary
SessionEndhook session-end5 sMarks 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-start

Run 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 serve

Claude 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 recall only.
  • Your other agents see each note's name and one-line description at session start; recall finds 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.md or facts.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

FeatureWorks
Records sessionsYes
Memory at session startYes, also again after compaction
Memory added to each promptYes
Memory toolsYes
Reminder to save a rule on the prompt that states itYes
Transcript backfillYes. 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 agentsYes, if you agree at install

Manual steps

Usually none. Start a new Claude Code session after installing.

Two cases need a step:

  • The claude command is not on your PATH. Install adds the hooks but cannot register the tools. It prints the claude mcp add line; run it yourself.
  • A server named weavekeep already exists in another scope. Install warns you and prints the claude mcp remove command for the old entry. Run it, then run weavekeep install again.

Check that it works

Terminal
weavekeep doctor

Look 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 current

Then 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.

On this page