docs/reference/templates not bundled, causing 'Missing workspace template' error #7

Closed
opened 2026-02-15 17:04:26 -05:00 by yindo · 4 comments
Owner

Originally created by @schickling on GitHub (Jan 26, 2026).

Problem

When a Discord message is received, clawdbot fails with:

[discord] handler failed: Error: Missing workspace template: AGENTS.md 
(/nix/store/.../lib/clawdbot/docs/reference/templates/AGENTS.md). 
Ensure docs/reference/templates are packaged.

Root Cause

The docs/reference/templates/ directory is not included in the clawdbot-gateway package. This is similar to issue #14 (extensions not bundled).

Files missing

The gateway-install.sh script doesn't copy:

  • docs/reference/templates/AGENTS.md
  • docs/reference/templates/SOUL.md
  • docs/reference/templates/TOOLS.md
  • And other template files

Suggested Fix

Add to gateway-install.sh:

cp -r docs "$out/lib/clawdbot/"

Or selectively:

mkdir -p "$out/lib/clawdbot/docs/reference"
cp -r docs/reference/templates "$out/lib/clawdbot/docs/reference/"

Workaround

Currently investigating if there's an env var to override template path.

Originally created by @schickling on GitHub (Jan 26, 2026). ## Problem When a Discord message is received, clawdbot fails with: ``` [discord] handler failed: Error: Missing workspace template: AGENTS.md (/nix/store/.../lib/clawdbot/docs/reference/templates/AGENTS.md). Ensure docs/reference/templates are packaged. ``` ## Root Cause The `docs/reference/templates/` directory is not included in the clawdbot-gateway package. This is similar to issue #14 (extensions not bundled). ## Files missing The gateway-install.sh script doesn't copy: - `docs/reference/templates/AGENTS.md` - `docs/reference/templates/SOUL.md` - `docs/reference/templates/TOOLS.md` - And other template files ## Suggested Fix Add to `gateway-install.sh`: ```bash cp -r docs "$out/lib/clawdbot/" ``` Or selectively: ```bash mkdir -p "$out/lib/clawdbot/docs/reference" cp -r docs/reference/templates "$out/lib/clawdbot/docs/reference/" ``` ## Workaround Currently investigating if there's an env var to override template path.
yindo closed this issue 2026-02-15 17:04:26 -05:00
Author
Owner

@joeychrys commented on GitHub (Jan 31, 2026):

same issue setting up nix-openclaw as a home-manager module integrated into an existing nix-darwin configuration.

Environment:

  • macOS (aarch64-darwin)
  • Package: openclaw-gateway-2026.1.8-2

Error on every Telegram message:
[telegram] handler failed: Error: Missing workspace template: AGENTS.md

The gateway starts fine and connects to Telegram but fails when trying to handle incoming messages due to the missing templates.

Is there an ETA on this being merged? Happy to help test if needed.

@joeychrys commented on GitHub (Jan 31, 2026): same issue setting up nix-openclaw as a home-manager module integrated into an existing nix-darwin configuration. Environment: - macOS (aarch64-darwin) - Package: openclaw-gateway-2026.1.8-2 Error on every Telegram message: [telegram] handler failed: Error: Missing workspace template: AGENTS.md The gateway starts fine and connects to Telegram but fails when trying to handle incoming messages due to the missing templates. Is there an ETA on this being merged? Happy to help test if needed.
Author
Owner

@joshp123 commented on GitHub (Jan 31, 2026):

I'd suggest you get a local coding agent to create these files for you in the meantime until we have a proper nix-native birthing ritual, as in #27 . this is a bit of a sharp edge indeed.

For now, I prefer to either have it fail fast due to missing config, and let users have full manual control over the (crappy) birthing ritual, vs making a worse experience by having immutable un-customizable agent files. IIRC the README should have an agent prompt that explains this, if not, we can add one.

Does that make sense?

@joshp123 commented on GitHub (Jan 31, 2026): I'd suggest you get a local coding agent to create these files for you in the meantime until we have a proper nix-native birthing ritual, as in #27 . this is a bit of a sharp edge indeed. For now, I prefer to either have it fail fast due to missing config, and let users have full manual control over the (crappy) birthing ritual, vs making a worse experience by having immutable un-customizable agent files. IIRC the README should have an agent prompt that explains this, if not, we can add one. Does that make sense?
Author
Owner

@MichaelOwenDyer commented on GitHub (Feb 1, 2026):

Facing the same issue. Can't create the files manually because they need to be in the read-only nix store. Even a workaround would be appreciated at this point, this issue makes openclaw completely unusable on nix

@MichaelOwenDyer commented on GitHub (Feb 1, 2026): Facing the same issue. Can't create the files manually because they need to be in the read-only nix store. Even a workaround would be appreciated at this point, this issue makes openclaw completely unusable on nix
Author
Owner

@joshp123 commented on GitHub (Feb 3, 2026):

[🤖 this message brought to you by codex] should be fixed in d9bf68ad (bundle docs/reference/templates). Closing for now — come and yell at me in #golden-path-deployments on discord if you're still having issues! Stability work continues; we are making this better every week.

@joshp123 commented on GitHub (Feb 3, 2026): [🤖 this message brought to you by codex] should be fixed in d9bf68ad (bundle docs/reference/templates). Closing for now — come and yell at me in #golden-path-deployments on discord if you're still having issues! Stability work continues; we are making this better every week.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#7