Berildocs GitHub

Memory cards

An agent loop is a budget bug

confidence: mediumupdated: 2026-11-24status: activeaicostagent

Claim#

Retries, reflection and tool loops consume tokens without a cap. A single task can cost more than the result.

Test#

Set a token and turn budget. Log each job with tokens and cost. Stop on a plateau.

Proof#

A job ledger entry with a cost under the budget.

Failure modes#

A cheap model still loops. A budget without a stop condition is a warning only.