Description
When launching openclaw via the TUI, the following runtime error appears immediately after startup:
run error: Missing workspace template: HEARTBEAT.md (/nix/store/gxwg26d37mls5jy0477i3kmnpmkphp6g-openclaw-2026.6.1/lib/openclaw/src/agents/templates/HEARTBEAT.md).
Ensure workspace templates are packaged.
Root Cause
The Nix package build in .flox/pkgs/openclaw/default.nix removes the entire src/ directory as a post-install cleanup step, intended to strip dev/test artifacts. However, src/agents/templates/ contains template files — including HEARTBEAT.md — that openclaw resolves and loads at runtime relative to the package root.
The cleanup is overly aggressive: it removes runtime-required files alongside the dev artifacts it was meant to prune.
Fix
Preserve src/agents/templates/ during the prune phase. Options:
- Option A (minimal): replace
rm -rf src with targeted removal that spares the templates directory
- Option B (clean): copy
src/agents/templates/ to a stable location (e.g. $out/lib/openclaw/templates/) and update the path openclaw uses to resolve them
Environment
- openclaw version: 2026.6.1
- Installed via:
flox/openclaw package in floxenvs
Description
When launching openclaw via the TUI, the following runtime error appears immediately after startup:
Root Cause
The Nix package build in
.flox/pkgs/openclaw/default.nixremoves the entiresrc/directory as a post-install cleanup step, intended to strip dev/test artifacts. However,src/agents/templates/contains template files — includingHEARTBEAT.md— that openclaw resolves and loads at runtime relative to the package root.The cleanup is overly aggressive: it removes runtime-required files alongside the dev artifacts it was meant to prune.
Fix
Preserve
src/agents/templates/during the prune phase. Options:rm -rf srcwith targeted removal that spares the templates directorysrc/agents/templates/to a stable location (e.g.$out/lib/openclaw/templates/) and update the path openclaw uses to resolve themEnvironment
flox/openclawpackage in floxenvs