fix(design-decision-gate): increase max-turns from 12 to 20#29932
Merged
fix(design-decision-gate): increase max-turns from 12 to 20#29932
Conversation
The workflow was hitting the max_turns limit (12) before completing all required steps, causing 100% failure rate. The agent needs ~13 turns minimum to: read context, analyze, generate ADR, commit, and post the blocking PR comment. Increase max-turns to 20 to provide sufficient headroom. Also update all inline prompt references to the turn budget (12 → 20) for consistency. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b1020f54-0820-47e2-867c-ddccb6213b34 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Design Decision Gate max_turns issue in ADR workflow
fix(design-decision-gate): increase max-turns from 12 to 20
May 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Increases the Design Decision Gate’s maximum agent turn budget to prevent runs from terminating before the workflow can complete ADR generation and post the final PR comment.
Changes:
- Bump
engine.max-turnsfrom 12 to 20 indesign-decision-gate.mdand update the prompt’s internal turn-budget references accordingly. - Recompile
design-decision-gate.lock.ymlso the generated Claude CLI invocation passes--max-turns 20and the environment reflectsGH_AW_MAX_TURNS: 20.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/design-decision-gate.md | Updates the workflow frontmatter turn limit and aligns all in-prompt budget/stopping criteria text to 20 turns. |
| .github/workflows/design-decision-gate.lock.yml | Regenerated lockfile to propagate the new max-turns setting into the compiled workflow execution command/env. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
Copilot AI
added a commit
that referenced
this pull request
May 3, 2026
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Design Decision Gate was hitting
error_max_turnson every run because completing the full ADR generation + PR comment sequence requires ~13 agent turns minimum, but the workflow was capped at 12.Changes
design-decision-gate.md: bumpmax-turns: 12 → 20in frontmatter; update inline prompt references (hard turn budget header, reserve turns range, mandatory stopping criterion) to matchdesign-decision-gate.lock.yml: recompiled —--max-turns 20now passed to Claude CLIThe happy path (read prefetch → analyse → generate ADR → commit →
push-to-pull-request-branch→add-comment) is ~13 turns. At 12, the agent was cut off before posting the blocking comment, causing the gate to silently fail on 100% of triggered runs.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv ithub/workflows --local repository(owner: $owner, name: $name) { hasDiscussionsEnabled } }(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 --local sv(http block)https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv -error(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v9/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv ."(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv d -n 10(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv(http block)/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --get-regexp --local change-checker.lock.yml(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv(http block)https://api.github.com/repos/docker/metadata-action/git/ref/tags/v6/usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv(http block)https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v4/usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv(http block)https://api.github.com/repos/github/gh-aw/usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch ithub/workflows --local ache/uv/0.11.8/x-f credential.userngit(http block)If you need me to access, download, or install something from one of these locations, you can either: