Skip to content

fix(llm_flows): injecting TransferToAgentTool after request confirmation#5669

Open
settler-av wants to merge 1 commit into
google:mainfrom
settler-av:fix/transfer-to-agent-confirmation
Open

fix(llm_flows): injecting TransferToAgentTool after request confirmation#5669
settler-av wants to merge 1 commit into
google:mainfrom
settler-av:fix/transfer-to-agent-confirmation

Conversation

@settler-av
Copy link
Copy Markdown

@settler-av settler-av commented May 12, 2026

fix(flows): inject transfer_to_agent tool for HITL confirmation resume

Closes: #5633

Problem:
When using HITL (human-in-the-loop) confirmation for transfer_to_agent, the tool was not present in tools_dict during confirmation resume, causing a ValueError and breaking the transfer flow.

Solution:

  • Ensures transfer_to_agent is injected into tools_dict during confirmation resume, mirroring the logic in the agent transfer processor.
  • Adds unit tests for approve, reject, and no-sub-agent paths to verify correct behavior.

Testing Plan:

  • Added unit tests for all confirmation paths (approve, reject, no sub_agents).
  • All unit tests pass locally: pytest test_request_confirmation.py -v
  • No regressions in request_confirmation logic.

Checklist:

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.

Additional context:
No API or breaking changes. Fix is isolated to HITL confirmation resume logic.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 12, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@settler-av settler-av force-pushed the fix/transfer-to-agent-confirmation branch from e161b73 to cb0dd31 Compare May 12, 2026 06:17
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: transfer_to_agent not found in canonical_tools() during HITL request_confirmation resume

1 participant