A water-utility dispute agent incorrectly ends its agentic loop as soon as assistant text appears, even when a pending tool_use block is present. What is the problem with that approach?
Select an answer to reveal the explanation.
Short Explanation
Seeing some assistant chatter and slamming the brakes is like hanging up on a resident mid-sentence while the meter lookup is still queued. Trust the structured stop_reason, not the prose, or you will skip the tools that finish the dispute.
Full Explanation
A water-utility dispute agent that stops the agentic loop as soon as assistant text appears—even when a pending tool_use block is present—uses the wrong termination signal. Natural-language assistant content can accompany or precede structured tool requests; it is not a reliable indicator that MCP work is finished. The loop must honor stop_reason and outstanding tool_use blocks so meter lookups, billing adjustments, or case updates still run before the dispute is closed with the resident.
Parsing prose as the stop condition fails because models often narrate intent while simultaneously emitting tool_use. Ending on that narration strands the pending call, leaves the dispute unresolved, and may send the resident a premature closure message with no utility data behind it. Structured stop_reason remains the authoritative lifecycle signal for civic agent runtimes.
Claiming assistant text should always terminate civic agents before tools run reverses the agentic contract: tools exist to gather facts before the final answer. Treating pending tool_use as optional once any prose appears is the same conceptual error—structured blocks are mandatory work items, not decorations. Waiting for a human whenever assistant text appears over-escalates routine narration and does not fix the missing stop_reason check.
Exam caveat: some responses contain both text and tool_use; termination logic must inspect blocks and stop_reason, not substring heuristics. Operational check: inject a response that includes explanatory text plus a tool_use for meter history and assert the loop executes the tool before any resident-facing closure.