Background & Current State
In internal/agent/estimate.go and internal/scan/estimate.go, the pre-run cost projection uses hard-coded estimation constants:
promptOverheadTokens = 2000
avgMainRoundsPerFile = 7
avgOutputTokensPerRound = 700
As stated in the code comments, these heuristics are meant to provide users with an order-of-magnitude projection before a large review run.
Motivation
With the growing adoption of reasoning-oriented models (such as GPT-5, o-series, and Claude with extended thinking capabilities) or custom setups with extensive custom rules and long system prompts, the fixed 2000 token overhead and 700 output token heuristic can substantially underestimate the pre-run cost projection for large diff change sets.
Proposed Improvement
Consider making the estimation heuristics slightly more adaptive or configurable:
- Model-aware defaults: Apply higher baseline overhead estimates when a reasoning/extended-context model is resolved.
- Template-derived scaffolding: Optionally derive the base overhead from the actual rendered template lengths rather than a static
2000 constant.
- User override in config: Allow power users to optionally configure
estimation_overhead_tokens in config.yaml if they use heavily customized rule sets.
Code References
internal/agent/estimate.go:25-37
internal/scan/estimate.go
Background & Current State
In
internal/agent/estimate.goandinternal/scan/estimate.go, the pre-run cost projection uses hard-coded estimation constants:promptOverheadTokens = 2000avgMainRoundsPerFile = 7avgOutputTokensPerRound = 700As stated in the code comments, these heuristics are meant to provide users with an order-of-magnitude projection before a large review run.
Motivation
With the growing adoption of reasoning-oriented models (such as GPT-5, o-series, and Claude with extended thinking capabilities) or custom setups with extensive custom rules and long system prompts, the fixed
2000token overhead and700output token heuristic can substantially underestimate the pre-run cost projection for large diff change sets.Proposed Improvement
Consider making the estimation heuristics slightly more adaptive or configurable:
2000constant.estimation_overhead_tokensinconfig.yamlif they use heavily customized rule sets.Code References
internal/agent/estimate.go:25-37internal/scan/estimate.go