From a33211d0ad07f5aaf2d8bb51ba18e6790a153bb4 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 5 Mar 2026 23:17:06 +0000 Subject: 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 --- internal/executor/claude.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/executor/claude.go') 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) } -- cgit v1.2.3