Opus finding
BudgetCheck warning flag inconsistent: returns warning:true when ok=false but also when warnAtPercent==0
- src/budget.ts:88-124
If a caller passes warnAtPercent=0 (or it defaults to 0), the warning flag is true from turn 0 with totalTokens=0, since 0 >= 0. This will spam the warning UI immediately. Validate warnAtPercent > 0 in the constructor, or use strict '>'.
Recommendation
Clamp warnAtPercent into (0, 100] in constructor or use strict comparison.