docs: document review budget defaults

This commit is contained in:
Claude
2026-09-01 11:42:59 +00:00
parent 3a10deef06
commit f9eef969e6
+11
View File
@@ -150,10 +150,21 @@ rates, calibrated against runs measured through the usage telemetry
(`OBSERVED_RUNS` in that file — append to it, don't guess). Tokens are summed
from opencode `step_finish` events per review.
Each review is governed by hard limits: 20 completed steps, 120,000 total
tokens, 20,000 output tokens, and 480 seconds by default. Limits can be
overridden deployment-wide with `PRAGENT_MAX_REVIEW_STEPS`,
`PRAGENT_MAX_REVIEW_TOKENS`, `PRAGENT_MAX_REVIEW_OUTPUT_TOKENS`, and
`PRAGENT_REVIEW_TIMEOUT`, or per repository in the trusted base-branch
`.pr-review.json`; repository values win.
Two measured reviews of a ~1100-line PR in this repo: 28 and 31 agent steps,
~2.1M input tokens each, **zero cache reads or writes**. The demo repo's PR, same
tier: 126K tokens.
The measurements above are historical uncapped runs. A capped run preserves
completed output, reports the cap reason in the review, and records it in
Langfuse.
| Model | this repo, ~1100-line PR | demo repo PR |
|---|---:|---:|
| Claude Opus 5 | ~$10.79 | ~$0.71 |