The conversation has to end
Most prompt engineering writes about how to keep a conversation going. The harder question is when to end it cleanly. End-states are common in real systems: task completed, user satisfied, error reached, transfer to human, idle timeout.
Explicit end-states
- Task done — the agent confirms completion and stops looking for next tool calls.
- Handoff — escalation to human, transfer to another agent. The transcript is the brief.
- Refusal end — request refused, alternatives offered, conversation closes unless user redirects.
- Error end — unrecoverable error; structured error returned to caller.
Why this matters
An agent that doesn't know how to end keeps tool-calling, keeps asking for clarification, keeps generating preambles. The end-state vocabulary is part of the contract: the prompt names what 'done' looks like and the loop wrapper checks for it.