Wait in one branch, also stalls another branch

Describe the problem/error/question Wait in one branch also stall another branch

What is the error message (if any)? No error, just unexpected behaviour

Please share your workflow In this workflow I have two branches with two waits. After triggering I detect that Wait 20 sec, waits until Wait 10 sec is finished. What I want is that two branches are executed simultaneous.

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Jitse_Schaafsma, welcome!

This is the expeccted behaviour,

you can use the subworkflow and turn off the option “Wait For Sub-Workflow Completion”
like this:

Thank you, I have found that option. But now the sub-workflow which contains the wait, does not wait at all. I have created the following test flow to demonstrate it. I assume I am missing another option somewhere? Thanks for the support. {
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -512,
        96
      ],
      "id": "7ccb1ce6-6b25-4243-ae57-f52a080fcf26",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        240,
        0
      ],
      "id": "335eb30d-ba0f-4cb6-b6ea-ec39474eb828",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        240,
        224
      ],
      "id": "da5b885e-6c4e-4413-87fd-4a3a5f24ef2f",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "amount": 15
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -16,
        224
      ],
      "id": "350ac421-79d3-4f3e-8579-72cc86604967",
      "name": "Wait 15 sec",
      "webhookId": "9ad78322-d0e2-423a-b15a-c52791e06b5a"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "1H530XgPzS81kedd",
          "mode": "list",
          "cachedResultUrl": "/workflow/1H530XgPzS81kedd",
          "cachedResultName": "My Sub-workflow"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        -16,
        16
      ],
      "name": "Call My Sub-workflow",
      "id": "0212a7db-dc9f-4bb3-9f6c-d4193e9b95c6"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "c022122b-aa48-4d94-8980-a93da43ba03f",
              "name": "Veld 1",
              "value": 123,
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -288,
        96
      ],
      "id": "7b4ae4e2-bae5-4dfd-af37-5051afabe86f",
      "name": "Edit Fields2"
    }
  ],
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 15 sec": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call My Sub-workflow": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Call My Sub-workflow",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait 15 sec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "a256caaf927d8b6fecd66012f15459060ec2fca55c23cb3757c0092517d4e8b9"
  }
}

In the main workflow, you won’t see any waiting because “Wait for Sub-Workflow Completion” is turned off,

However, if you check the sub-workflow executions, you’ll see that it behaves as expected: it runs and waits correctly:

Sorry to bother you, but apparently there is still some fundamental aspect which I don’t understand. The AI Agent is still waiting for my Wait for 60 sec to be finished. And I had hoped that while the waiting is going on in the other branche, the AI Agent would start/keep running. Any additional suggestions? Thanks a lot. {
  "nodes": [
    {
      "parameters": {
        "options": {
          "systemMessage": "Act like a business analyst, make use of the google sheet : MarketIntelligence and present your answer as concise as possible. If possible, also present the number of tokens used. Thanks."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        800,
        1744
      ],
      "id": "e79ca8c8-b6f7-4f37-a596-f66100194b27",
      "name": "AI Agent",
      "onError": "continueErrorOutput",
      "notes": "Timeout in processing"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-5",
          "mode": "list",
          "cachedResultName": "gpt-5"
        },
        "builtInTools": {},
        "options": {
          "timeout": 600000
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        736,
        1968
      ],
      "id": "34ccbe9b-5d4b-4edf-a34f-3e94b5204065",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "U16ZdfkT0Wm1cRyo",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1dcI_axlcmFhcBbyfiBwSiXNkCeq-ZMoukwDgfciRmsI",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        992,
        1968
      ],
      "id": "6eecaf0a-d74d-4ee6-b238-f841201219ee",
      "name": "Get row(s) in sheet in Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "i5ZDOao1fR8d2f3v",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.Id }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        864,
        1968
      ],
      "id": "92b603f1-407e-4d84-9109-c8c30bd13c8f",
      "name": "Simple Memory"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        144,
        1744
      ],
      "id": "6f00ed03-ae52-4fc1-b50a-b86eb115aed5",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "5af73d1b-3c77-4280-aacd-88e36b15aaa5",
              "name": "chatInput",
              "value": "=What is the number of rows",
              "type": "string"
            },
            {
              "id": "1f83e778-8312-4b62-99f1-77a133bfa8fd",
              "name": "Id",
              "value": "5783542605",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        336,
        1744
      ],
      "id": "bb56cc49-5443-486b-a16c-e92c1db76831",
      "name": "Edit Fields2"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "5af73d1b-3c77-4280-aacd-88e36b15aaa5",
              "name": "chatInput",
              "value": "={{ $json.chatInput }}",
              "type": "string"
            },
            {
              "id": "97c528d5-7738-416f-8721-84f535cc16d8",
              "name": "Id",
              "value": "={{ $json.Id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        512,
        1744
      ],
      "id": "7f48b813-f8ea-47c3-8188-35ba01cd7fef",
      "name": "Pre-process"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "fvWmoEj9Lv2UnQTz",
          "mode": "list",
          "cachedResultUrl": "/workflow/fvWmoEj9Lv2UnQTz",
          "cachedResultName": "My Sub-workflow"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": true
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        800,
        1568
      ],
      "name": "Wait for 60 sec",
      "id": "9b3edcaf-1355-4667-bdcb-4f420dfa61c0"
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        []
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet in Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Pre-process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pre-process": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait for 60 sec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for 60 sec": {
      "main": [
        []
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "a256caaf927d8b6fecd66012f15459060ec2fca55c23cb3757c0092517d4e8b9"
  }
}

Well, now I see. The wait is indeed waiting, but parameters are directly fed through the wait process, as a result, the following process is being started. Still some option I heed to understand

This is not a bug and not a misconfiguration — it’s a misunderstanding of n8n’s execution model.

In n8n, when a workflow fans out into multiple branches, those branches start executing in parallel. However, workflow completion is blocking: the workflow is only considered finished after all branches have completed (implicit join).

A Wait node only blocks its own branch, but because the workflow must wait for every branch to finish, it can look like other branches (such as your AI Agent) are “waiting”, even though they have already started or completed their work.

So in your case:

  • Branches do start in parallel

  • The Wait 60 sec does not prevent other branches from starting

  • The workflow execution remains active until the longest-running branch finishes

There isn’t an option missing here — this is expected behavior based on how n8n handles parallel execution and workflow completion.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.