Subflow restart causes new execution and keeps running
Author: sjoerdsminkCreated Dec 12, 2025Updated Sep 17, 2026
Labelsarea/backend
Describe the issue
There seems to be issues when restarting a subflow. For reproduction purposes I have two flows; one correct and one incorrect.
id: test_subflow_correct
namespace: test
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Correct log"id: test_subflow_incorrect
namespace: test
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "{{incorrect.reference}}"Now we have a main flow that first references the incorrect flow:
id: test_mainflow
namespace: test
tasks:
- id: log1
type: io.kestra.plugin.core.log.Log
message: "Started mainflow"
- id: startSubflow
type: io.kestra.plugin.core.flow.Subflow
namespace: test
flowId: test_subflow_incorrect
- id: log2
type: io.kestra.plugin.core.log.Log
message: "Finished mainflow"- Execute the
test_mainflow. It will fail. - Edit the flow, and change
flowId: test_subflow_incorrecttoflowId: test_subflow_correct. Save it. - Go back to the execution. Note the execution ID. Press
Restart->Restart latest revision - Notice the
startSubflowis failed, but keeps running. See the screenshot. This seems to be a bug.
- Go to the Overview tab. Notice the state is Running. Also notice the new execution ID (and the original execution ID in the bottom).
So it seems there are three bugs here:
- According to the docs, Restarts keep the same execution ID. Which is not the case here.
- The state stays in Running (instead of Success)
- The
startSubflowis Failed (instead of Success)
Environment
- Kestra Version: 1.1.9
Source: kestra-io/kestra