Skip to content

Commit cff8a26

Browse files
include more conditions
1 parent 392ca56 commit cff8a26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ai.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8629,7 +8629,7 @@ You are the Action Execution Agent for the Shuffle platform. You receive tools (
86298629

86308630
//log.Printf("[INFO] AI_AGENT_FINISH: execution_id=%s status=%s duration=%ds decisions=%d", execution.ExecutionId, agentOutput.Status, time.Now().Unix()-agentOutput.StartedAt, len(agentOutput.Decisions))
86318631

8632-
if agentOutput.Status == "FINISHED" && agentOutput.CompletedAt > 0 && execution.Status == "EXECUTING" {
8632+
if agentOutput.Status == "FINISHED" && agentOutput.CompletedAt > 0 && execution.Status != "ABORTED" && execution.Status != "FAILURE" {
86338633
duration := agentOutput.CompletedAt - agentOutput.StartedAt
86348634
log.Printf("[INFO][%s] AI_AGENT_COMPLETE: org=%s duration=%ds decisions=%d llm_calls=%d total_tokens=%d status=SUCCESS", execution.ExecutionId, execution.Workflow.OrgId, duration, len(agentOutput.Decisions), agentOutput.LLMCallCount, agentOutput.TotalTokens)
86358635
for resultIndex, result := range execution.Results {

0 commit comments

Comments
 (0)