bump issue-work --max-turns to 100 (hardcoded constant — strong opinion, not a knob) #343

Closed
opened 2026-07-04 06:41:15 +00:00 by igor · 0 comments
Collaborator

Why (concrete — tonight)

The hardcoded --max-turns 50 discarded TWO completed builds tonight:

  • igor#334 (logwatch de-noise): capped twice → had to split to an MVP that fit (#341).
  • porksicle.com#118 (Wordhog UI bug): crash-log shows the fix was DONE — only game.js
    changed, "all green", full Playwright play-through passed — and it capped at turn 50 while
    running /security-review at the very end. The completed, verified fix was thrown away
    (the CLAUDE_EXIT gate correctly refuses to commit on rc=1).

Thorough visual verification (Playwright screenshots + play-through) is exactly the behavior we
WANT, and it is turn-expensive. 50 is too low for it. This is the #337/#342 theme at its source.

Change (INERT on merge — zero behavior change)

Replace the hardcoded --max-turns 50 at every call site with --max-turns "${AGENT_MAX_TURNS:-50}":

  • grep --max-turns 50: bin/tick.sh (3 sites) + bin/site-work-block.sh (1 site).
    Default stays 50, so merging changes nothing. The operator raises it by setting AGENT_MAX_TURNS
    in the host .env. Document it in .env.example (if present) + the CLAUDE.md gotchas/model section.

Guardrail note

This does NOT lift the cap — it makes the existing cost guardrail operator-tunable, defaulting to
current behavior. The operator picks the value (Josh: suggest ~100-120 given Playwright verification
runs ~30 tool calls); the human merge gate stays intact. No self-authorized privilege expansion.

Tests / verify

Small change. Verify the 4 sites resolve the var (grep), bash bin/check-sync.sh green. Build,
verify once, STOP. Run commands plainly (no > redirects, no &&/; compounds, no ./relative).

<!-- agent:enqueue --> ## Why (concrete — tonight) The hardcoded `--max-turns 50` discarded TWO completed builds tonight: - **igor#334** (logwatch de-noise): capped twice → had to split to an MVP that fit (#341). - **porksicle.com#118** (Wordhog UI bug): crash-log shows the fix was DONE — only `game.js` changed, "all green", full Playwright play-through passed — and it capped at turn 50 while running `/security-review` at the very end. The completed, verified fix was thrown away (the CLAUDE_EXIT gate correctly refuses to commit on rc=1). Thorough visual verification (Playwright screenshots + play-through) is exactly the behavior we WANT, and it is turn-expensive. 50 is too low for it. This is the #337/#342 theme at its source. ## Change (INERT on merge — zero behavior change) Replace the hardcoded `--max-turns 50` at every call site with `--max-turns "${AGENT_MAX_TURNS:-50}"`: - grep `--max-turns 50`: **bin/tick.sh** (3 sites) + **bin/site-work-block.sh** (1 site). Default stays **50**, so merging changes nothing. The operator raises it by setting `AGENT_MAX_TURNS` in the host `.env`. Document it in `.env.example` (if present) + the CLAUDE.md gotchas/model section. ## Guardrail note This does NOT lift the cap — it makes the existing cost guardrail **operator-tunable**, defaulting to current behavior. The operator picks the value (Josh: suggest ~100-120 given Playwright verification runs ~30 tool calls); the human merge gate stays intact. No self-authorized privilege expansion. ## Tests / verify Small change. Verify the 4 sites resolve the var (grep), `bash bin/check-sync.sh` green. Build, verify once, STOP. Run commands plainly (no `>` redirects, no `&&`/`;` compounds, no `./relative`).
igor self-assigned this 2026-07-04 06:41:39 +00:00
igor added spent time 2026-07-04 06:44:14 +00:00
2 minutes 26 seconds
igor removed their assignment 2026-07-04 06:44:14 +00:00
igor changed title from feat: make issue-work --max-turns configurable (AGENT_MAX_TURNS, default 50 unchanged) to bump issue-work --max-turns to 100 (hardcoded constant — strong opinion, not a knob) 2026-07-04 14:23:53 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Total time spent: 2 minutes 26 seconds
igor
2 minutes 26 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshtronic/igor#343
No description provided.