-
Notifications
You must be signed in to change notification settings - Fork 479
Description
Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request
High
Please provide a clear description of problem this feature solves
When an exception occurs in a tool within a sequential executor chain:
-
Uncaught exceptions cause UI to hang for streaming endpoints, showing infinite progress bar in UI; for non-streaming endpoints, no response is displayed aside from an "Internal Server Error" toast message
-
Caught exceptions must flow through the entire chain — If a tool catches an exception and returns an error response, that error becomes input to subsequent tools. There's no mechanism to exit early, so the error message passes through all remaining tools before reaching the UI. Normally if a tool fails, we don't want to proceed to the next tool in the chain.
Describe your ideal solution
A new property such as return_error_on_exception, e.g.
workflow:
_type: sequential_executor
tool_list: [text_processor, data_analyzer, report_generator]
raise_type_incompatibility: true
return_error_on_exception: true
To enable early exit mechanism and prevent hanging/no response issues, the tool developer can raise an exception and let it propagate to the sequential executor which will then return it as a message instead of re-raising the exception.
Alternatively, a special exception could be provided that will allow tool developers to explicitly specify an early chain termination.
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- I have searched the open feature requests and have found no duplicates for this feature request