You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(response-stream): Workflow Tool fails when both workflows reuse a Loop ID #452
Graphon 0.9.0 fails when a workflow called as a tool contains a Loop whose node ID matches a Loop in the caller.
The IDs are unique within each workflow.
To reproduce in Dify:
Create workflow B with Start → Loop → End, and Loop Start → Loop End inside the loop. Publish it as a Workflow Tool.
Create chatflow A with Start → Loop → Answer. Inside its loop, connect Loop Start → Workflow Tool B → Answer.
Set both loops to run once. In the exported DSLs, give both Loop nodes the ID outer-loop, update their internal references consistently, import them, and run A.
Repeat with only B's Loop ID changed to source-loop and its references updated.
Loop IDs across A and B
Previous Graphon (4fa2214)
Graphon 0.9.0
Different
Succeeds
Succeeds
Same
Succeeds
Fails
The failing run raises KeyError in _ReplyOrder._get_or_create_container() when it looks up the called workflow's parent frame. ResponseStreamFilter accepts the foreign loop by its matching node ID, although that parent is absent from its reply records.
Expected: reusing a node ID across separate workflows should not affect execution.
changed the title [-]bug(response-stream): Workflow Tool fails when its Loop ID matches the caller[/-][+]bug(response-stream): Workflow Tool fails when both workflows reuse a Loop ID[/+]on Dec 1, 2026
I’d put the guard in ResponseStreamFilter._start_frame_session(), before it calls reply ordering. It currently checks the Loop ID against the caller’s response containers, then registers the frame beforebuild_child_graph() can reject it. I’d check that the parent frame is tracked and that the container belongs to that parent’s graph. Moving build_child_graph() earlier wouldn’t be enough on its own: it matches body nodes by local ID too, so those can collide across workflows as well. [1][2][3]
test_response_reply_ordering.py already feeds FrameStartedEvent directly to the filter. A regression test there could reuse both the Loop ID and its body IDs under an untracked Workflow Tool frame, then assert that the caller’s Answer still streams exactly once and in order. [4]
Activity
[-]bug(response-stream): Workflow Tool fails when its Loop ID matches the caller[/-][+]bug(response-stream): Workflow Tool fails when both workflows reuse a Loop ID[/+]dosubot commentedon Dec 1, 2026
I’d put the guard in
ResponseStreamFilter._start_frame_session(), before it calls reply ordering. It currently checks the Loop ID against the caller’s response containers, then registers the frame beforebuild_child_graph()can reject it. I’d check that the parent frame is tracked and that the container belongs to that parent’s graph. Movingbuild_child_graph()earlier wouldn’t be enough on its own: it matches body nodes by local ID too, so those can collide across workflows as well. [1] [2] [3]test_response_reply_ordering.pyalready feedsFrameStartedEventdirectly to the filter. A regression test there could reuse both the Loop ID and its body IDs under an untracked Workflow Tool frame, then assert that the caller’s Answer still streams exactly once and in order. [4]To reply, just mention @dosu.
Docs are dead. Just use Dosu.