execute_task_webhook uses the latest non canceled step (#4007)

This commit is contained in:
Shuchang Zheng
2025-11-16 15:01:40 -08:00
committed by GitHub
parent 3879807fc6
commit 25e375f78f
4 changed files with 7 additions and 9 deletions

View File

@@ -532,6 +532,7 @@ class AgentDB:
select(StepModel)
.filter_by(task_id=task_id)
.filter_by(organization_id=organization_id)
.filter(StepModel.status != StepStatus.canceled)
.order_by(StepModel.order.desc())
.order_by(StepModel.retry_index.desc())
)