All nodes/Logic & Flow/Synchronization
Wait all
Waits for active incoming branches to finish and continues the flow. Counts only actually executed edges (skipped switch branches do not block). Aggregates data according to merge_mode (first / last / merge). stream_through forwards streaming branches' tokens straight to the exit without waiting for the barrier (the value is still aggregated per merge_mode).
Type in the graph: wait_all
Exec
An error branch can be enabled (expose_error_output) to handle failures on their own path.
Ports can be split into separate execution and data handles.
Try it
Minimal working workflow
- Execute + Data
Runs as pasted
When to use it
A barrier. Reach for it when several branches run in parallel and the next step may only start once all of them have finished — two independent model calls whose answers you need together, for example.
The second reason is the validator. When two branches that can fire in the same run arrive at one input, the graph fails validation: the value that arrives first is silently overwritten by the one that arrives later. The barrier resolves that race.
You do not need a barrier for mutually exclusive branches (the two arms of one if, or a
node’s on_success and on_error): exactly one of them fires, and the node below runs on its
own with that branch’s value. If the branches produce dialogue turns, look at
messages; if they produce ranked chunk lists, look at
rrf_fusion — those are barriers too, with their own way of
assembling the result.
How it works
Every incoming edge connects to the single “Run inputs” port — you do not add a port per
branch. The node fires once none of the connected branches is still running. A skipped branch
(the untaken arm of an if or switch) counts as resolved and does not hold the barrier. So
does a failed one: the barrier will not wait for it forever, it continues with the values that
did arrive, and the failure shows up in the run status.
What ends up on the output is decided by “Merge Mode”: first — the value of the branch that
finished first, last — the one that finished last, merge — a list of every value that
arrived. The order in that list is the order in which branches finished, not the order in
which you drew the edges.
Common mistakes
- An edge from a node below the barrier back into the barrier. The barrier starts waiting for itself and never fires; validation rejects such a graph as an execution cycle. For repeated passes use while_loop.
- Reading
firstas “the top branch”. It is the branch that finished earliest — with parallel model calls the winner changes from run to run. If you need a specific source, usemergeand address the element by index:{{ nodes.<id>.output[0] }}. - The answer stops printing as it is generated. Tokens from a model feeding a barrier are buffered by default and reach the chat in one lump at the end. Turn on “Pass streams through” — it works when an exit follows the barrier directly.
Inputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Run inputsbarrier_in | Execute + Dataexecute_data | — | accepts many edges |
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Resultoutput | Execute + Dataexecute_data | — |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Merge Modemerge_mode | string | first | How to aggregate values from active incoming edges: 'first' — first arrived value, 'last' — last arrived value, 'merge' — list of all arrived values (in arrival order). Options: |
Pass streams throughstream_through | boolean | false | Let tokens from streaming branches reach the chat as they are generated, instead of waiting for the barrier. The barrier still aggregates the value per merge_mode. Works only when an exit follows the barrier (possibly through further stream_through barriers). Several branches streaming at once share one chat message and interleave — validation warns about that. |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.split_ports_in— Show separate execution and data input handles instead of one combined port.split_ports_out— Show separate execution and data output handles instead of one combined port.