What's missing
The fix agent's iteration cap feature is documented in docs/fix.md under "Iteration limits" (lines 148-159), but the environment variables that control it are not documented in the Variables section. Users can see that caps exist (5 for bot, 10 for human) but don't know how to configure them.
What should be documented
Add ITERATION_CAP and ITERATION_CAP_HUMAN to the Variables table in docs/fix.md, following the same format used in docs/triage.md (lines 148-159) and docs/review.md (lines 86-99).
Variables to add:
| Variable |
Description |
Default |
Valid values |
ITERATION_CAP |
Maximum number of bot-triggered fix iterations per PR. When this limit is reached, the fix agent stops running automatically and applies the needs-human label. Human-triggered /fs-fix commands can still run (up to ITERATION_CAP_HUMAN). |
5 |
Positive integer |
ITERATION_CAP_HUMAN |
Maximum total fix iterations per PR, including both bot-triggered and human-triggered (/fs-fix) runs. When this limit is reached, all fix runs are blocked. |
10 |
Positive integer |
Location: docs/fix.md, Variables section (currently lines 58-62)
Additional work
Add a reference in docs/review.md to point readers to the fix agent's iteration cap configuration, since the review→fix cycle involves both agents. Suggested location: after the Variables section or in the "Control labels" section where it mentions triggering the fix agent (line 52).
Context
The iteration cap prevents infinite review→fix loops when the two agents disagree. The implementation is in scripts/pre-fix.src.sh (lines 97-120), which reads these variables with defaults but they're not surfaced in user-facing docs.
What's missing
The fix agent's iteration cap feature is documented in
docs/fix.mdunder "Iteration limits" (lines 148-159), but the environment variables that control it are not documented in the Variables section. Users can see that caps exist (5 for bot, 10 for human) but don't know how to configure them.What should be documented
Add
ITERATION_CAPandITERATION_CAP_HUMANto the Variables table indocs/fix.md, following the same format used indocs/triage.md(lines 148-159) anddocs/review.md(lines 86-99).Variables to add:
ITERATION_CAPneeds-humanlabel. Human-triggered/fs-fixcommands can still run (up toITERATION_CAP_HUMAN).5ITERATION_CAP_HUMAN/fs-fix) runs. When this limit is reached, all fix runs are blocked.10Location:
docs/fix.md, Variables section (currently lines 58-62)Additional work
Add a reference in
docs/review.mdto point readers to the fix agent's iteration cap configuration, since the review→fix cycle involves both agents. Suggested location: after the Variables section or in the "Control labels" section where it mentions triggering the fix agent (line 52).Context
The iteration cap prevents infinite review→fix loops when the two agents disagree. The implementation is in
scripts/pre-fix.src.sh(lines 97-120), which reads these variables with defaults but they're not surfaced in user-facing docs.