Skip to content

Failed to spawn worker daemon #1054

Description

@devilofaman

Operating on Win 11 with Terminal.

Switched from using Gemini-CLI to Claude Code and chose to give claude-mem a try.

Followed the install prompt and everything worked fine until I went into the settings on localhost:37777 and changed the AI writing the context from Claude to OpenRouter. After that the context wouldn't write, so I restarted Claude Code.

When I restarted Claude Code I went to the browser to try and access localhost:37777 before typing in a prompt and the page wouldn't load. In my confusion I went to test a prompt to pull previous context from the last session, and as Claude was working on a response I reloaded the claude-mem dashboard and it loaded. My discovery from this point is that the dashboard only works when Claude Code is actively responding to a prompt instead of starting when Claude Code launches.

I decided to clear my logs file and restart Claude Code to get fresh error logs.

[2026-02-10 15:40:02.667] [INFO ] [SYSTEM] Claude-mem search server started
[2026-02-10 15:40:02.717] [ERROR] [SYSTEM] Worker not available {"workerUrl":"http://127.0.0.1:37777"}
[2026-02-10 15:40:02.717] [ERROR] [SYSTEM] Tools will fail until Worker is started
[2026-02-10 15:40:02.718] [ERROR] [SYSTEM] Start Worker with: npm run worker:restart
[2026-02-10 15:40:04.314] [INFO ] [SYSTEM] Starting worker daemon
[2026-02-10 15:40:04.314] [INFO ] [SYSTEM] Starting worker daemon
[2026-02-10 15:40:04.366] [ERROR] [SYSTEM] Failed to spawn worker daemon
[2026-02-10 15:40:04.367] [ERROR] [SYSTEM] Failed to spawn worker daemon
[2026-02-10 15:40:04.367] [WARN ] [SYSTEM] Worker failed to start before hook, handler will retry
[2026-02-10 15:40:04.368] [INFO ] [SYSTEM] Starting worker in-process for hook {event=context}
[2026-02-10 15:40:04.406] [INFO ] [SYSTEM] HTTP server started {host=127.0.0.1, port=37777, pid=35852}
[2026-02-10 15:40:04.408] [INFO ] [SYSTEM] Worker started {host=127.0.0.1, port=37777, pid=35852}
[2026-02-10 15:40:04.438] [INFO ] [HTTP  ] → GET /api/health {requestId=GET-1770756004438} 
[2026-02-10 15:40:04.444] [INFO ] [HTTP  ] ← 200 /api/health {requestId=GET-1770756004438, duration=6ms}
[2026-02-10 15:40:04.449] [INFO ] [HTTP  ] → GET /api/version {requestId=GET-1770756004449} 
[2026-02-10 15:40:04.450] [INFO ] [HTTP  ] ← 200 /api/version {requestId=GET-1770756004449, duration=1ms}
[2026-02-10 15:40:04.454] [INFO ] [HTTP  ] → GET /api/context/inject {requestId=GET-1770756004454} 
[2026-02-10 15:40:04.455] [WARN ] [SYSTEM] Context requested before initialization complete, returning empty
[2026-02-10 15:40:04.456] [INFO ] [HTTP  ] ← 200 /api/context/inject {requestId=GET-1770756004454, duration=1ms}
[2026-02-10 15:40:04.676] [ERROR] [SYSTEM] Failed to enumerate orphaned processes Command failed: powershell -NoProfile -NonInteractive -Command "Get-CimInstance Win32_Process | Where-Object { (\$_.CommandLine -like '*mcp-server.cjs*' -or \$_.CommandLine -like '*worker-service.cjs*' -or \$_.CommandLine -like '*chroma-mcp*') -and \$_.ProcessId -ne 35852 } | Select-Object ProcessId, CreationDate | ConvertTo-Json"
At line:1 char:185
+ ... -service.cjs*' -or \$_.CommandLine -like '*chroma-mcp*') -and \$_.Pro ...
+                                                                  ~
You must provide a value expression following the '-and' operator.
At line:1 char:186
+ ...  -or \$_.CommandLine -like '*chroma-mcp*') -and \$_.ProcessId -ne 358 ...
+                                                     ~~~~~~~~~~~~~
Unexpected token '\$_.ProcessId' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ExpectedValueExpression
[2026-02-10 15:40:04.690] [INFO ] [SYSTEM] Mode loaded: code
[2026-02-10 15:40:04.702] [INFO ] [DB    ] Initializing fresh database with migration004
[2026-02-10 15:40:04.705] [INFO ] [DB    ] Migration004 applied successfully
[2026-02-10 15:40:04.752] [INFO ] [DB    ] Creating FTS5 tables
[2026-02-10 15:40:04.766] [INFO ] [DB    ] FTS5 tables created successfully
[2026-02-10 15:40:04.767] [WARN ] [CHROMA_SYNC] Vector search disabled on Windows (prevents console popups) {project=claude-mem, reason=MCP SDK subprocess spawning causes visible console windows}
[2026-02-10 15:40:04.767] [INFO ] [DB    ] Database initialized
[2026-02-10 15:40:04.770] [INFO ] [WORKER] SearchManager initialized and search routes registered
[2026-02-10 15:40:04.911] [INFO ] [SYSTEM] Claude-mem search server started
[2026-02-10 15:40:04.922] [INFO ] [WORKER] ✓ Connected to MCP server
[2026-02-10 15:40:04.922] [INFO ] [SYSTEM] Background initialization complete
[2026-02-10 15:40:04.922] [INFO ] [SYSTEM] Started orphan reaper (runs every 5 minutes)
[2026-02-10 15:40:04.954] [INFO ] [HTTP  ] → GET /api/health {requestId=GET-1770756004954} 
[2026-02-10 15:40:04.955] [INFO ] [HTTP  ] ← 200 /api/health {requestId=GET-1770756004954, duration=1ms}
[2026-02-10 15:40:04.964] [INFO ] [SYSTEM] Worker available {"workerUrl":"http://127.0.0.1:37777"}

Now at the bottom of the logs file you'll see "Worker Available {"workerUrl":"http://127.0.0.1:37777"}". For a moment, the dashboard loaded just fine...

[2026-02-10 15:40:58.098] [INFO ] [HTTP  ] → GET /api/projects {requestId=GET-1770756058098} 
[2026-02-10 15:40:58.101] [INFO ] [HTTP  ] → GET /stream {requestId=GET-1770756058101} 
[2026-02-10 15:40:58.105] [INFO ] [HTTP  ] ← 200 /api/projects {requestId=GET-1770756058098, duration=7ms}
[2026-02-10 15:40:58.109] [INFO ] [HTTP  ] → GET /api/settings {requestId=GET-1770756058109} 
[2026-02-10 15:40:58.111] [INFO ] [HTTP  ] → GET /api/stats {requestId=GET-1770756058111} 
[2026-02-10 15:40:58.113] [INFO ] [HTTP  ] → GET /api/observations {requestId=GET-1770756058113} 
[2026-02-10 15:40:58.116] [INFO ] [HTTP  ] ← 200 /api/settings {requestId=GET-1770756058109, duration=7ms}
[2026-02-10 15:40:58.119] [INFO ] [HTTP  ] ← 200 /api/stats {requestId=GET-1770756058111, duration=8ms}
[2026-02-10 15:40:58.122] [INFO ] [HTTP  ] ← 200 /api/observations {requestId=GET-1770756058113, duration=9ms}
[2026-02-10 15:40:58.126] [INFO ] [HTTP  ] → GET /api/summaries {requestId=GET-1770756058126} 
[2026-02-10 15:40:58.127] [INFO ] [HTTP  ] → GET /api/prompts {requestId=GET-1770756058127} 
[2026-02-10 15:40:58.129] [INFO ] [HTTP  ] ← 200 /api/summaries {requestId=GET-1770756058126, duration=3ms}
[2026-02-10 15:40:58.131] [INFO ] [HTTP  ] ← 200 /api/prompts {requestId=GET-1770756058127, duration=4ms}

But after a few seconds I refreshed the page again, and no dice.

At this point I decide to go to the C:\Users\User.claude\plugins\marketplaces\thedotmack\plugin\scripts and run the command: node worker-service.cjs
and then got the following output:

Image

So I double checked to make sure SQLite was installed by using bun install --force & npm install --force, I even downloaded the individual package. Ran bun test tests/sqlite/ and it tested just fine.

I'll keep on troubleshooting!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions