Bug Report
Version: 2026.4.15 (041266a)
Platform: Windows 11 (PowerShell)
Description
When passing multiple tools to --tools in cron add or cron edit on Windows/PowerShell, the gateway stores them as a single space-separated string instead of a proper array.
Root Cause
In PowerShell, an unquoted comma-separated value like exec,read,write is parsed as a PowerShell array @("exec","read","write") and passed to Node as three separate arguments. Node/Commander receives opts.tools = "exec read write" (space-joined), so opts.tools.split(",") produces ["exec read write"] — one element, no split.
This is a PowerShell-specific quoting issue. The fix is either:
- User-side: always quote
--tools "exec,read,write" on Windows
- CLI-side: also split on whitespace in addition to commas:
opts.tools.split(/[,\s]+/)
Option 2 is more robust and would handle both cases transparently.
Steps to Reproduce (Windows PowerShell)
# Bug: unquoted — PowerShell splits on comma before Node sees it
openclaw cron add --name test --cron "0 3 * * 0" --session isolated --model ollama/granite4:3b-h --light-context --timeout-seconds 30 --tools exec,read,write --message test
# Result: toolsAllow: ["exec read write"] <- wrong
# Workaround: quoted
openclaw cron add --name test --cron "0 3 * * 0" --session isolated --model ollama/granite4:3b-h --light-context --timeout-seconds 30 --tools "exec,read,write" --message test
# Result: toolsAllow: ["exec", "read", "write"] <- correct
Suggested Fix
In cron-cli, change:
opts.tools.split(",").map(...)
to:
opts.tools.split(/[,\s]+/).map(...)
This handles both quoted (exec,read,write) and space-separated PowerShell input (exec read write) transparently.
Impact
- Jobs with multiple tools silently get no tool restrictions enforced
- No error or warning shown — invisible at creation time
- Workaround: quote the value
--tools "exec,read,write" or manually fix ~/.openclaw/cron/jobs.json
Bug Report
Version: 2026.4.15 (041266a)
Platform: Windows 11 (PowerShell)
Description
When passing multiple tools to
--toolsincron addorcron editon Windows/PowerShell, the gateway stores them as a single space-separated string instead of a proper array.Root Cause
In PowerShell, an unquoted comma-separated value like
exec,read,writeis parsed as a PowerShell array@("exec","read","write")and passed to Node as three separate arguments. Node/Commander receivesopts.tools = "exec read write"(space-joined), soopts.tools.split(",")produces["exec read write"]— one element, no split.This is a PowerShell-specific quoting issue. The fix is either:
--tools "exec,read,write"on Windowsopts.tools.split(/[,\s]+/)Option 2 is more robust and would handle both cases transparently.
Steps to Reproduce (Windows PowerShell)
Suggested Fix
In
cron-cli, change:to:
This handles both quoted (
exec,read,write) and space-separated PowerShell input (exec read write) transparently.Impact
--tools "exec,read,write"or manually fix~/.openclaw/cron/jobs.json