#Clawdbot seems to have trouble with file based tools;

1 messages Β· Page 1 of 1 (latest)

silk chasm
#

❌ Not working:

β€’ bash (shell commands)
β€’ read (file access)
β€’ write (file creation)
β€’ edit (file editing)

I attemptedd couple restarts and clawd doctor without success. Not sure if this is something i did wrong.

dire kettleBOT
#

Hey! Sorry to hear the file tools aren't cooperating. This is usually a gateway or worker issue. Let's diagnose:

Quick checks first:

  1. Is the gateway actually running? (clawd status or check process)
  2. Do other tools work? (weather, search, etc.)
  3. Any error messages in the logs when you try the commands?

Common fixes:

  • clawd gateway restart β€” sometimes the main gateway gets stuck
  • If that doesn't work, try a full reboot: clawd kill then clawd start
  • Check clawd doctor output specifically for the tool workers section

What to report if it persists:

  • Your OS/environment (Linux, macOS, Docker?)
  • Full clawd doctor output
  • Exact error messages when you try bash, read, etc.
  • Have you changed anything recently (config, permissions, updates)?
#

The file tools run through separate worker processes β€” if the gateway is up but workers crashed, that would explain exactly this symptom. A restart usually clears it, but if it keeps happening, there might be something else going on.

Let me know what clawd status shows and we can dig deeper! 🦐

silk chasm
#

only doc tools don't work, can't see anything in particular on clawdbot doctor or status

dire kettleBOT
#

Found the issue! Looking at your config:

main: {
  name: "Main Assistant",
  workspace: "~/clawd",
  sandbox: {
    mode: "non-main"  // ← This is the problem
  }
}

What's happening:

  • sandbox.mode: "non-main" means: "Only sandbox when it's NOT the main session"
  • Discord channel sessions (like #clawdbot-seems-to-have-trouble-with-file-based-tools) use their own session key, so they're treated as non-main
  • Result: File tools (bash, read, write, edit) are restricted in the sandbox
#

The fix: Change the sandbox mode for the main agent to allow file access in Discord channels.

Options:

  1. Turn off sandbox entirely for main agent:

    sandbox: { mode: "off" }
    
  2. Keep sandbox but allow host workspace access:

    sandbox: { 
      mode: "non-main",
      workspaceAccess: "rw"  // ← Allow read/write to host workspace
    }
    
  3. Explicitly allow file tools for this Discord channel by adding a binding or agent override

#

Since this is a support channel and you probably want full access there, option 1 (mode: "off") is likely what you want for the main agent.

Want me to help you update the config? Just let me know which approach you prefer! 🦐

silk chasm
#

after restarting the machine and updating it went away, i'm unsure what was the cuplrit

dire kettleBOT
# silk chasm after restarting the machine and updating it went away, i'm unsure what was the ...

Based on what you've described, a restart fixed it β€” this points to one of these common culprits:

Most likely causes:

  1. File descriptor exhaustion β€” Too many open files (from zombie processes, lingering connections, or just heavy use) can cause bash/read/write/edit to fail silently. A restart clears this.

  2. Memory pressure β€” If the system was swapping heavily or hitting OOM conditions, file operations can fail. Restart frees up memory.

  3. Stale file handles β€” Processes that crashed or didn't clean up properly can leave files in weird states, causing subsequent operations to fail.

  4. Disk space β€” Full disk (even transiently) can cause writes to fail, and sometimes reads too if the filesystem gets upset.

If it happens again, check:

# File descriptors
ls /proc/$(pgrep -f clawdbot)/fd | wc -l