Skip to content

fix: cap Claude reviewer output tokens (Bedrock TPM/TPD reservation) - #24

Merged
Ziadstr merged 1 commit into
mainfrom
fix/claude-reviewer-output-cap
Oct 15, 2026
Merged

Ziadstr merged 1 commit into
mainfrom
fix/claude-reviewer-output-cap

Conversation

@Ziadstr

@Ziadstr Ziadstr commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a max_output_tokens input (default 16384 review / 32000 mention) to both reusable Claude workflows and wires it to CLAUDE_CODE_MAX_OUTPUT_TOKENS through the action's settings input.

Why

Bedrock deducts input tokens + max_tokens from the TPM and TPD quotas at the start of every request (AWS token burndown). With no cap, each review reserved Sonnet's full ~64k output per call regardless of actual length, inflating reservation and daily burn. Claude 3.7+ also burns output at 5x.

Scope / impact

  • Applies org-wide on merge (per-repo callers reference @main).
  • Additive and per-repo overridable; no behavior change beyond the output cap.
  • Per-call cap, so multi-turn reviews are not truncated overall. Measured review output averaged <1k tokens/call, so 16k is generous headroom.

Not the full fix

This is hygiene, not the unblock. The reviewer is currently 429ing on a tokens-per-day quota of 0 for Sonnet 4.6, which flipped from healthy to fully throttled on 2026-05-19. That needs an AWS quota increase (TPD is non-adjustable, requires a support case) and is tracked separately.

🤖 Generated with Claude Code

@Ziadstr
Ziadstr requested a review from a team as a code owner June 2, 2026 07:07
@Ziadstr
Ziadstr force-pushed the fix/claude-reviewer-output-cap branch from 09cb001 to 629b6b7 Compare October 15, 2026 14:13
@Ziadstr
Ziadstr merged commit ab70c27 into main Oct 15, 2026
134 of 170 checks passed
@Ziadstr
Ziadstr deleted the fix/claude-reviewer-output-cap branch October 15, 2026 14:19
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.

2 participants