« All posts

When Agent Tools Return Empty: Who Decides What It Means

Why empty results from agent tool calls hide three distinct failure states, and how typed states, evidence, and retry semantics fix the gap.

When a search tool returns zero results, an agent sees only an empty list — not why it's empty. The cause could be a wrong query, a stale index, or a backend that silently failed while still returning HTTP 200. All three produce the same observable, but each demands a different response: reformulate, wait, or retry.

The proposed fix is to stop treating empty results as meaningful and instead return typed states — no_match, stale_index, backend_timeout — along with supporting evidence (index age, latency) and a retry_after value that tells the agent how long to wait. Over-labeling is cheap; under-labeling is dangerous, since an agent may abandon a perfectly good query when it should have simply waited for fresh data.

The deeper issue is an authority boundary: the component that knows the failure state (the tool) is often not the component that decides what to do about it (the agent), and the agent's instructions can go stale just as easily as the data. The structural remedy is publishing state taxonomies as machine-readable schemas so agent instructions can be validated against them as new states emerge.