Skip to main content

Module budget

Module budget 

Source
Expand description

Hard ceiling on the serialized size of one envelope (--max-output-bytes).

Agents pay for every byte they read back. The ceiling is enforced by dropping trailing elements of the result array until the compact serialization fits, never by cutting the JSON text — a byte-sliced envelope would not parse.

When even the envelope without any element exceeds the ceiling, the payload is replaced by a small, always-parseable stub that says so.

Structs§

BudgetOutcome
What the ceiling did to an envelope.

Functions§

enforce
Shrinks value until its compact form is at most max bytes.