#752 run_goal workflow variables are not agent-scoped; two agents in one workflow collide

open medium Created 2026-06-20 22:10 · Updated 2026-06-20 22:10

Description

Edit
tools.agent.run_goal/init_goal use fixed workflow-variable names (agent_done, agent_turn, agent_messages, agent_llm_<turn>, agent_tool_<turn>_<i>). Workflow variables are per-run, so two tools.agent.run_goal instances in the SAME workflow would corrupt each other's state. The Phase 0 wrapper runs exactly one agent, so not a blocker. Fix: add an optional state_key/agent_id kwarg that namespaces all run_goal variables (approval_key is already scoped by workflow_run_id+turn+call). Relates #749.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...