- name
- cwd-guardian
- description
- Monitors and restores the evolver process working directory. Use when evolver crashes with uv_cwd ENOENT errors or when the evolver process loses its cwd.
cwd-guardian
Protects the evolver daemon from uv_cwd ENOENT crashes by:
- Stamping the current valid cwd to a pidfile
- On restart, verifying the cwd exists before launching evolver
- Rebuilding the cwd from the stamped path if it was deleted
Usage
node skills/cwd-guardian/scripts/guardian.js start
node skills/cwd-guardian/scripts/guardian.js checkLogic
start: Records current working directory to~/.openclaw/workspace/memory/evolution/cwd_guardian.pid, then starts the evolver daemoncheck: Reads the pidfile, verifies the cwd exists, recreates it if missing, then starts the evolver daemon if not runningverify: Returns exit code 0 if cwd is valid, 1 if recreated