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
Workflow parent retry loses a deferred route when the node also writes deltas #7930
A workflow node that sets ctx.route and pending state/artifact deltas without yielding another event loses its route from the final persisted event. The returned Context still holds the route, so the initial execution selects the correct branch. A parent retry reconstructing the nested workflow from events cannot recover the route, and the selected branch silently ends instead of retrying its failed node.
The final event has output routed and state delta {'visited': True}, but event.actions.route is None. Artifact-only deltas and combined state/artifact deltas show the same problem. A route without deltas survives.
Root cause
NodeRunner._flush_output_and_deltas constructs Event(route=...), then replaces the entire event.actions object with an EventActions containing only the deltas. The newly assigned actions discard the route. Reusing _flush_deltas, which merges into the existing actions, preserves it.
End-to-end impact
A real Runner executes an outer driver node with a two-attempt retry policy, invoking a nested workflow router -> {'go_b': flaky_b, 'go_c': node_c}. flaky_b fails on its first call and succeeds on its second. On main, the router runs once but flaky_b runs only once: recovery emits a warning that no edge matches route None and returns without the selected result. With the route preserved, the router still runs once, flaky_b runs twice, node_c never runs, and the expected output is produced.
Verification
Reproduced on main 95d8610 with real Runner and InMemorySessionService, no model/cloud service. Three delta combinations fail in a per-node regression (no-delta control passes), and the conditional parent-retry integration regression fails too.
AI assistance: Codex investigated and reproduced the problem.
Activity
fix: preserve workflow routes when flushing and delegating output