[Feature Request]: Better way to handle exception on workflows #1

Open
opened 2026-02-16 02:16:02 -05:00 by yindo · 2 comments
Owner

Originally created by @dmvieira on GitHub (Jun 3, 2025).

Feature Description

Implement an exception handler that includes all step context, allowing for user customization.

Reason

Using workflows we can use retry_policy, but when max retries on a step exceed I can't handle this exceptions and send to another step, for example.

My workaround for now is using another workflow to handle exceptions in a nested workflow, but this workflow exists just for that. Another drawback is that when retry happens, I lost data in the context during that try that raises exception.

The current retry_policy lacks a direct mechanism to handle max-retry exceptions inline. I'm looking for a solution that avoids an extra nested workflow and preserves context data when rerouting after a failed retry.

Value of Feature

exception handler for workflows

Originally created by @dmvieira on GitHub (Jun 3, 2025). ### Feature Description Implement an exception handler that includes all step context, allowing for user customization. ### Reason Using workflows we can use retry_policy, but when max retries on a step exceed I can't handle this exceptions and send to another step, for example. My workaround for now is using another workflow to handle exceptions in a nested workflow, but this workflow exists just for that. Another drawback is that when retry happens, I lost data in the context during that try that raises exception. The current retry_policy lacks a direct mechanism to handle max-retry exceptions inline. I'm looking for a solution that avoids an extra nested workflow and preserves context data when rerouting after a failed retry. ### Value of Feature exception handler for workflows
yindo added the enhancement label 2026-02-16 02:16:02 -05:00
Author
Owner

@masci commented on GitHub (Jul 30, 2025):

@dmvieira do you have an example in pseudo-code of how you would like to see this feature implemented?

@masci commented on GitHub (Jul 30, 2025): @dmvieira do you have an example in pseudo-code of how you would like to see this feature implemented?
Author
Owner

@dmvieira commented on GitHub (Jul 30, 2025):

Hi, I'm on vacation right now, but @jairNeto can help

@dmvieira commented on GitHub (Jul 30, 2025): Hi, I'm on vacation right now, but @jairNeto can help
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#1