2026-03-04T13-13-29_auto_memory/2026-03-04-daemon-restart-openclaw-sync-imp

This commit is contained in:
Nicholai Vogel 2026-03-04 06:13:29 -07:00
parent dce8775274
commit f76b8ebd5f
2 changed files with 18 additions and 0 deletions

View File

@ -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.

Binary file not shown.