# Goal and exit condition

A testable target paired with the finite states that determine when an agent completes, blocks, escalates, or stops.

technical-term · Harness & runtime · foundational · Reviewed 2026-08-09

## Definition

A goal specifies the bounded outcome an agent should pursue; exit conditions specify when the runtime must stop pursuing it. Together they define success, failure, maximum effort, blocked states, required evidence, human handoff, and safe termination.

Termination is a basic software principle, but agents make underspecified goals and endless retries unusually consequential.

## Why it matters

A goal without evidence criteria encourages plausible-looking completion.

An exit condition is a runtime control, not merely a sentence asking the model to stop.

## System anatomy

- **Outcome:** The intended result in observable terms.
- **Acceptance evidence:** The checks and artifacts required to claim completion.
- **Budgets:** Limits on steps, time, spend, tools, and retries.
- **Terminal states:** Complete, blocked, held, escalated, cancelled, or failed.



## Important distinctions

- **Prompt request:** A request expresses intent; a goal and exit contract defines measurable completion and safe non-completion.



## Implementation signals

- Write acceptance evidence before execution
- Define blocked and escalation states alongside success
- Enforce budgets outside the model

## Failure modes

- The agent declares done based on its own prose
- Timeout is the only stop mechanism



## Related knowledge

- [Agent loop](https://aisdlc.ai/agentic-engineering/agent-loop) — The finite runtime cycle in which an agent interprets state, selects an action, observes the result, updates state, and decides what happens next.
- [Intent engineering](https://aisdlc.ai/agentic-engineering/intent-engineering) — The practice of turning goals into versioned specifications, constraints, interfaces, invariants, decision rights, acceptance criteria, and testable outcomes before agents implement them.
- [Eval-driven development](https://aisdlc.ai/agentic-engineering/eval-driven-development) — An engineering loop that converts expected behavior and observed failures into repeatable evaluations combining deterministic checks, environment inspection, security testing, model graders, repeated trials, and human judgment.

## Sources and further study

- [OpenAI — A practical guide to building agents](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/) — Defines a practical agent around a model, tools, instructions, and a run loop that continues until an exit condition is reached. **Use:** Primary definition. **Limitation:** The guide is first-party product guidance and a simplified starting architecture, not a complete regulated-enterprise control model.
- [Anthropic — Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) — Patterns for incremental progress and durable handoffs across context windows and extended execution. **Use:** First-party case study. **Limitation:** This first-party account documents one organization, product, or implementation context and should not be generalized without local evidence.

---

This library synthesizes cited research, standards, official documentation, and clearly attributed practitioner perspectives. Maturity describes the state of a concept—not vendor endorsement, production readiness, or permission to deploy. Benchmarks and demonstrations do not replace use-case evaluation, governed controls, independent verification, or named human release authority.
