A parks permit agent team proposes checking whether assistant text contains the word "done" to decide when the agentic loop is complete. What should the architect conclude?
Select an answer to reveal the explanation.
Short Explanation
Hunting for the word done in Claude's chatter is like ending a parade because someone yelled finished from the crowd. Use end_turn—the official finish line—not keyword bingo.
Full Explanation
A parks permit team that proposes scanning assistant text for the word done as the agentic-loop completion signal should have that design rejected. Completion must be driven by stop_reason end_turn and the absence of pending tool_use, not by English keyword matching. Models can say done while still emitting tools, omit done when finished, or use synonyms; keyword bingo is neither stable nor aligned with the API contract for municipal permit issuance.
Rejecting text-content checks works because stop_reason is explicit, versioned behavior that runtimes can branch on deterministically—critical where premature exit can skip fee calculation or plot-validation MCP calls. Parks staff-facing language belongs in the final resident message, not in the control plane.
Preferring done because parks staff speak plainly confuses user-facing language with control-plane signals. Claiming any English completion synonym is an approved Anthropic stop_reason is incorrect; stop_reason values are structured enumerations, not vernacular. Running text-content checks only after discarding tool_use blocks is still wrong: discarding tool_use is itself a failure, and keyword scans remain unreliable afterward.
Exam caveat: user-visible your-permit-is-ready copy belongs in the final answer after end_turn—not as the loop's exit predicate. Operational check: feed fixtures where assistant text says done with tool_use present, and where end_turn occurs with no done token; the loop must continue in the first case and stop in the second.