Skip to content

ci(claude-review): raise --max-turns 20 -> 50#3692

Merged
hathach merged 1 commit into
masterfrom
claude/bump-claude-review-max-turns
Jun 11, 2026
Merged

ci(claude-review): raise --max-turns 20 -> 50#3692
hathach merged 1 commit into
masterfrom
claude/bump-claude-review-max-turns

Conversation

@hathach

@hathach hathach commented Jun 11, 2026

Copy link
Copy Markdown
Owner

What

Raise the Claude Code Review action's turn cap from --max-turns 20 to --max-turns 50 in .github/workflows/claude-code-review.yml.

Why

The claude-review workflow runs /code-review:code-review … --comment with a hard --max-turns limit. On large PRs the agent spends all its turns reading the diff and source files and never reaches its final "post the review" step, so the SDK returns an error and the check fails red:

Reached maximum number of turns (20)
→ Process completed with exit code 1

This is what happened on #3636 ("add stm32c5 support" — 29 files, +1689/−15): every build check was green, but claude-review died at 20 turns and posted nothing.

Cost note

Cost scales with tokens, not the turn cap. A review that finishes in 25 turns costs the same whether the ceiling is 25 or 50 — the cap only bites when the agent would otherwise be force-stopped mid-run. Bumping it to 50 just lets port-sized PRs complete; the typical small PR is unaffected.

Not in scope

The show_full_output: true line above it is still marked TEMPORARY for debugging — left untouched here.

🤖 Generated with Claude Code

The Claude Code Review action runs /code-review:code-review with a hard
--max-turns cap. On large PRs (e.g. #3636 "add stm32c5 support", 29 files
/ +1689), the agent exhausts 20 turns exploring the diff before it can
produce and post its review, so the SDK returns an error and the
claude-review check fails red with:

  Reached maximum number of turns (20)

Raise the cap to 50 so port-sized PRs complete and post their review.
Cost scales with tokens, not the cap: a finished review pays the same
whether the ceiling is 25 or 50 — the cap only bites when the agent
would otherwise be force-stopped mid-run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 11, 2026 12:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Claude Code Review GitHub Actions workflow configuration to allow the review agent to run longer before being force-stopped, addressing failures on larger pull requests where the agent previously hit the turn limit before posting results.

Changes:

  • Increase claude_args turn cap from --max-turns 20 to --max-turns 50 in the claude-review workflow job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hathach hathach merged commit 629e805 into master Jun 11, 2026
164 of 193 checks passed
@hathach hathach deleted the claude/bump-claude-review-max-turns branch June 11, 2026 12:47
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected across 2345 targets. View Project Dashboard →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants