Problem
worker-cli restart has a hard-coded 10-second readiness timeout. When the worker cold-starts (loading embedding model, etc.), initialization often takes 10–25 seconds. This causes the CLI to report Failed to restart: Readiness check timed out after 10000ms even though the worker may eventually initialize successfully.
Impact
Combined with health-check or scheduled-restart scripts that rely on the CLI's exit code, this creates a cascading failure loop:
- Worker loses initialization state (e.g., after macOS sleep/wake)
- Health check detects
initialized=false, calls worker-cli restart
- CLI times out at 10s → reports failure
- Worker process is replaced but also can't initialize within 10s
- Next hourly health check: same result → restart → timeout → repeat
- Loop persisted for ~20 hours until manual intervention
Evidence from logs
[2026-03-05 15:02:22] ALERT: Worker not initialized after 650min (initialized=false), restarting
Failed to restart: Readiness check timed out after 10000ms
[2026-03-05 16:02:13] ALERT: Worker not initialized after 59min (initialized=false), restarting
Failed to restart: Readiness check timed out after 10000ms
[2026-03-05 19:00:01] ALERT: Worker not initialized after 177min (initialized=false), restarting
Failed to restart: Readiness check timed out after 10000ms
[2026-03-05 20:00:00] ALERT: Worker not initialized after 59min (initialized=false), restarting
Failed to restart: Readiness check timed out after 10000ms
Manual restart at 00:01 succeeded — worker initialized in ~23 seconds.
Suggestion
- Make the readiness timeout configurable (e.g.,
worker-cli restart --timeout 30000), defaulting to 30s
- Or at minimum, increase the default to 30s — 10s is too aggressive for cold starts with embedding model loading
- Consider making
worker-cli restart return success if the worker process was successfully spawned, and add a separate worker-cli wait-ready --timeout <ms> command for scripts that need to verify initialization
Environment
- claude-mem version: 10.0.6
- Platform: macOS (darwin 24.6.0)
- Runtime: bun
— cee
Problem
worker-cli restarthas a hard-coded 10-second readiness timeout. When the worker cold-starts (loading embedding model, etc.), initialization often takes 10–25 seconds. This causes the CLI to reportFailed to restart: Readiness check timed out after 10000mseven though the worker may eventually initialize successfully.Impact
Combined with health-check or scheduled-restart scripts that rely on the CLI's exit code, this creates a cascading failure loop:
initialized=false, callsworker-cli restartEvidence from logs
Manual restart at 00:01 succeeded — worker initialized in ~23 seconds.
Suggestion
worker-cli restart --timeout 30000), defaulting to 30sworker-cli restartreturn success if the worker process was successfully spawned, and add a separateworker-cli wait-ready --timeout <ms>command for scripts that need to verify initializationEnvironment
— cee