Skip to content

ci: increase max-turns from 20 to 30#96

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

ci: increase max-turns from 20 to 30#96
YuminosukeSato wants to merge 1 commit intomainfrom
ci/increase-max-turns-30

Conversation

@YuminosukeSato
Copy link
Owner

Summary

Increase Claude Code max-turns from 20 to 30 based on actual usage patterns.

Problem

PR #92 used 21 turns and hit the 20-turn limit, causing the review to fail with exit code 1 despite completing successfully.

Evidence from PR #92:

{
  "is_error": false,
  "num_turns": 21,
  "total_cost_usd": 0.36
}

The review was actually successful (is_error: false) but failed because it exceeded max-turns.

Observed Usage Patterns

Recent PRs after rebase:

Changes

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

Cost Analysis

Current (max-turns: 20)

  • Average: ~$0.40/PR
  • Risk: Incomplete reviews when hitting limit

Proposed (max-turns: 30)

  • Expected: $0.40-0.60/PR (based on 20-25 turns)
  • Maximum: ~$0.90/PR (if using all 30 turns)
  • Benefit: Complete reviews without artificial cutoffs

Why 30?

  • 50% buffer: 20 → 30 provides cushion for complex PRs
  • Prevents incomplete reviews: Better to complete than hit limit
  • Cost-effective: Still reasonable cost per review
  • Opus needs time: Thorough analysis requires multiple reasoning steps

Trade-offs

Benefits:

  • Complete reviews without hitting limits
  • More comprehensive security analysis
  • Better architectural insights

Costs:

  • Potentially higher API costs per PR (~$0.20 increase)
  • Longer review times

Alternative Considered

Keep max-turns at 20 and accept incomplete reviews → Rejected because incomplete reviews defeat the purpose of automated code review.

🤖 Generated with Claude Code

PR #92 used 21 turns and hit the limit. Increasing to 30 to allow
more comprehensive reviews without artificial cutoffs.

Observed usage:
- PR #90: 18 turns (/bin/zsh.51)
- PR #92: 21 turns (/bin/zsh.36)

Expected cost: ~/bin/zsh.40-0.60 per PR
Copilot AI review requested due to automatic review settings February 6, 2026 14:32
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

Increases the Claude Code workflow --max-turns limit to avoid CI failures when reviews exceed the previous 20-turn cap.

Changes:

  • Bump claude_args --max-turns from 20 to 30 in the GitHub Actions workflow.

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

@github-actions github-actions bot added the area/ci CI/CD workflows label Feb 6, 2026
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