summaryrefslogtreecommitdiff
path: root/internal/executor/claude.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-05-01 22:14:37 -1000
committerGitHub <noreply@github.com>2026-05-01 22:14:37 -1000
commit99115d8158137083239c45e5a860b718ff4cefa1 (patch)
tree1bf3bd0505eea79375c67af83c7c5fe8c0f274ff /internal/executor/claude.go
parentc2aa026f6ce1c9e216b99d74f294fc133d5fcddd (diff)
parent50f8fe8c1ff8b82e0bd399e5776e58bda3e57d1c (diff)
Merge pull request #1 from thepeterstone/claude/local-oss-model-agents-MEBqj
Local OSS models as a third runner (epic)
Diffstat (limited to 'internal/executor/claude.go')
-rw-r--r--internal/executor/claude.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/executor/claude.go b/internal/executor/claude.go
index 7e79ce0..e3f8e1c 100644
--- a/internal/executor/claude.go
+++ b/internal/executor/claude.go
@@ -15,6 +15,7 @@ import (
"syscall"
"time"
+ "github.com/thepeterstone/claudomator/internal/retry"
"github.com/thepeterstone/claudomator/internal/storage"
"github.com/thepeterstone/claudomator/internal/task"
)
@@ -147,7 +148,7 @@ func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi
args := r.buildArgs(t, e, questionFile)
attempt := 0
- err := runWithBackoff(ctx, 3, 5*time.Second, func() error {
+ err := retry.RunWithBackoff(ctx, 3, 5*time.Second, func() error {
if attempt > 0 {
delay := 5 * time.Second * (1 << (attempt - 1))
r.Logger.Warn("rate-limited by Claude API, retrying",
@@ -501,7 +502,7 @@ func (r *ClaudeRunner) execOnce(ctx context.Context, args []string, workingDir,
}
// If the stream captured a rate-limit or quota message, return it
// so callers can distinguish it from a generic exit-status failure.
- if isRateLimitError(streamErr) || isQuotaExhausted(streamErr) {
+ if retry.IsRateLimitError(streamErr) || isQuotaExhausted(streamErr) {
return streamErr
}
if tail := tailFile(e.StderrPath, 20); tail != "" {