-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Before submitting
- I searched existing issues and confirmed this is not a duplicate
⚡ Quick Bug Report (Recommended)
Use the automated bug report generator for comprehensive diagnostics:
# Navigate to the plugin directory
cd ~/.claude/plugins/marketplaces/thedotmack
# Run the bug report tool
npm run bug-reportPlugin Paths:
- macOS/Linux:
~/.claude/plugins/marketplaces/thedotmack - Windows:
%USERPROFILE%\.claude\plugins\marketplaces\thedotmack
Features:
- 🌎 Auto-translates any language to English
- 📊 Collects all diagnostics automatically
- 🤖 AI-formatted professional issue
- 🔒 Privacy-safe (paths sanitized,
--no-logsoption) - 🌐 Auto-opens GitHub with pre-filled issue
📝 Manual Bug Report
Bug Description
claude-mem failed to initialize and got stuck in a half-started state. Health checks responded, but the worker never became usable. The surface symptom looked like a DB startup problem, but tracing the startup sequence suggested the earlier failure was mode file path resolution.
Steps to Reproduce
- Install/use
claude-mem@thedotmackon Claude Code 2.1.81 on macOS. - Let the worker start through normal hook/session flow.
- Observe that the worker responds to health checks but remains uninitialized.
- Observe repeated timeouts/errors in logs and hooks.
Expected Behavior
The worker should fully initialize, load the code mode, initialize the database, connect the MCP server, and report healthy state with both initialized: true and mcpReady: true.
Environment
- Claude-mem version: failing install was
10.6.1; after local rebuild/sync,10.6.2worked - Claude Code version: 2.1.81
- OS: macOS
- Platform: Claude Code
Logs
Worker logs are located at:
- Path:
~/.claude-mem/logs/worker-YYYY-MM-DD.log - Example:
~/.claude-mem/logs/worker-2025-12-14.log
Please paste relevant log entries (last 50 lines or error messages):
Background initialization failed Critical: code.json mode file missing
DB not initialized
Database initialization timeout
Worker failed to start (health check timeout)
Additional observed health output while failing:
{
"status": "ok",
"initialized": false,
"mcpReady": false
}Additional Context
What I found from tracing startup:
- Worker initialization order appears to be:
ModeManager.loadMode(modeId)dbManager.initialize()- mark initialization complete
- connect MCP server
- The key failure log was
Critical: code.json mode file missing - But
plugin/modes/code.jsonwas actually present - This suggests runtime package root / mode path resolution was wrong rather than the file actually being absent
- The startup path seems fragile around:
src/shared/paths.ts→getDirname()/getPackageRoot()src/services/domain/ModeManager.ts→ loadingmodes/code.json
- In the failing built artifact, there were signs of embedded absolute build-machine paths, which may make runtime mode lookup brittle
What I ruled out:
- Resetting SQLite DB + WAL + SHM did not fix it
- Removing Chroma data did not fix it
tmuxsettings were unrelated- SessionEnd hook errors were downstream symptoms, not root cause
Why it started working again:
- I rebuilt from local source and synced the plugin again
- After that, the worker started successfully and reported:
{
"version": "10.6.2",
"initialized": true,
"mcpReady": true
}So the issue is no longer reproducing for me after rebuilding/syncing, but the underlying path-resolution logic still seems worth hardening.