Skip to content

Commit 8ce5bc9

Browse files
bpamiriclaude
andauthored
ci: lift bot stage turn caps to ~10x — let timeout-minutes be the ceiling (#2538)
Premature optimization on a dimension we don't have data for. The real ceiling is each workflow's `timeout-minutes` (5-60 min depending on stage), and the real safety net is `WHEELS_BOT_ENABLED=false`. Turn caps that compete with those ceilings just create a redundant cliff, and tonight we discovered painfully that misjudging where it sits costs a full failed run + manual cleanup + re-dispatch. Math that motivates the lift: with `timeout-minutes: 60` and Opus at ~5-10s per turn, propose-fix can practically execute ~360-600 turns before the timeout triggers anyway. A 100-turn cap was a cliff at ~17% of the time budget. A 1000-turn cap is unreachable — the timeout catches it first, which is what we want. Plan: run with these ceilings for a few weeks, collect data on actual turn counts across a variety of issue shapes, then revisit with empirical evidence rather than guesses. bot-triage: 20 → 200 (Sonnet, timeout 25m) bot-research: 40 → 400 (Opus, timeout 30m) bot-propose-fix: 100 → 1000 (Opus, timeout 60m — effectively no cap; workflow timeout becomes the ceiling) bot-write-docs: 30 → 300 (Sonnet, timeout 30m) bot-review-a: 25 → 250 (Sonnet, timeout 20m) bot-review-b: 30 → 300 (Sonnet, timeout 15m) Worst-case incremental cost if a stage hits its new cap before the workflow timeout: ~$50 for propose-fix Opus at 1000 turns, similar for research. In practice the workflow timeout will catch any runaway long before max-turns does. The kill switch (`WHEELS_BOT_ENABLED=false`) is the manual safety net for active incidents. Subsumes both the original 30 → 50 single-stage write-docs bump and the 2x audit. The 10x lift is the right level of generosity for the data-collection period before we tighten anything. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2b443e6 commit 8ce5bc9

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/bot-propose-fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
/propose-fix ${{ env.ISSUE_NUMBER }}
109109
claude_args: |
110110
--model claude-opus-4-7
111-
--max-turns 100
111+
--max-turns 1000
112112
--allowedTools "Bash(gh:*),Bash(git:*),Bash(bash tools/test-local.sh*),Bash(curl:*),Read,Edit,Write,Grep,Glob"
113113
114114
- name: Push branch

.github/workflows/bot-research.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ jobs:
7474
/research-frameworks ${{ env.ISSUE_NUMBER }}
7575
claude_args: |
7676
--model claude-opus-4-7
77-
--max-turns 40
77+
--max-turns 400
7878
--allowedTools "Bash(gh:*),Bash(git log:*),Bash(git show:*),Bash(git grep:*),WebFetch,WebSearch,Read,Grep,Glob"

.github/workflows/bot-review-a.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ jobs:
6666
/review-pr ${{ github.event.pull_request.number }}
6767
claude_args: |
6868
--model claude-sonnet-4-6
69-
--max-turns 25
69+
--max-turns 250
7070
--allowedTools "Bash(gh:*),Bash(git log:*),Bash(git diff:*),Bash(git show:*),Bash(git grep:*),Bash(git status),Read,Grep,Glob"

.github/workflows/bot-review-b.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ jobs:
6565
/review-the-review ${{ github.event.pull_request.number }} ${{ github.event.review.id }}
6666
claude_args: |
6767
--model claude-sonnet-4-6
68-
--max-turns 30
68+
--max-turns 300
6969
--allowedTools "Bash(gh:*),Bash(git log:*),Bash(git diff:*),Bash(git show:*),Bash(git grep:*),Bash(git status),Read,Grep,Glob"

.github/workflows/bot-triage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ jobs:
5858
/triage-issue ${{ github.event.issue.number }}
5959
claude_args: |
6060
--model claude-sonnet-4-6
61-
--max-turns 20
61+
--max-turns 200
6262
--allowedTools "Bash(gh:*),Bash(git status),Bash(git log:*),Bash(git diff:*),Bash(git show:*),Bash(git grep:*),Read,Grep,Glob"

.github/workflows/bot-write-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
/write-docs ${{ env.ISSUE_NUMBER }}
101101
claude_args: |
102102
--model claude-sonnet-4-6
103-
--max-turns 30
103+
--max-turns 300
104104
--allowedTools "Bash(gh:*),Bash(git status),Bash(git log:*),Bash(git diff:*),Bash(git show:*),Bash(git grep:*),Bash(git add:*),Bash(git commit:*),Bash(git push:*),Read,Edit,Write,Grep,Glob"
105105
106106
- name: Push branch

0 commit comments

Comments
 (0)