Problem
The exec tool currently marks action as a required parameter with no default value. This causes failures in two scenarios:
1. AI agent calls fail unpredictably
When an LLM calls the exec tool but omits action: "run" (which is the overwhelmingly common case - you almost always want to execute a command), the call fails with action is required. This is a fragile API that punishes the default use case.
2. Internal callers need manual workarounds
Internal code paths that call the exec tool (e.g., cron job execution in #2938) must explicitly pass action: "run", making the code more verbose and error-prone. Every missed action parameter is a silent failure.
Root Cause
PR #2938 fixed the symptom (cron not passing action: "run") by patching the caller, but did not address the underlying API design issue: the exec tool requires an explicit action without providing a sensible default.
Suggestion
Set the default value of action to "run". This is:
- Backward-compatible: existing code that explicitly passes
action: "run" continues to work
- Future-safe: new callers default to the most common operation
- Consistent with how users actually use this tool
For the rare cases where a different action (like list, poll, read, write, kill) is needed, the caller can still pass it explicitly.
Related
Environment
Problem
The
exectool currently marksactionas a required parameter with no default value. This causes failures in two scenarios:1. AI agent calls fail unpredictably
When an LLM calls the
exectool but omitsaction: "run"(which is the overwhelmingly common case - you almost always want to execute a command), the call fails withaction is required. This is a fragile API that punishes the default use case.2. Internal callers need manual workarounds
Internal code paths that call the exec tool (e.g., cron job execution in #2938) must explicitly pass
action: "run", making the code more verbose and error-prone. Every missedactionparameter is a silent failure.Root Cause
PR #2938 fixed the symptom (cron not passing
action: "run") by patching the caller, but did not address the underlying API design issue: the exec tool requires an explicitactionwithout providing a sensible default.Suggestion
Set the default value of
actionto"run". This is:action: "run"continues to workFor the rare cases where a different action (like
list,poll,read,write,kill) is needed, the caller can still pass it explicitly.Related
Environment