Summary
After upgrading to claude-mem v13.3.0, the worker silently fails to capture any observations because worker-service.cjs requires zod/v3 but zod is not listed in the plugin's package.json dependencies. The hook pipeline appears to work (hooks fire, bun-runner.js launches), but the worker crashes immediately upon receiving the first observation event. The data directory (~/.claude-mem/) accumulates no new observations even though SessionStart, UserPromptSubmit, and PostToolUse hooks are configured in hooks/hooks.json.
Environment
- OS: Windows 11 Pro 10.0.26200 (Git Bash)
- Node: v25.5.0
- Bun: 1.3.11
- Plugin path:
~/.claude/plugins/cache/thedotmack/claude-mem/13.3.0/
- Plugin version: 13.3.0
- Host: Claude Code CLI (Opus 4.7)
Reproduction
- Fresh install of v13.3.0 (via plugin marketplace).
- Try to run the worker manually:
node "$HOME/.claude/plugins/cache/thedotmack/claude-mem/13.3.0/scripts/bun-runner.js" \
"$HOME/.claude/plugins/cache/thedotmack/claude-mem/13.3.0/scripts/worker-service.cjs" \
status
- Observe:
error: Cannot find module 'zod/v3' from 'C:\Users\Luis\.claude\plugins\cache\thedotmack\claude-mem\13.3.0\scripts\worker-service.cjs'
Bun v1.3.11 (Windows x64)
- Also visible if you run with Node directly (fails earlier on
bun:sqlite, expected — worker is Bun-only).
- Hooks still fire (
logs/claude-mem-YYYY-MM-DD.log shows INIT_COMPLETE, PostToolUse: Bash(...) entries) but no observation rows accumulate.
Root cause
scripts/worker-service.cjs contains:
But package.json only lists tree-sitter packages:
"dependencies": {
"@derekstride/tree-sitter-sql": "^0.3.11",
... (all tree-sitter-* deps) ...
"shell-quote": "^1.8.3"
}
No zod entry. When the plugin installer (bun/npm) runs after extraction, it pulls only the tree-sitter deps, so node_modules/zod/ never exists.
Workaround (verified working)
Add zod locally to the plugin install:
cd ~/.claude/plugins/cache/thedotmack/claude-mem/13.3.0/
bun add zod
This installs zod@4.4.3 (which exposes zod/v3 as a compatibility subpath, satisfying the import). After this:
- Worker starts cleanly.
- Hooks fire and successfully capture observations.
- DB at
~/.claude-mem/claude-mem.db accumulates rows in real time.
Confirmed in our DB after the fix: 2391 total observations, with the most recent (#2389–2391) captured during the same session where the fix was applied.
Suggested fix
Add "zod": "^4.4.3" (or the version matching upstream's actual usage) to dependencies in the plugin's package.json so a fresh install ships with zod automatically.
Why this is hard to notice
- Hooks fire visibly in logs (
bun-runner reports launching the worker).
- No error surfaces in the host UI — the worker crash happens in a separate process, and the hook returns control immediately.
- The data dir at
~/.claude/plugins/data/claude-mem-thedotmack/ is empty (a red herring — actual data lives at ~/.claude-mem/).
- Users only discover the silence when they try to use
mem-search and get no results.
Additional notes
There's also a CAPTURE_BROKEN flag file that gets written when the worker receives an empty stdin payload (mentioned as "issue #2188"). Not sure if that's the same root cause being reported elsewhere, but on Windows + Bun 1.3.11 the zod/v3 import failure is the primary blocker — fixing it makes the worker fully functional even when the stdin issue surfaces.
Summary
After upgrading to claude-mem v13.3.0, the worker silently fails to capture any observations because
worker-service.cjsrequireszod/v3butzodis not listed in the plugin'spackage.jsondependencies. The hook pipeline appears to work (hooks fire,bun-runner.jslaunches), but the worker crashes immediately upon receiving the first observation event. The data directory (~/.claude-mem/) accumulates no new observations even though SessionStart, UserPromptSubmit, and PostToolUse hooks are configured inhooks/hooks.json.Environment
~/.claude/plugins/cache/thedotmack/claude-mem/13.3.0/Reproduction
bun:sqlite, expected — worker is Bun-only).logs/claude-mem-YYYY-MM-DD.logshowsINIT_COMPLETE,PostToolUse: Bash(...)entries) but no observation rows accumulate.Root cause
scripts/worker-service.cjscontains:But
package.jsononly lists tree-sitter packages:No
zodentry. When the plugin installer (bun/npm) runs after extraction, it pulls only the tree-sitter deps, sonode_modules/zod/never exists.Workaround (verified working)
Add zod locally to the plugin install:
This installs
zod@4.4.3(which exposeszod/v3as a compatibility subpath, satisfying the import). After this:~/.claude-mem/claude-mem.dbaccumulates rows in real time.Confirmed in our DB after the fix: 2391 total observations, with the most recent (#2389–2391) captured during the same session where the fix was applied.
Suggested fix
Add
"zod": "^4.4.3"(or the version matching upstream's actual usage) todependenciesin the plugin'spackage.jsonso a fresh install ships with zod automatically.Why this is hard to notice
bun-runnerreports launching the worker).~/.claude/plugins/data/claude-mem-thedotmack/is empty (a red herring — actual data lives at~/.claude-mem/).mem-searchand get no results.Additional notes
There's also a
CAPTURE_BROKENflag file that gets written when the worker receives an empty stdin payload (mentioned as "issue #2188"). Not sure if that's the same root cause being reported elsewhere, but on Windows + Bun 1.3.11 thezod/v3import failure is the primary blocker — fixing it makes the worker fully functional even when the stdin issue surfaces.