Skip to content

ci: increase Claude Code max-turns to 20#94

Closed
YuminosukeSato wants to merge 1 commit intomainfrom
ci/increase-max-turns
Closed

ci: increase Claude Code max-turns to 20#94
YuminosukeSato wants to merge 1 commit intomainfrom
ci/increase-max-turns

Conversation

@YuminosukeSato
Copy link
Owner

Summary

Increase the maximum number of turns for Claude Code reviews from 5 to 20.

Problem

Opus 4.6 is hitting the 5-turn limit during code reviews. Recent PR review (PR #90) used 6 turns:

{
  "subtype": "error_max_turns",
  "num_turns": 6,
  "total_cost_usd": 0.13078
}

Changes

- claude_args: "--max-turns 5 --model claude-opus-4-6"
+ claude_args: "--max-turns 20 --model claude-opus-4-6"

Benefits

More Comprehensive Reviews

Opus 4.6 performs deeper analysis than Sonnet 4.5:

  • Security analysis - More thorough UDS security checks, HMAC validation
  • Architectural insights - Better understanding of IPC patterns and performance implications
  • Error detection - More accurate identification of Go error wrapping issues

Why 20 Turns?

  • Opus needs more time - Complex analysis requires multiple reasoning steps
  • Thorough reviews - Allows complete analysis without artificial cutoffs
  • Cost-effective - Better to complete one thorough review than restart multiple times

Cost Implications

  • Per turn cost: ~$0.02 (based on observed $0.13 for 6 turns)
  • Max cost per PR: ~$0.40 (20 turns)
  • Average expected: ~$0.15-0.25 (7-12 turns)

Trade-offs

  • ✅ More thorough code reviews
  • ✅ Better architectural insights
  • ✅ Fewer incomplete reviews
  • ❌ Potentially higher API costs per PR
  • ❌ Longer review times

Verification

After merging, Claude Code will be able to complete reviews without hitting turn limits.

🤖 Generated with Claude Code

Opus 4.6 needs more turns for thorough code reviews.
Recent PR review used 6 turns and hit the 5-turn limit.

Increasing to 20 turns allows for:
- More comprehensive analysis
- Deeper security checks
- Better architectural insights

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 6, 2026 14:17
@github-actions github-actions bot added the area/ci CI/CD workflows label Feb 6, 2026
Copy link
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

This PR increases the maximum number of turns for Claude Code reviews from 5 to 20 to prevent incomplete reviews. The change was motivated by Opus 4.6 hitting the turn limit during PR #90, which required 6 turns but was capped at 5.

Changes:

  • Increased --max-turns parameter from 5 to 20 in the Claude Code workflow configuration

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

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

Labels

area/ci CI/CD workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants