Skip to content

[Question]: Iteration component only processes first element of array from Code node in v0.24.0 #14142

@modmodleon

Description

@modmodleon

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (Language Policy).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Describe your problem

Title: Iteration component only processes first element of array from Code node in v0.24.0

Version: 0.24.0

Description:

I have a Code node that outputs an array: ["a", "b", "c"] (type: Array<String>).

This array is passed to an Iteration node via the query variable. Inside the Iteration, the IterationItem is connected to a Knowledge Retrieval node.

The workflow runs without errors, but only the first element "a" is processed and retrieved. The elements "b" and "c" are ignored.

Steps to Reproduce:

  1. Create a Code node with the following:

    • Code: return ["a", "b", "c"]
    • Return value: tempList as Array<String>
  2. Create an Iteration node.

    • Query variable: set to {code_node.tempList}
  3. Inside the Iteration, connect IterationItem to a Knowledge Retrieval node.

    • Knowledge Retrieval query: set to {item}
  4. Run the Agent.

Expected Behavior:

The Iteration should process all three elements: "a", "b", and "c". The Knowledge Retrieval node should execute three times, once for each element.

Actual Behavior:

Only "a" is processed. The Knowledge Retrieval node executes only once, returning results only for "a".

Additional Context:

  • The Code node output is confirmed correct (logs show ["a","b","c"])
  • The Iteration node can see and select the array variable from the Code node
  • No error messages are shown
  • The issue occurs in v0.24.0

Question:

Is this a bug in v0.24.0, or is there a different configuration required to make Iteration process all elements of an array from a Code node?

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working, pull request that fix bug.🙋‍♀️ questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions