From 04a47dc0cedf019240238fb3c5a72aa38fff0149 Mon Sep 17 00:00:00 2001 From: Git Admin Date: Sun, 30 Nov 2025 08:44:10 +0000 Subject: [PATCH] Fix staticData error in workflow - Remove dependency on $workflow.staticData which can be undefined - Pass retry_count through workflow data instead - Initialize retry_count in first node - Retry Counter now reads from input data --- openhands-workflow-with-verification.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openhands-workflow-with-verification.json b/openhands-workflow-with-verification.json index 4fbde09..a704ef4 100644 --- a/openhands-workflow-with-verification.json +++ b/openhands-workflow-with-verification.json @@ -11,7 +11,7 @@ }, { "parameters": { - "jsCode": "// Initialize workflow static data\nif (!$workflow.staticData.retries) {\n $workflow.staticData.retries = 0;\n}\n\nreturn {\n initialized: true,\n timestamp: new Date().toISOString()\n};" + "jsCode": "// Initialize retry counter in workflow data\nreturn {\n retry_count: 0,\n max_retries: 15,\n initialized: true,\n timestamp: new Date().toISOString()\n};" }, "id": "init-workflow", "name": "Initialize Workflow", @@ -155,7 +155,7 @@ }, { "parameters": { - "jsCode": "// Retry counter with max retries\nconst retries = $workflow.staticData.retries || 0;\nconst maxRetries = 15; // 15 * 15s = ~4 minutes\n\nif (retries >= maxRetries) {\n throw new Error('Timeout: Agent did not start within 4 minutes');\n}\n\n$workflow.staticData.retries = retries + 1;\n\nconst convId = $('1. Create Conversation').item.json.conversation_id;\n\nreturn {\n conversation_id: convId,\n retry_count: retries + 1\n};" + "jsCode": "// Get retry count from input or default to 0\nconst currentRetries = $input.item.json.retry_count || 0;\nconst maxRetries = 15; // 15 * 15s = ~4 minutes\n\nif (currentRetries >= maxRetries) {\n throw new Error('Timeout: Agent did not start within 4 minutes');\n}\n\nconst convId = $('1. Create Conversation').item.json.conversation_id;\n\nreturn {\n conversation_id: convId,\n retry_count: currentRetries + 1\n};" }, "id": "retry-counter", "name": "Retry Counter",