A tool raises a Python exception during execution. The exception is not caught and propagates out of the tool function. What happens in the agentic loop?
Answer: The loop crashes — no tool_result is returned and the model never sees the failure
An uncaught exception propagates out of the tool execution layer and crashes the loop — no tool_result is produced, the model never sees the error, and the loop terminates abnormally. The model does not automatically receive an is_error result (A) when an exception escapes uncaught; that behavior requires your code to catch the exception and construct the result. The loop does not have automatic retry logic (C) for uncaught exceptions. An empty is_error result (D) would require the exception to have been caught and converted — which is the correct pattern, not the default behavior. Always wrap tool execution in try/except and convert exceptions to structured is_error results.