Skip to content

openclaw: runtime error "Missing workspace template: HEARTBEAT.md" — src/agents/templates/ deleted during build #3167

@barstoolbluz

Description

@barstoolbluz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-contentIssues to be picked up by @flox/team-content

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions