[PR #6008] feat(prebuilt): update tool error handling in tool node #4779

Closed
opened 2026-02-20 17:50:44 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/6008

State: closed
Merged: Yes


Change how we handle tool errors by default in tool node.

  1. If a tool invocation failed due to arg validation, we return an artificial ToolMessage back to the model w/ a request for arg correction (the same, but we've improved the message)
  2. If a tool execution failed for an unknown reason, we raise (different, we used to automatically return to model)
**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/6008 **State:** closed **Merged:** Yes --- Change how we handle tool errors by default in tool node. 1. If a tool invocation failed due to arg validation, we return an artificial `ToolMessage` back to the model w/ a request for arg correction (the same, but we've improved the message) 2. If a tool execution failed for an unknown reason, we raise (different, we used to automatically return to model)
yindo added the pull-request label 2026-02-20 17:50:44 -05:00
yindo closed this issue 2026-02-20 17:50:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4779