Skip to content

Set an explicit 80-turn cap for Documentation Unbloat - #422

Open
ns-jcavarroc wants to merge 1 commit into
githubnext:mainfrom
ns-jcavarroc:max-turns-unbloat-docs
Open

ns-jcavarroc wants to merge 1 commit into
githubnext:mainfrom
ns-jcavarroc:max-turns-unbloat-docs

Conversation

@ns-jcavarroc

Copy link
Copy Markdown

Problem

unbloat-docs.md sets no max-turns, so the workflow compiles with the default turn cap. On consumer repos whose own conventions require ticket-creation ceremony before any edit work, that default is too small and the failure is deterministic.

Evidence from a consumer repo (netSkope/fcs, daily schedule, gh-aw v1.2.2 / claude engine 2.1.317):

  • 8 consecutive daily runs (2026-11-17 through 2026-11-24) all ended with ERR_VALIDATION: Agent execution stopped: max-turns limit reached (error_max_turns, driver exit 1, 41/40 turns used)
  • Turn traces show ~half the budget consumed before the first doc edit: doc inventory, then the repo-convention Jira ticket lifecycle (ticket creation, sprint membership, transition, branch rename), including recovery turns after a credential-script failure
  • The remaining turns are not enough for the edit-verify loop the prompt requires ("at least 20%" reduction): last observed state was 8.5% words reduced, 0 safe outputs emitted, no PR, all work discarded with the runner
  • Each failed run costs ~$1.25 and 17 action-minutes, and the workflow retries the same doomed path every day

Fix

Set max-turns: 80 in the frontmatter (top-level field per the gh-aw syntax docs; multi-device-docs-tester.md already sets a turn cap, via the deprecated engine.max-turns alias).

80 matches what consumers of the other editing workflows (perf-improver, claude-review, update-docs) already use for this class of task.

🤖 Generated with Claude Code

Unbloat-docs sets no max-turns, so consumers compile it with the
default cap. On a repo with heavyweight per-run conventions (ticket
creation before edits), the agent spends roughly half the default
budget before the first doc edit and then hits the cap mid-task:
8 consecutive daily runs ended in error_max_turns with no safe
outputs emitted. 80 matches the budget other editing workflows in
this repo's consumers use for the same class of task.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant