Skip to content

Automate browser based workflows with AI

stop retrying steps when decisive action failed (#1224)

LawyZheng26d96c295a34
diff --git a/skyvern/forge/agent.py b/skyvern/forge/agent.py
index e31194e96..c6dae5c9b 100644
--- a/skyvern/forge/agent.py
+++ b/skyvern/forge/agent.py
@@ -796,6 +796,17 @@ class ForgeAgent:
action=action,
action_result=results,
)
+ elif results and isinstance(action, DecisiveAction):
+ LOG.warning(
+ "DecisiveAction failed, but not stopping execution and not retrying the step",
+ task_id=task.task_id,
+ step_id=step.step_id,
+ step_order=step.order,
+ step_retry=step.retry_index,
+ action_idx=action_idx,
+ action=action,
+ action_result=results,
+ )
elif results and not results[-1].success and not results[-1].stop_execution_on_failure:
LOG.warning(
"Action failed, but not stopping execution",