diff --git a/memory/2026-03-04-daemon-restart-openclaw-sync-implementation.md b/memory/2026-03-04-daemon-restart-openclaw-sync-implementation.md new file mode 100644 index 000000000..2c0c6cb24 --- /dev/null +++ b/memory/2026-03-04-daemon-restart-openclaw-sync-implementation.md @@ -0,0 +1,18 @@ +# 2026-03-04 Session Notes + +## Daemon Restart → OpenClaw Sync Implementation + +Started implementation of a new feature to keep OpenClaw and Signet daemon restarts in sync. PR #114 (fix/memory-plugin-error-reporting) was closed because it violated the codebase's "result types over exceptions" convention and didn't address the actual goal Jake described—syncing openclaw restarts with daemon restarts. + +The implementation adds OpenClaw restart detection and prompting to the CLI restart flow. When `signet daemon restart` runs, the CLI now detects if OpenClaw is configured, prompts the user to restart it as well, and optionally executes a configured restart command. + +Key design decisions: +- Services config lives in AgentManifest as an optional `services.openclaw` block +- User configures restart command in `~/.agents/agent.yaml` under `services.openclaw.restart_command` +- Two helper functions: `isOpenClawDetected()` (uses existing OpenClawConnector.getDiscoveredConfigPaths()) and `restartOpenClaw()` (executes command with 15s timeout via spawnSync) +- Added `--no-openclaw` flag to both daemon restart and top-level restart commands +- Graceful degradation: no prompt if OpenClaw not detected, shows config instructions if detected but not configured + +Files modified: `packages/core/src/types.ts` (add services config) and `packages/cli/src/cli.ts` (add helpers, modify doRestart and TUI restart case, add command options). + +Verification plan includes testing all scenarios: detection, configuration prompt, spinner feedback, and flag behavior. \ No newline at end of file diff --git a/memory/memories.db b/memory/memories.db index a1624fc19..b0a483f48 100644 Binary files a/memory/memories.db and b/memory/memories.db differ