task-budgets changedbuild-with-claude/task-budgets
Nearest release: v2.1.259, published 3 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+2added
Lines−0removed
From line
439
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits25to this page, all time
The whole hunk
from line 439, old and new numbered
/
from line 439
439439 ```
440440</CodeGroup>
441441
442In this example, the tokens spent before compaction are the usage of all the messages you have removed from the history so far, measured as in [Measure your current usage](https://platform.claude.com/docs/en/build-with-claude/task-budgets#measure-your-current-usage). Leave out anything still present in the messages you send, including any summary you added, because the server counts those tokens itself. Update this figure only when you replace the history this way; don't decrement it per request. Pass the resulting `remaining` on every request, not only the one that compacts.
443
442444For loops that resend the full uncompacted history on every turn, omit `remaining` and let the server track the countdown.
443445
444446## Changing the budget mid-conversation
No line in this hunk matches that.