Tool Call Output Not Recognized by Agent | Logs Included

Based on your logs showing a 3-minute gap between tool invocation and the next latency event, you’re likely hitting a timeout issue. The custom function request will timeout in your specified timeout period, or 2 minutes if not specified(1). When the request fails, it will be retried up to 2 times(1).

Key Configuration Points

Timeout Setting:
You can configure a custom timeout for your function. The default is 2 minutes (120,000 ms)(1). If your purchase order creation takes longer than this, you need to increase the timeout in your custom function configuration.

Response Requirements:
The response should have a status code between 200-299 to indicate success(1). The response can be in various formats (string, buffer, JSON object, blob), and all will be converted to string before sending to the LLM(1). The function result is capped at 15,000 characters to prevent overloading the LLM context window(1).

Speak After Execution:
One common issue is forgetting to enable “Speak After Execution” in your tool configuration. Without this setting, the agent won’t respond after the tool completes(2).

Troubleshooting Steps

  1. Check your timeout setting - If your purchase order creation takes more than 2 minutes, configure a longer timeout_ms in your custom function(1)

  2. Verify your response format - Ensure your backend returns a 200-299 status code and the response body is under 15,000 characters(1)

  3. Enable “Speak After Execution” - This setting ensures the agent continues the conversation after tool execution(2)

  4. Review your prompt - Make sure your agent prompt explicitly instructs it to continue the interaction after calling tools

For additional support with this specific issue: