You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
optimize: low-worth sessions with zero edits claim the full session as recoverable savings #640
estimateLowWorthRecoverableTokens returns the entire session token total when editTurns === 0 (src/optimize.ts:1971). That per-session number feeds tokensSaved, the headline "Potential savings: X tokens ($Y, ~Z% of spend)" (src/optimize.ts:2557-2563), and the JSON potentialSavingsCostUSD / per-finding estimatedSavingsUSD. The finding text hedges (review candidate, not proof of waste), but the number asserts the whole session cost is savable. An exploration-heavy user sees an upper bound presented as a point estimate, and it inflates the setup-health picture.
The retry path already does this right: it applies a bounded recovery fraction. Only the no-edit branch claims 100%.
Evidence
src/optimize.ts:1967-1978, specifically :1971 if (editTurns === 0) return tokens
Either apply a conservative recovery fraction to the no-edit case (mirroring the retry branch), or exclude low-worth candidates from the summed dollar headline entirely and present them as a review list without a claimed dollar figure. Realized-savings measurement (act report) makes honesty here cheap to keep.
Working on this. Approach: stop claiming 100% of a zero-edit session as recoverable; apply a bounded recovery fraction to the no-edit branch (mirroring the retry branch's approach), update the doc comment that framed full-session as intentional, and adjust the two tests that pin the old ceiling.
Activity
avs-io commentedon Jul 16, 2026
Working on this. Approach: stop claiming 100% of a zero-edit session as recoverable; apply a bounded recovery fraction to the no-edit branch (mirroring the retry branch's approach), update the doc comment that framed full-session as intentional, and adjust the two tests that pin the old ceiling.
optimize: bound zero-edit low-worth savings estimate to a recovery fr…