← Table of Contents · Page 261 of 868

BUDGETS AND RESOURCE LIMITS

Part 4 of 9

WHAT HAPPENS WHEN A BUDGET IS EXHAUSTED Running out of budget should never mean a crash in the middle of a sentence. Graceful termination means stopping in a planned, tidy way. A good harness follows these steps. First, it lets the current tool call finish, or cancels it safely, so no half-written file or half-sent message is left behind. Second, it stops starting new steps. Third, it asks the model, using a small reserved allowance, to write a short report of what was finished and what remains. Fourth, it saves the state so that a person or a later run can resume the work. The reserved allowance matters. If you spend every last token on work, nothing is left to write the report, so careful designers hold back a small reserve for the shutdown. Chapter 26 explains how to build the final report itself.
Advertisement
Read Aloud:
0:00 / 0:00