-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Problem
Currently, tool execution timeout is hardcoded to 60 seconds in the shell tool implementation. This affects:
- exec tool - Shell commands may hang indefinitely if the default timeout is insufficient
- web_fetch - HTTP requests could timeout at inappropriate times
- subagent/spawn - Long-running tasks have no configurable timeout
From code inspection:
pkg/tools/shell.gohas a hardcodedtimeout: 60 * time.Secondpkg/config/config.goExecConfigstruct only hasEnableDenyPatternsandCustomDenyPatterns- No way to configure timeout via config file or environment variable
Proposed Solution
Add timeout configuration to ExecConfig:
{
"tools": {
"exec": {
"enable_deny_patterns": true,
"custom_deny_patterns": [],
"timeout_seconds": 120
}
}
}Changes needed:
- Config struct - Add
TimeoutSecondsfield toExecConfig - Environment variable - Support
PICOCLAW_TOOLS_EXEC_TIMEOUT_SECONDS - Apply timeout - Use configured timeout in
NewExecToolWithConfig - Default value - Keep 60 seconds as default for backward compatibility
Benefits:
- Users can increase timeout for long-running operations (e.g., video processing, large file downloads)
- Users can decrease timeout for faster failure detection
- Consistent with other configurable parameters
Related
- Issue [BUG] looping in something #819 mentions "looping in something" which could be related to timeout behavior
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels