Skip to content

fix(design-decision-gate): increase max-turns from 12 to 20#29932

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-design-decision-gate-error
May 3, 2026
Merged

fix(design-decision-gate): increase max-turns from 12 to 20#29932
pelikhan merged 2 commits intomainfrom
copilot/fix-design-decision-gate-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 3, 2026

The Design Decision Gate was hitting error_max_turns on 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: bump max-turns: 12 → 20 in frontmatter; update inline prompt references (hard turn budget header, reserve turns range, mandatory stopping criterion) to match
  • design-decision-gate.lock.yml: recompiled — --max-turns 20 now passed to Claude CLI

The happy path (read prefetch → analyse → generate ADR → commit → push-to-pull-request-branchadd-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
    • Triggering command: /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
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv ." (http block)
    • Triggering command: /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
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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:

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
Copilot AI requested a review from gh-aw-bot May 3, 2026 15:03
@pelikhan pelikhan marked this pull request as ready for review May 3, 2026 15:04
Copilot AI review requested due to automatic review settings May 3, 2026 15:04
@pelikhan pelikhan merged commit d309a31 into main May 3, 2026
19 of 20 checks passed
@pelikhan pelikhan deleted the copilot/fix-design-decision-gate-error branch May 3, 2026 15:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-turns from 12 to 20 in design-decision-gate.md and update the prompt’s internal turn-budget references accordingly.
  • Recompile design-decision-gate.lock.yml so the generated Claude CLI invocation passes --max-turns 20 and the environment reflects GH_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

@github-actions github-actions Bot mentioned this pull request May 3, 2026
Copilot AI added a commit that referenced this pull request May 3, 2026
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.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.

[aw-failures] Design Decision Gate: agent hits max_turns (12) before completing ADR push + comment

4 participants