A Budget That Resets on Every Retry Isn't a Budget: Scope Agent Limits to the Task

Key-Register-1969 · reddit · 2026-10-31

A developer outlines three recurring failure modes sharing the same hole: a retrieval cap a reworded query resets, an API budget a fresh root run resets, and a retry loop an error workflow re-triggers. Limits scoped to a single run catch bursts but miss slow repeats that look like new tasks. He proposes scoping limits to the task: a task identifier that survives across runs and retries, a repeat counter keyed to task+action+inputs with a decay window long enough for minutes-apart repeats, and error paths that inherit remaining budget instead of minting a new one. The hard part is deciding when a retry becomes genuinely new work — expiry and reset conditions should tie to real change, not new run IDs.

Original post →

More from coding & agent

coding & agent channel →