Return
Category: Integrations
Overview
The Return node ends the current branch and resumes execution at the most recent return target pushed onto the session’s call stack. The stack is shared with the Sub-flow Call machinery, so a Return inside a sub-flow resumes the parent at the Sub-flow Call’s on_return port.
Return has no configuration of its own — it pops whatever was pushed most recently.
When to use
- End a successful path inside a sub-flow recipe and resume the parent.
- Bookend a small helper section that was reached via a pushed return target.
Ports
| Port | Direction | Description |
|---|---|---|
in | input | Receives the flow from the previous node. Terminal — there is no configurable output port. |
return | output | Implicit. The runtime advances to whichever node was pushed most recently onto the session’s return stack. |
Configuration
Return has no configuration fields. The drawer renders a single explanatory line: “Return has no configuration. It pops the session call stack set by the nearest enclosing Jump or Sub-flow Call.”
Limits & validation
- If the return stack is empty when Return fires, the runtime escalates with
return_empty_stack— the session ends and routes to the tenant-wide error workflow. Return is not a no-op; it is not equivalent to Close when used outside a sub-flow context. - If the stack target no longer exists in the graph (e.g. the recipe was edited mid-flight), the runtime escalates with
return_invalid_target.
Troubleshooting
Return immediately escalates.
The session has no pending return target. Either the recipe placed a Return without a preceding Sub-flow Call / Jump, or the session was migrated between recipe versions and the stack target was renamed. Confirm the structure in the Simulator.
See also
Sub-flow Call, Sub-flow Entry, and Sub-flow Exit for the matching sub-flow boundaries.