Commit 4cbf803
ci(auto-fix-issue): Raise turn limit to 80 and tighten prompt (#21001)
## Summary
The `auto-fix-issue` workflow was failing with `Reached maximum number
of turns (50)` because Claude hit the hard cap before either landing a
fix or aborting cleanly. Two changes:
- **Raise `--max-turns` from 50 to 80** so larger but still tractable
fixes can complete.
- **Tighten the prompt** in two ways so we rarely hit the cap:
- Add a *Be economic with tool calls* section — plan before acting,
batch parallel calls, avoid redundant reads/test runs, stop searching
once the answer is found.
- Add a *Turn budget* section — if ~50 tool calls in there's no clear
path to a small verified fix, stop, comment on the issue with what was
tried, and exit instead of grinding into the hard cap.
The net effect: fewer wasted turns per run, and when the issue is
genuinely too big the action reports a useful issue comment instead of
failing with a stack trace.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3a57997 commit 4cbf803
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
103 | 118 | | |
104 | | - | |
| 119 | + | |
0 commit comments