diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-06-04 06:23:29 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-06-04 06:23:29 +0000 |
| commit | 65b68336bcbe46582c23da53682bdd74376c42e1 (patch) | |
| tree | ce4eb59cb9c2b046a58094a2aa25d2ff4dff7d26 | |
| parent | 3199ba2a9927d9b259b3f0270ad108561e6e4b6e (diff) | |
fix(validator): require repository_url for claude/gemini agent types
ContainerRunner fails at runtime with a non-descriptive error if
repository_url is missing. Catch it at task creation time instead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rw-r--r-- | internal/task/validator.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/task/validator.go b/internal/task/validator.go index 003fab9..09f4b34 100644 --- a/internal/task/validator.go +++ b/internal/task/validator.go @@ -48,6 +48,13 @@ func Validate(t *Task) error { if t.Priority != "" && !validPriorities[t.Priority] { ve.Add(fmt.Sprintf("invalid priority %q; must be high, normal, or low", t.Priority)) } + agentType := strings.ToLower(t.Agent.Type) + if agentType == "" || agentType == "claude" || agentType == "gemini" { + if t.RepositoryURL == "" { + ve.Add("repository_url is required for claude/gemini agent types") + } + } + if t.Agent.PermissionMode != "" { validModes := map[string]bool{ "default": true, "acceptEdits": true, "bypassPermissions": true, |
