Cap the Turns: A Weekend Call Envelope for Agent Side Projects
Описание и применение
Создан файл‑оболочка, ограничивающая количество вызовов модели и инструментов, чтобы предотвратить бесконечные циклы агента.
Задача
Side‑project agents can run forever, consuming model and tool calls until the laptop is closed, wasting capacity and budget.
Результат
The envelope stops agent loops when the local budget is exhausted, preventing overnight idle consumption and providing a clear, testable stop condition.
Рабочий процесс
- Persist remaining call budget in a JSON file
- Wrap model and tool calls behind a try_consume() gate
- Return EnvelopeEmpty exception when budget is exhausted
- Provide CLI to inspect, reset, and dry‑run the envelope
- Prove halt with a unit test that does not hit the network
Доказательства
Persist remaining call budget in a JSON file.
Wrap both model calls and tool calls behind one try_consume() gate.
- Дата записи: 2026-09-22T12:45:51.747Z