Skip to content

fix: Introduce ExitLoop action and tool for LoopAgent to exit loo…#557

Open
MarsWang42 wants to merge 1 commit intogoogle:mainfrom
MarsWang42:issue-522
Open

fix: Introduce ExitLoop action and tool for LoopAgent to exit loo…#557
MarsWang42 wants to merge 1 commit intogoogle:mainfrom
MarsWang42:issue-522

Conversation

@MarsWang42
Copy link

Summary

  • Fixes [bug]exit_loop with Escalate=true stops parent SequentialAgent pipeline #522: exit_loop with Escalate=true was propagating to parent agents, causing SequentialAgent (which is internally a LoopAgent) to also exit and skip
    remaining sub-agents
  • Introduces a dedicated ExitLoop field on EventActions, decoupling loop exit from the Escalate flag
  • LoopAgent consumes the ExitLoop flag before yielding events upstream, so parent agents are unaffected
  • Escalate retains its original semantics ("escalate to a higher level agent") and passes through loops without triggering exit

Test plan

  • Updated loopagent tests to use ExitLoop instead of Escalate
  • Added TestSequentialAgentWithNestedLoop verifying Sequential(Loop(..., exit_loop), Summary) continues to Summary
  • All existing tests pass (go test ./...)

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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.

[bug]exit_loop with Escalate=true stops parent SequentialAgent pipeline

1 participant