summaryrefslogtreecommitdiff
path: root/internal/executor/claude.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-09 05:50:59 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-09 05:50:59 +0000
commit8ec366de42dd66256895f16c9669469791ca823a (patch)
tree1650beda8dd017e476148a0177e96e3ab79832a8 /internal/executor/claude.go
parent5c8562460fc5b78372a1cfdb400e0cb1f51875cd (diff)
executor: strengthen rate-limit avoidance in classifier
Updated isQuotaExhausted to detect more Claude quota messages. Added 'rate limit reached (rejected)' to quota exhausted checks. Strengthened classifier prompt to explicitly forbid selecting rate-limited agents. Improved Pool to set 5h rate limit on quota exhaustion.
Diffstat (limited to 'internal/executor/claude.go')
-rw-r--r--internal/executor/claude.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/executor/claude.go b/internal/executor/claude.go
index ad1c4e3..9184333 100644
--- a/internal/executor/claude.go
+++ b/internal/executor/claude.go
@@ -433,7 +433,9 @@ func parseStream(r io.Reader, w io.Writer, logger *slog.Logger) (float64, error)
if info, ok := msg["rate_limit_info"].(map[string]interface{}); ok {
status, _ := info["status"].(string)
if status == "rejected" {
- streamErr = fmt.Errorf("claude rate limit reached: %v", msg)
+ streamErr = fmt.Errorf("claude rate limit reached (rejected): %v", msg)
+ // Immediately break since we can't continue anyway
+ break
}
}
case "assistant":