Agent terminates early when a return_direct tool call fails, preventing model retry
In LangChain agents, when a tool decorated with return_direct=True raises an exception, ToolNode produces a ToolMessage with status='error'. However, the routing logic in _make_tools_to_model_edge exits the agent loop based solely on return_direct flags, ignoring the error status. This causes the agent to return the error ToolMessage as the final output instead of routing back to the model for retry or graceful handling.
