Every agent goal needs an exit condition: done-definition plus a budget

gethackteam · x · 2026-09-16

Every agent goal needs an exit condition, or "keep trying until it works" becomes an expensive loop.

Before starting a task, an agent must know three things: what "done" looks like, how to verify it actually got there, and how much it's allowed to spend trying.

Some tasks are impossible due to a missing credential, broken dependency, unavailable API, or a bad assumption in the plan — you don't want the agent retrying the same thing 40 ways or reverse-engineering around an unsolvable ask.

The core loop he recommends: Goal → Attempt → Verify. Succeed when verification passes, retry within budget, and stop to report the blocker when budget runs out. The more autonomous agents become, the more this matters: a definition of done tells the agent when to succeed, a budget tells it when to give up.

Related event: Set Exit Conditions and Budgets for Agents to Avoid Costly Retry Loops(2 posts)→

Original post →

More from coding & agent

coding & agent channel →