summaryrefslogtreecommitdiff
path: root/internal/executor/claude.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor/claude.go')
-rw-r--r--internal/executor/claude.go34
1 files changed, 17 insertions, 17 deletions
diff --git a/internal/executor/claude.go b/internal/executor/claude.go
index aa715da..e504369 100644
--- a/internal/executor/claude.go
+++ b/internal/executor/claude.go
@@ -61,7 +61,7 @@ func (r *ClaudeRunner) binaryPath() string {
// changes back to project_dir. On failure the sandbox is preserved and its
// path is included in the error.
func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Execution) error {
- projectDir := t.Claude.ProjectDir
+ projectDir := t.Agent.ProjectDir
// Validate project_dir exists when set.
if projectDir != "" {
@@ -319,21 +319,21 @@ func (r *ClaudeRunner) buildArgs(t *task.Task, e *storage.Execution, questionFil
"--output-format", "stream-json",
"--verbose",
}
- permMode := t.Claude.PermissionMode
+ permMode := t.Agent.PermissionMode
if permMode == "" {
permMode = "bypassPermissions"
}
args = append(args, "--permission-mode", permMode)
- if t.Claude.Model != "" {
- args = append(args, "--model", t.Claude.Model)
+ if t.Agent.Model != "" {
+ args = append(args, "--model", t.Agent.Model)
}
return args
}
- instructions := t.Claude.Instructions
- allowedTools := t.Claude.AllowedTools
+ instructions := t.Agent.Instructions
+ allowedTools := t.Agent.AllowedTools
- if !t.Claude.SkipPlanning {
+ if !t.Agent.SkipPlanning {
instructions = withPlanningPreamble(instructions)
// Ensure Bash is available so the agent can POST subtasks and ask questions.
hasBash := false
@@ -355,33 +355,33 @@ func (r *ClaudeRunner) buildArgs(t *task.Task, e *storage.Execution, questionFil
"--verbose",
}
- if t.Claude.Model != "" {
- args = append(args, "--model", t.Claude.Model)
+ if t.Agent.Model != "" {
+ args = append(args, "--model", t.Agent.Model)
}
- if t.Claude.MaxBudgetUSD > 0 {
- args = append(args, "--max-budget-usd", fmt.Sprintf("%.2f", t.Claude.MaxBudgetUSD))
+ if t.Agent.MaxBudgetUSD > 0 {
+ args = append(args, "--max-budget-usd", fmt.Sprintf("%.2f", t.Agent.MaxBudgetUSD))
}
// 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
+ permMode := t.Agent.PermissionMode
if permMode == "" {
permMode = "bypassPermissions"
}
args = append(args, "--permission-mode", permMode)
- if t.Claude.SystemPromptAppend != "" {
- args = append(args, "--append-system-prompt", t.Claude.SystemPromptAppend)
+ if t.Agent.SystemPromptAppend != "" {
+ args = append(args, "--append-system-prompt", t.Agent.SystemPromptAppend)
}
for _, tool := range allowedTools {
args = append(args, "--allowedTools", tool)
}
- for _, tool := range t.Claude.DisallowedTools {
+ for _, tool := range t.Agent.DisallowedTools {
args = append(args, "--disallowedTools", tool)
}
- for _, f := range t.Claude.ContextFiles {
+ for _, f := range t.Agent.ContextFiles {
args = append(args, "--add-dir", f)
}
- args = append(args, t.Claude.AdditionalArgs...)
+ args = append(args, t.Agent.AdditionalArgs...)
return args
}