Bug Description
OpenClaw's skills watcher (chokidar) does not ignore .venv/ and pycache/ directories by default, causing file descriptor exhaustion (FD leak) when skills contain Python virtual environments.
Symptoms
- spawn EBADF error when using exec tool
- Gateway becomes unresponsive
- FD count explodes to 17,000+
Root Cause
In dist/loader-BrK9xPUo.js, the DEFAULT_SKILLS_WATCH_IGNORED array only excludes:
const DEFAULT_SKILLS_WATCH_IGNORED = [
/(^|[\/\])\.git([\/\]|$)/,
/(^|[\/\])node_modules([\/\]|$)/,
/(^|[\/\])dist([\/\]|$)/,
];
Missing patterns:
- .venv/ - Python venv (10,000+ files)
- pycache/ - Python cache
- browser_data/ - Browser cache
Impact
When a skill with Python venv is in workspace/skills/:
- Chokidar watches ~11,000 files in .venv/
- FD count hits 17,784 (exceeds ulimit 4,864)
- child_process.spawn() fails with EBADF
- Gateway exec tool broken
Suggested Fix
const DEFAULT_SKILLS_WATCH_IGNORED = [
/(^|[\/\])\.git([\/\]|$)/,
/(^|[\/\])node_modules([\/\]|$)/,
/(^|[\/\])dist([\/\]|$)/,
/(^|[\/\])\.venv([\/\]|$)/,
/(^|[\/\])__pycache__([\/\]|$)/,
/(^|[\/\])browser_data([\/\]|$)/,
];
Severity: High
Type: Bug
Bug Description
OpenClaw's skills watcher (chokidar) does not ignore .venv/ and pycache/ directories by default, causing file descriptor exhaustion (FD leak) when skills contain Python virtual environments.
Symptoms
Root Cause
In dist/loader-BrK9xPUo.js, the DEFAULT_SKILLS_WATCH_IGNORED array only excludes:
Missing patterns:
Impact
When a skill with Python venv is in workspace/skills/:
Suggested Fix
Severity: High
Type: Bug