extension-troubleshoot

star 731

Diagnose and fix piclaw extension issues (imports, DB init errors, watcher perms), update skel, and restart safely.

rcarmo By rcarmo schedule Updated 3/14/2026

name: extension-troubleshoot description: Diagnose and fix piclaw extension issues (imports, DB init errors, watcher perms), update skel, and restart safely. distribution: public

Extension Troubleshoot (piclaw)

Use this when piclaw web chats only show thinking or extensions throw errors.

Steps

  1. Check extension errors
tail -n 80 /var/log/piclaw/piclaw.stderr.log
  1. Inspect current extension file(s)
readlink -f /workspace/.pi/extensions/context-mode.ts
sed -n '1,120p' /workspace/.pi/extensions/context-mode.ts
  1. Ensure imports reference installed piclaw (not workspace src)
  • Use installed path: /home/agent/.bun/install/global/node_modules/piclaw/dist/...
  • Avoid /workspace/piclaw or node_modules symlinked to workspace.
  1. Harden extension
  • Remove/avoid startup cleanup that touches DB before init.
  • Wrap tool executes with try/catch to prevent crashes.
  • Guard saveToolOutput with try/catch.
  1. Update skel extension too
cp /workspace/.pi/extensions/context-mode.ts /workspace/piclaw/skel/.pi/extensions/context-mode.ts
  1. Fix workspace watcher permissions (if fs.watch warns on tailscale)
sudo chown -R agent:agent /workspace/.piclaw/tailscale
  1. Restart piclaw
supervisorctl restart piclaw
  1. Verify
tail -n 40 /var/log/piclaw/piclaw.stderr.log
Install via CLI
npx skills add https://github.com/rcarmo/piclaw --skill extension-troubleshoot
Repository Details
star Stars 731
call_split Forks 69
navigation Branch main
article Path SKILL.md
More from Creator