Skip to content

[VA-496] Adding interruptible configuration to Transfer and EndCall tools#210

Open
lucyliulee wants to merge 8 commits intomainfrom
lucy/va-496-transfer-end-interruptible
Open

[VA-496] Adding interruptible configuration to Transfer and EndCall tools#210
lucyliulee wants to merge 8 commits intomainfrom
lucy/va-496-transfer-end-interruptible

Conversation

@lucyliulee
Copy link
Copy Markdown
Contributor

@lucyliulee lucyliulee commented Apr 15, 2026

What does this PR do?

  • Add configurable interruptible field to EndCallTool, TransferCallTool, and agent_as_handoff, propagated end-to-end through events (AgentEndCall, AgentTransferCall) to harness output types (EndCallOutput, TransferOutput). Defaults to True.
  • Convert transfer_call from a plain @passthrough_tool function to a TransferCallTool class (matching the EndCallTool pattern), supporting message and interruptible configuration via both constructor and callable syntax.
  • Update _normalize_tools to handle TransferCallTool instances instead of incorrectly treating them as plain callables.

Showing end call being interrupted
image

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Verify all 32 tests in test_llm_agent_tools_system.py pass (10 existing transfer_call tests updated, 14 new tests for interruptible/message behavior, 2 new _normalize_tools tests)
  • Verify TestEndCallAndTransferCallMapping tests in test_voice_agent_app.py pass (4 tests for event-to-output interruptible forwarding)
  • Manually test end_call(interruptible=False) and transfer_call(interruptible=False) in a live call to confirm the harness receives interruptible: false

Checklist

  • I have read the contributing guidelines
  • I have added tests that prove my fix is effective or that my feature works
  • I have formatted my code with make format

Note

Medium Risk
Touches core tool/event wiring and websocket output schemas for call control, so regressions could affect transfer/hangup behavior even though defaults preserve existing behavior.

Overview
Adds an end-to-end interruptible flag for end_call and transfer_call, threading it from tool configuration through AgentEndCall/AgentTransferCall events into harness websocket outputs (EndCallOutput, TransferOutput) and updating logging/mapping accordingly.

Refactors transfer_call from a @passthrough_tool function into a TransferCallTool class (matching EndCallTool), where optional pre-transfer speech is fixed at tool construction (transfer_call(message=...)) and no longer provided by the model at call time; tool normalization/validation is updated to treat TransferCallTool as a first-class tool type. Docs/examples and tests are updated/added to cover the new configuration and propagation behavior.

Reviewed by Cursor Bugbot for commit 06d0dd4. Bugbot is set up for automated code reviews on this repo. Configure here.

@lucyliulee lucyliulee marked this pull request as ready for review April 15, 2026 19:56
@lucyliulee lucyliulee changed the title Adding interruptible configuration to Transfer and EndCall tools [VA-496] Adding interruptible configuration to Transfer and EndCall tools Apr 16, 2026
Comment thread line/llm_agent/tools/system.py
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e39bf97. Configure here.

Comment thread line/llm_agent/tools/system.py
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.

2 participants