-
Notifications
You must be signed in to change notification settings - Fork 185
Description
Summary
The @vectorize-io/hindsight-openclaw plugin (v0.4.6) starts the hindsight-embed daemon during initial plugin load. When the OpenClaw gateway receives SIGUSR1 (soft restart, which is the default restart signal for config changes and updates), the daemon process is killed but the plugin does not re-initialize it. The daemon stays dead until a full gateway restart (openclaw gateway restart).
Details
In hindsight-integrations/openclaw/src/index.ts, the plugin initializes the daemon during the default export function call:
embedManager = new HindsightEmbedManager(...)await embedManager.start()(starts the daemon process)isInitialized = true
The plugin registers a service with start() and stop() methods. However:
- The
start()method only waits for the already-resolvedinitPromise. It does not check if the daemon is actually still running. - After a SIGUSR1 soft restart, the gateway kills child processes (including the daemon), then re-loads plugins. But the module-level state (
isInitialized,initPromise,embedManager) may persist or be in a stale state. - There is no health check or reconnection logic in the service lifecycle.
Steps to Reproduce
- Start OpenClaw gateway with the hindsight-openclaw plugin
- Verify the daemon is running (
curl http://127.0.0.1:8889/health) - Send SIGUSR1 to the gateway process (or trigger a config change that causes soft restart)
- Try to use hindsight memory features
- Observe that the daemon is no longer running and memory operations fail
Expected Behavior
The plugin should detect when the daemon is no longer running (either during service start() or via periodic health checks) and restart it. Alternatively, the service stop()/start() lifecycle should fully tear down and reinitialize the daemon.
Impact
This affects every OpenClaw user with the hindsight plugin installed. SIGUSR1 is the default restart signal used by openclaw gateway for config changes and updates, so this is triggered frequently.
Environment
- OpenClaw v2026.1.29
- hindsight-openclaw v0.4.6
- Hetzner VPS Ubuntu 24.04
Workaround
Run hindsight-api as a standalone systemd service independently of the OpenClaw gateway. This avoids the lifecycle dependency entirely.
Related
See #261 for related context.