Skip to content

Conversation

@gtrufitt
Copy link
Member

@gtrufitt gtrufitt commented Jul 8, 2025

Fix Claude Code action max_turns limit for PR reviews

Problem

Claude Code action is hitting the max_turns: 5 limit before completing PR reviews in the web-experience project. The action posts the initial task list but never provides actual review feedback, leaving all checkboxes empty.

From the action logs:

"subtype": "error_max_turns"
"num_turns": 5

Claude runs out of turns after reading the changed files but before writing and posting the review feedback.

Solution

Increase max_turns from 5 to 10 in the reusable workflow. This may need further adjustment if 10 turns proves insufficient for larger PRs.

Why this change is needed

For PR reviews, Claude typically needs:

  • 1 turn: Post initial task list
  • 3-4 turns: Read each changed file
  • 2-3 turns: Analyse code and write comprehensive review
  • 1 turn: Update comment with final review feedback

5 turns only allows file reading, not the actual review analysis and posting.

Impact

  • PR reviews will now complete successfully with actual feedback
  • No impact on simpler tasks that don't need as many turns
  • Slight increase in action runtime for complex reviews (but they'll actually work)
  • May need further tuning based on PR complexity

@gtrufitt
Copy link
Member Author

gtrufitt commented Jul 9, 2025

Note that I have added to the template as I reckon 5 is too small for any PR. We can do the tweaking higher in web experience if we still find 10 to be insufficient

@gtrufitt gtrufitt requested a review from miguelpuiggarcia July 9, 2025 06:24
Copy link

@scottlet scottlet left a comment

Choose a reason for hiding this comment

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

Wild!

@gtrufitt gtrufitt merged commit 566e05b into main Jul 9, 2025
6 checks passed
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.

4 participants