#13641·kestra

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"
  1. Execute the test_mainflow. It will fail.
  2. Edit the flow, and change flowId: test_subflow_incorrect to flowId: test_subflow_correct. Save it.
  3. Go back to the execution. Note the execution ID. Press Restart -> Restart latest revision
  4. Notice the startSubflow is failed, but keeps running. See the screenshot. This seems to be a bug.
Image
  1. Go to the Overview tab. Notice the state is Running. Also notice the new execution ID (and the original execution ID in the bottom).
Image

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 startSubflow is Failed (instead of Success)

Environment

  • Kestra Version: 1.1.9