summaryrefslogtreecommitdiff
path: root/internal/executor/claude.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-05 23:17:06 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-05 23:17:06 +0000
commita33211d0ad07f5aaf2d8bb51ba18e6790a153bb4 (patch)
tree331380911223bbcd9a5a22d68c38125218147beb /internal/executor/claude.go
parentf8b5f2580e730a8affbccec8b5bde9b96b1f9fc2 (diff)
executor: default permission_mode to bypassPermissions
claudomator runs tasks unattended; prompting for write permission always stalls execution. Any task without an explicit permission_mode now gets --permission-mode bypassPermissions automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/executor/claude.go')
-rw-r--r--internal/executor/claude.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/executor/claude.go b/internal/executor/claude.go
index 7cbcc6c..d3f5751 100644
--- a/internal/executor/claude.go
+++ b/internal/executor/claude.go
@@ -203,9 +203,14 @@ func (r *ClaudeRunner) buildArgs(t *task.Task) []string {
if t.Claude.MaxBudgetUSD > 0 {
args = append(args, "--max-budget-usd", fmt.Sprintf("%.2f", t.Claude.MaxBudgetUSD))
}
- if t.Claude.PermissionMode != "" {
- args = append(args, "--permission-mode", t.Claude.PermissionMode)
+ // Default to bypassPermissions — claudomator runs tasks unattended, so
+ // prompting for write access would always stall execution. Tasks that need
+ // a more restrictive mode can set permission_mode explicitly.
+ permMode := t.Claude.PermissionMode
+ if permMode == "" {
+ permMode = "bypassPermissions"
}
+ args = append(args, "--permission-mode", permMode)
if t.Claude.SystemPromptAppend != "" {
args = append(args, "--append-system-prompt", t.Claude.SystemPromptAppend)
}