New Tool Radar

AI Agents & Automation

How to Fix an Agent That Returns an Empty Reply After a Tool Call

Work through the tool result, the instructions and the output format to find why an agent returns nothing after a tool call.

Schematic diagram with three steps: Check the tool result, Check the instructions, then Test a plain reply.

An empty reply after a tool call usually means the model did not know what to do with the result: the tool returned nothing, or returned a shape the instructions did not cover, so the model stopped instead of answering. The log shows which of those it is.

Before you start

You need a run that returned an empty reply, with its log or trace open. Note the question, the tool called and what the tool returned.

Check what the tool returned

Open the log and read the tool result. If it is empty, the tool is the problem: fix the tool or its input. If the result is there but in a long or odd shape, the model may have run out of room or failed to parse it, so the result needs trimming before it reaches the model.

Add an instruction for the empty case

Add one line to the system message: if the tool returns nothing, say so in one sentence and stop. Then test with the same question and check the reply is a short sentence instead of nothing. If the reply is still empty, check the output format: a strict output type with a missing field can also produce an empty reply.

Worked example: An empty reply for a fictional support agent

Northwind Support is a fictional help desk. Its agent returned an empty reply after an order lookup. The table shows the diagnosis.

Check Found Fix
Tool result Empty, order 9999 not found Tool now returns a not-found message
Instructions No rule for an empty result Added: say the order was not found
Retest Reply: order 9999 was not found Pass

Expected result (UNTESTED): after the fix, the same question returns the sentence that order 9999 was not found. We checked the n8n tutorial, which describes the model turn, tool call and result cycle, but we did not run the failing workflow on a live n8n instance.

Limits

An empty reply can also come from a model error or a cut-off response, which this guide does not cover. If the tool result is fine and the instructions cover the empty case, check the model provider status and the run log for an error.

Sources

See all