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
replay: a step object reused at two flow positions maps to one node id #6015
In Replay's graph and events (#6010), a step object that is used at two positions in one AgentFlow is mapped by id(obj). Both positions therefore get the same node_id, and the live highlight always lands on the first position.
Reproduce
frompraisonaiagentsimportAgentFlowdefreview(ctx): return"ok"flow=AgentFlow(name="f", steps=[review, "draft", review]) # same object twice# to_graph(flow): two step nodes (step:review, step:review#2), but step events for# both executions carry node_id "step:review"
Fix direction
Track the step's position at run time (the executor already knows the index or path) and map it to the positional id (step:review#2) when emitting step_start/step_end, instead of looking up id(step_obj). Add a test with the same object at two positions, sequentially and inside a Loop.
Reported by the FINAL review of #6010 (Greptile P1, item 2); deferred as non-blocking.
I confirmed the current recorder resolves a step span through graph.ids.get(id(step)), so two positions sharing one callable cannot select distinct graph nodes. A simple per-object occurrence counter is not sufficient: a Loop revisits one position and should keep the same node id across iterations, while two positions using the same object need different ids. The executor should pass the graph position/path into span creation, preserving it through nested pattern execution. This also touches the step emission path being modified by the active #6016 variable-recording work; I am not publishing a competing workflows.py rewrite. A regression should assert both step_start and step_end IDs for two shared-callable positions, and stable IDs for those positions over multiple loop iterations. This is diagnosis/integration context, not a claim that #6016 already fixes this issue.
Activity
dajiaohuang commentedon Oct 26, 2026
I confirmed the current recorder resolves a step span through graph.ids.get(id(step)), so two positions sharing one callable cannot select distinct graph nodes. A simple per-object occurrence counter is not sufficient: a Loop revisits one position and should keep the same node id across iterations, while two positions using the same object need different ids. The executor should pass the graph position/path into span creation, preserving it through nested pattern execution. This also touches the step emission path being modified by the active #6016 variable-recording work; I am not publishing a competing workflows.py rewrite. A regression should assert both step_start and step_end IDs for two shared-callable positions, and stable IDs for those positions over multiple loop iterations. This is diagnosis/integration context, not a claim that #6016 already fixes this issue.