Skip to content

My system read my message, use the tools, make the answer but the only message that I receive is "Transferring back to supervisor". #160

Open
@Rafaelca70x

Description

@Rafaelca70x

Description:
I have two different create_supervisor configurations, but in both cases the chat UI never displays the agent’s actual response—it only shows a supervisor handoff notice or echo. The LangSmith logs confirm the agent runs and returns the expected answer.


Configuration A

supervisor_graph = create_supervisor(
    model=model,
    agents=named_agents,
    prompt=LANGGRAPH_SUPERVISOR_PROMPT,
    add_handoff_back_messages=True,
    add_handoff_messages=False,   
    output_mode="full_history",
)

Observed behavior:

  • In LangSmith logs, dados_agent executes and returns the correct reply.
  • In the chat UI, however, I always see:

    “Transferring back to supervisor”


Configuration B

supervisor_graph = create_supervisor(
    model=model,
    agents=named_agents,
    prompt=LANGGRAPH_SUPERVISOR_PROMPT,
    add_handoff_back_messages=False,
    add_handoff_messages=False,   
    output_mode="last_message",
)

Example input payload:

messages:
  - content: "Quantos equipamentos odontológicos foram listados para a unidade de saúde que você consultou para mim na mensagem anterior?"
    type: human

agent_options:
  - paginas_agent
  - dados_agent
  - FINISH

Actual output in chat (incorrect):

- type: ai
  name: dados_agent
  content: "O CNES 2339358… Equipo Odontológico (1)…"

- type: ai
  name: supervisor
  content: "O CNES 2339358… Equipo Odontológico (1)…"   # same message repeated!

Although dados_agent returned the correct answer, the chat ends up replaying that same text under supervisor instead of surfacing a new reply.


Expected behavior:
The chat UI should surface the agent’s actual response:

Image

rather than only the supervisor’s handoff or echo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions