Skip to content

Python: Specialist-to-Specialist Handoff Interrupted by User Input Fallback on stop #2264

@droideronline

Description

@droideronline

Description

Following the updates in #2037 and recent discussions, I would like to raise a clarification issue regarding the control flow behavior in specialist-to-specialist handoff scenarios.

I understand that the current framework design intentionally routes control back to user input (handoff-user-input) when an agent returns finish_reason="stop" without invoking a handoff tool. This is appropriate for interactive user-driven conversations.

However, I want to confirm whether this behavior is intended to apply even when the system is configured for specialist-to-specialist handoffs, where no user involvement is expected.


Observed Behavior

In a multi-specialist autonomous workflow:

  1. A specialist agent returns a response with finish_reason="stop".
  2. Control is automatically shifted to handoff-user-input.
  3. Since the application is fully autonomous, no user input is provided.
  4. The coordinator repeatedly attempts to deliver messages, resulting in multiple “dropped target mismatch” entries in telemetry.
  5. The system eventually ends in _UserInputGateway, awaiting user input that will never be supplied.

This behavior blocks progress in an otherwise autonomous specialist-to-specialist flow.


Clarification Requested

Although I understand this fallback-to-user-input is by design, I would like to ask:

Should user input be required when the handoff builder is configured for specialist-to-specialist communication?

In a setup where specialists are meant to pass control among themselves (via add_handoff()), the expectation is that user input should not be needed unless explicitly requested.


Expected Behavior

For specialist-to-specialist configurations, it would be more consistent if:

  • A finish_reason="stop" did not force control back to the user.
  • Control remained with the same specialist.

Why This Matters

Autonomous specialist-to-specialist handoff workflows are a common pattern, and requiring user input in these cases:

  • Interrupts agent-to-agent execution
  • Produces unnecessary coordinator loops
  • Prevents the system from running without human supervision

Metadata

Metadata

Assignees

Labels

agent orchestrationIssues related to agent orchestrationpythonworkflowsRelated to Workflows in agent-framework

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions