Troubleshooting
Start with weavekeep doctor. Below are its checks, then other problems and their fixes.
Run doctor first
weavekeep doctorEach check prints one line: ✓ passed, ! warning, ✗ problem. Under each warning or problem is a fix: line. Doctor never changes your memory or your agent config. Its test hook and test server run in a temporary folder.
| Check | What a problem means | Fix |
|---|---|---|
| Node | Your Node is older than 22.16 | Install a newer Node (for example nvm install 22), then run weavekeep install again |
| SQLite FTS5 | This Node build has no SQLite full-text search | Use an official Node build, 22.16 or newer |
| Home | ~/.weavekeep does not exist yet | Run weavekeep install. The folder is created the first time an agent uses Weavekeep |
| Home | Some entries are readable by other users | Run the chmod -R go-rwx ~/.weavekeep command doctor prints |
| Home | ~/.weavekeep is not a folder | Move the file aside, then run weavekeep install |
| Database | It does not exist yet | Start an agent session after weavekeep install |
| Database | It fails the integrity check, or does not open | Check its permissions. If it is damaged, run weavekeep export while it still reads, move the file aside and start a new session |
| Database | keep.db (or its -wal/-shm file, or the ~/.weavekeep folder) is not writable, so nothing is recorded: every hook skips and remember fails | Run the chmod command doctor prints: chmod 600 for the file, chmod 700 for the folder. On a read-only disk, set WEAVEKEEP_HOME to a writable folder and run weavekeep install again |
| Database | An agent kept writing to it during the check, so it could not be checked. This is a warning, not damage | Run weavekeep doctor again |
| Database | It has an unfinished write, so it could not be checked | Run weavekeep status, which opens the database normally and finishes the write, then run weavekeep doctor again |
| Database | It was made by an older version | Nothing to do. It upgrades itself the next time an agent uses it |
| Agent | Found, but not connected | Run weavekeep install |
| Agent hooks | Fewer hooks than expected (7 for Claude Code, 5 for Cursor and Codex) | Run weavekeep install again |
| Agent hook command | The hooks run a Node or Weavekeep file that no longer exists, so every hook fails | Run weavekeep install again. This happens after switching Node versions or moving Weavekeep |
| Agent hook target | The hooks run a different Weavekeep than the one you ran doctor with (an older copy after an upgrade), or one inside pnpm's versioned store folder, which the next upgrade or pnpm prune deletes | Run weavekeep install again with the Weavekeep you want the agents to use |
| Agent memory tools | Not registered, so the agent cannot call recall or remember | Run weavekeep install again. For Claude Code, the claude command must be on your PATH |
| Agent skill | The Weavekeep skill is missing, or is from an older Weavekeep, so the agent is not told when to save your rules | Run weavekeep install |
| Agent skill | You edited the skill, or another file is in its place, so Weavekeep no longer updates it | Nothing, if you want to keep your version. For the current skill, delete the file doctor names and run weavekeep install |
| Codex hook trust | Codex has not trusted the hooks yet, so it skips them | Open /hooks in Codex and trust the Weavekeep hooks |
| Hook self-test | The test hook failed or gave up | The line names the error. Set WEAVEKEEP_DEBUG=1 where the hook runs to get the full stack trace |
| Hook self-test | The test hook took 2 seconds or more | The machine is busy or slow. Hooks give up at 2 seconds and the agent carries on without memory |
| Hook log | Hooks failed, timed out or ran slow in the last 7 days, so those events were not recorded | The line names the file, ~/.weavekeep/logs/hooks.log. Often a busy machine; if it keeps happening, look at the errors there |
| Embeddings | Semantic search is on, but the model is missing or fails its checksum, so search uses keywords only | Run weavekeep embeddings download |
| Embeddings | Rows have waited over a day to be embedded | Run weavekeep embeddings index. It normally runs in the background while your agents work |
| MCP self-test | weavekeep serve did not answer, or answered with the wrong tools | Run weavekeep serve by hand to see the error. Reinstall the package if it is damaged |
Use weavekeep doctor --json to get the checks as JSON. Doctor exits with code 1 when any check failed.
The agent gets no memory at session start
- It is the first session in this project. The agent only gets the two lines on when to save and search memory, and
No stored facts for this project yet.Save a decision withweavekeep remember "…", or tell the agent a rule, and start a new session. - You are in a different folder. For the agent, a project is the exact folder it runs in, so starting it in a subfolder or a second checkout gives a different project. (The
weavekeepcommands you type use the git repository you are in, so they find the repository's memory from any subfolder.) Check withweavekeep recent --all. - Codex hooks are not trusted. Open
/hooksin Codex. See Codex. - Cursor has no folder open. With no folder, nothing is recorded and only facts saved for every project are shown.
- The hooks point at a missing file. Run
weavekeep doctorand look at the hook command check. - It is a scripted run. Runs started with
claude -p, the Claude Agent SDK orcodex execare not recorded and get no memory. SetWEAVEKEEP_HEADLESS=1in their environment to include them.
Nothing is added to my prompts
Often that is expected. Only saved decisions and facts are added to a prompt, and only when one closely matches it:
- Nothing on the topic is saved yet. What was only said in a session is not added to prompts. Ask the agent to save the rule or decision, or run
weavekeep remember "…". The agent can still find what was said earlier with therecalltool, and you can withweavekeep search. - The prompt shares only common words with it. Words that turn up all over your sessions, such as "it", "this" or "fix", do not count, and words that most of your saved items contain count for little. Name the thing itself: a tool, a file, a service, an error message.
- It was already shown. Items shown at the start of the session, or added to an earlier prompt in it, are not added again.
- In Cursor, the agent called no tool. Cursor gets a prompt's memory after the first tool result of the turn, so a turn without a tool call gets none. See Cursor.
The agent can always search with the recall tool. The Weavekeep skill tells it when to.
Nothing stored yet
search, recent and forget print this when there is no database yet. Before weavekeep install it says Run weavekeep install.; after it, the database is created at the first agent session, so start one. If sessions have run and it still says this, run weavekeep doctor.
A keep.db is not writable warning
When the database or its folder lost write permission (a chmod, a restore from a read-only backup, another user's files), commands that only read (status, search, recent, export) still work and print one line saying they opened it read-only. Commands that write, like remember, fail with ~/.weavekeep/keep.db is not writable (mode 400), so nothing new can be saved, and hooks record nothing. Run chmod 600 ~/.weavekeep/keep.db (and chmod 700 ~/.weavekeep if the folder is not writable either), then weavekeep doctor.
Search finds nothing
searchonly looks in the current project. Add--allto search every project, or--project <path>.- Use fewer, more concrete words: a file name, a function name, part of an error message. See Search your memory.
Semantic search problems
Could not download the embedding model. The download from Hugging Face failed: no network, a proxy, or a file that did not match its hash. Search keeps working by keywords. Run weavekeep embeddings download again, or copy the files by hand; see Without network access.
weavekeep search finds nothing by meaning. The CLI uses the model only while an agent session is running, since the session's weavekeep serve holds it. Without one, search is keyword-only. The agent's recall tool always uses it when it is on.
WEAVEKEEP_EMBEDDINGS=0 keeps them off. That variable is set in this shell. It applies only to processes that inherit it, so the weavekeep serve an agent starts elsewhere does not see it. Unset it, or leave it if you want embeddings off there. To turn embeddings off everywhere on this machine, run weavekeep embeddings off.
Install problems
No supported agent found. Weavekeep looked for ~/.claude, ~/.cursor and ~/.codex, and for claude, cursor, cursor-agent and codex on your PATH. Name the agent to connect it anyway: weavekeep install --client claude.
running from a temporary npx or pnpm dlx cache. The hooks would point into a cache that can be cleared. Install globally (npm install -g @weavekeep/cli or pnpm add -g @weavekeep/cli) and run weavekeep install again.
refusing to touch <file>: …. An agent config file is not valid JSON, or not a JSON object. Weavekeep does not change a file it cannot read. Fix the file, then run install again. Cursor's ~/.cursor/mcp.json may have comments and trailing commas; Weavekeep edits only its own entry there and keeps the rest. ~/.cursor/hooks.json must be plain JSON.
--command "…" does not run Weavekeep. Install runs the command you gave, without the final hook, with --version, and expects weavekeep <version>. Give the full command that runs the Weavekeep CLI, ending in hook, for example --command "/usr/bin/node /path/to/weavekeep/dist/cli/index.js hook".
Cursor is not installed here. --client cursor was given, but there is no ~/.cursor and no cursor on your PATH. Install Cursor and open it once, then run install again. Weavekeep does not create ~/.cursor itself.
The hooks still run the old Weavekeep after an upgrade. Run weavekeep install after every upgrade. See Upgrading Weavekeep.
<file> is a symlink to a missing file. Create the target of the link, or remove the link.
<file> changed while weavekeep was running; nothing written to it. Another program changed the file at the same time. Run the command again.
<file> was written by a newer Weavekeep. install.json comes from a newer version. Upgrade Weavekeep and run the command again.
WEAVEKEEP_HOME is relative. A relative WEAVEKEEP_HOME is taken relative to your home folder. Set an absolute path to silence the warning.
Claude Code: the claude command was not found. The hooks were added, but the memory tools were not registered. Run the claude mcp add … line that install printed. See Claude Code.
Memory file problems
cannot parse this bullet; left as is. A line starting with - in facts.md does not follow **subject** relation: value, or a bullet is empty. Fix the line and run weavekeep memory sync. See Memory files.
memory files are locked by another process. Another Weavekeep process is syncing the files. Try again in a moment.
Not a terminal, so no editor was opened. weavekeep memory open only starts an editor from a terminal. Edit the printed file and run weavekeep memory sync, or set WEAVEKEEP_OPEN_WITHOUT_TTY=1 for a graphical editor.
Uninstall problems
--purge deletes this machine's Weavekeep memory and needs --yes when not run from a terminal. Add --yes, or run it from a terminal.
refusing to purge: …. Weavekeep only deletes a folder that is clearly its own. It refuses when the folder holds files Weavekeep did not create, is a symlink, contains your home folder, or WEAVEKEEP_HOME is relative. The message says which. Fix that, or delete the folder yourself.
Getting more detail
Set WEAVEKEEP_DEBUG=1 to print stack traces for errors. Hooks write one line to stderr when they skip something, starting with [weavekeep <event>].