Skip to content

Fix loop termination bug in Tutorial 07 (Code + Docs)#67

Open
Agents-swarm-it wants to merge 2 commits intoraphaelmansuy:mainfrom
Agents-swarm-it:main
Open

Fix loop termination bug in Tutorial 07 (Code + Docs)#67
Agents-swarm-it wants to merge 2 commits intoraphaelmansuy:mainfrom
Agents-swarm-it:main

Conversation

@Agents-swarm-it
Copy link

The loop was incorrectly hitting max_iterations because the code used end_of_agent = True. This command successfully stopped the Refiner (the child agent), but failed to signal the parent RefinementLoop to terminate.

I have updated both agent.py and the documentation (07_loop_agents.md) to use escalate = True. This ensures the stop signal propagates up to the LoopAgent, allowing it to exit early as intended.

Evidence of bug:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments