--- title: "Recursion in Nested Subflows" slug: "recursion-in-nested-subflows" updated: 2025-09-26T18:09:45Z published: 2025-09-26T18:09:45Z canonical: "help.hyperscience.ai/recursion-in-nested-subflows" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.hyperscience.ai/llms.txt > Use this file to discover all available pages before exploring further. # Recursion in Nested Subflows When customizing flows, you can connect one subflow to another in a “nested” manner. However, the more subflows are nested, the greater the potential for recursion-related errors. In v41.2 and later, we’ve limited the number of subflows that can be nested in a single flow to 100. If you are using an on-premise deployment of Hyperscience v42 or later, you can adjust this maximum by adding the `HYPERFLOW_ENGINE_MAX_SUBFLOWS_DEPTH_LIMIT` variable to your “.env” file: ```bash HYPERFLOW_ENGINE_MAX_SUBFLPOWS_DEPTH_LIMIT= ``` We recommend increasing the value of this variable (e.g., `HYPERFLOW_ENGINE_MAX_SUBFLOWS_DEPTH_LIMIT=120`) only if your use case requires more than 100 nested subflows to be nested in a single flow. If you are using a SaaS deployment of Hyperscience v41.2 or later and need to increase this limit, contact your Hyperscience representative.