Does LangGraph stop the run when a tool raises an error?
By default, yes, for a tool that raises while it executes: LangGraph’s prebuilt ToolNode re-raises the exception, so the run stops there. It handles two errors by default, invalid arguments from the model and a call to a tool name that isn’t registered. Each comes back as an error message the model can read and retry, such as “X is not a valid tool, try one of […]”.
The docstring puts the split this way: the default handler “Catches tool invocation errors” and “Ignores tool execution errors (they will be re-raised)”. Setting handle_tool_errors to True, a string, an exception type, or a function changes that, and each of them turns a caught exception into a ToolMessage with status error. False turns off handling of exceptions a tool raises. An unknown tool name is still returned as a message.
The two outcomes fail differently. A stopped run is loud. A caught error is quiet: the model sees the message and may retry or carry on, and the trace shows a finished run. If you turn handling on, check what the agent does next, as a failed tool call can end in a retry or a different approach.
published