Define Exit Conditions Before Writing Prompts
caughtonbcam · reddit · 2026-07-12
Many agent projects stall not because of poorly tuned prompts, but because the system fails to clearly define what "done" means from the start.
The author suggests defining exit / end conditions first:
- What constitutes a valid completion?
- What evidence must the agent produce before finishing?
- How is missing evidence handled?
- What happens if a task is only partially completed?
They also provide a simple framework:
- Success state: The required conditions before a run can conclude.
- Uncertain state: How to proceed when there is enough information to move forward, but not enough to confirm success.
- Failure state: Protocols for when a task cannot be completed safely or reliably.
Especially when tool calls are involved, it is crucial to recognize that "getting data" does not equal "making progress." Clearly defining shutdown conditions makes subsequent prompt engineering, tool design, and evaluation much easier.
More from coding & agent
- AI agents are starting to strain code hosting platforms — craigsdennis · 2026-07-21
- Async OPD distillation doubles throughput while matching synchronous math accuracy — _lewtun · 2026-07-21
- Omnigent 0.6.0 adds Claude Code imports, Slack approvals and desktop apps — matei_zaharia · 2026-07-21
- Google appears to have quietly shipped Gemini 3.6 Flash, with lower pricing and better agentic scores — xiaohu · 2026-07-21
- Open-source CLI audits AI tools, MCP configs, and agent skills on local machines — Initial-Copy332 · 2026-07-21
- Coding agents feel less stressful when the 5-hour limits are temporarily removed — iamrobotbear · 2026-07-21