Sometimes loops don’t loop
2 items (2 titles) → loop, should run twice
(working as expected) → creates 1 or 2 items (subtitles) → loop over subtitles sometimes works and sometimes it doesn’t
i have replicated the bug in a simple workflow i added bellow
i also attached a recording of the workflow not working as expected
Expected output:
[Node: “Outputs 2 Titles”] ‘titles created: [ title 1, title 2 ]’
[Node: “Outputs 1 or 2 Subtitles”] ‘title 1 looping over subtitles should log 1 subtitles: [ subtitle 1 ]’
[Node: “Log Subtitle”] ‘subtitle 1’
[Node: “Outputs 1 or 2 Subtitles”] ‘title 2 looping over subtitles should log 1 subtitles: [ subtitle 1 ]’
[Node: “Log Subtitle”] ‘subtitle 1’
or // depends if 1 or 2 subtitles was created
[Node: “Outputs 2 Titles”] ‘titles created: [ title 1, title 2 ]’
[Node: “Outputs 1 or 2 Subtitles”] ‘title 1 looping over subtitles should log 2 subtitles: [ subtitle 1, subtitle 2 ]’
[Node: “Log Subtitle”] ‘subtitle 1’
[Node: “Log Subtitle”] ‘subtitle 2’
[Node: “Outputs 1 or 2 Subtitles”] ‘title 2 looping over subtitles should log 1 subtitles: [ subtitle 1 ]’
[Node: “Log Subtitle”] ‘subtitle 1’
Actual Output
[Node: “Outputs 2 Titles”] ‘titles created: [ title 1, title 2 ]’
[Node: “Outputs 1 or 2 Subtitles”] ‘title 1 looping over subtitles should log 1 subtitles: [ subtitle 1 ]’
[Node: “Log Subtitle”] ‘subtitle 1’
[Node: “Outputs 1 or 2 Subtitles”] ‘title 2 looping over subtitles should log 1 subtitles: [ subtitle 1 ]’
In a nutshell The second title almost never gets its subtitles logged
#[details=“instance information”]
Debug info
core
- n8nVersion: 1.112.4
- platform: docker (cloud)
- nodeJsVersion: 22.19.0
- database: sqlite
- executionMode: regular
- concurrency: 20
- license: community
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: filesystem
pruning
- enabled: true
- maxAge: 720 hours
- maxCount: 25000 executions
client
- userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/139.0.0.0 safari/537.36
- isTouchDevice: false
Generated at: 2025-09-25T15:37:53.799Z}
[/details]
i spent hours debugging and trying to figure it out, i got nowhere, i am almost certain its a bug, (i reported it on github but the ticket got closed almost immediately and was redirected to this community, its my first post so Hello everyone
, Thank you for your help