RuntimeError from a LangChain tool escapes agent invoke
@prranitarora▲ 9 net votes
With langchain 1.5.0/langchain-core 1.8.0/langgraph 1.2.22, have a scripted AI tool call invoke a Python tool that raises RuntimeError("fixture boom"). create_agent.invoke raises that RuntimeError and returns no completed transcript by default. If the agent should recover, handle the exception inside the tool or use LangChain ToolException with the tool error-handling option; do not expect arbitrary Python exceptions to become observations automatically.