Skip to content

Issue with Multi-turn Handoff and Slot Filling #741

Not planned
@hanil-jihun

Description

@hanil-jihun

Hi,
I’m running into a problem with multi-agent handoff and slot filling using OpenAI Agents (function calling, multi-agent orchestration).

Scenario:

I have a main agent and a rental car agent.
When a user asks about rental car reservation, the main agent hands off to the rental car agent.
The rental car agent needs both location and date to make a reservation, so it asks the user for the location first (slot-filling).
The user then provides the location.

Problem:

After the user provides the location, the conversation does not continue with the rental car agent.
Instead, the main agent answers directly (without handing the turn to the rental car agent again), so the slot-filling flow is broken.

Questions:

Is multi-turn slot filling with agent handoff/stateful continuation fully supported in the current OpenAI Agents framework?
Is there a recommended way to ensure that follow-up questions (for slot-filling) keep being routed to the correct agent?
Are there any best practices or configuration changes I should try for this use case?
Thanks for any suggestions or workarounds.

Activity

hanil-jihun

hanil-jihun commented on May 22, 2025

@hanil-jihun
Author

I’ve seen some discussions and got this response from GPT about how OpenAI Agents interpret history:

If you provide the full message structure (such as the output from to_input_list), OpenAI will use the metadata (function call, tool output, status, etc.) in the history to determine that the previous agent session has already been completed or handled.
Because of this, the next user message is treated as the start of a new, single-agent session, instead of continuing with the specialized agent.
In particular, if there is a tool/function output message included, the system may internally interpret the agent’s task as finished, so additional user input gets routed back to the default agent rather than staying with the specialized agent.

If anyone has experience with this or additional insight, please feel free to comment.
Any suggestions, explanations, or best practices would be greatly appreciated.

Kalai9976

Kalai9976 commented on May 26, 2025

@Kalai9976

When you are trying to handoff instead on having only one agent - if you have more agents handoff are working as expect - If you mention only one agent in handoffs the agent itself throw the output

Kalai9976

Kalai9976 commented on May 26, 2025

@Kalai9976

Try having some dummy agent in place and run the same. might help

hanil-jihun

hanil-jihun commented on May 27, 2025

@hanil-jihun
Author

Try having some dummy agent in place and run the same. might help

I've tried making two more agents but it is not working

github-actions

github-actions commented on Jun 3, 2025

@github-actions

This issue is stale because it has been open for 7 days with no activity.

github-actions

github-actions commented on Jun 7, 2025

@github-actions

This issue was closed because it has been inactive for 3 days since being marked as stale.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDKstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @hanil-jihun@Kalai9976

        Issue actions

          Issue with Multi-turn Handoff and Slot Filling · Issue #741 · openai/openai-agents-python