Skip to content

setting add_handoff_messages=False creates looping #152

Open
@ashburncrash

Description

@ashburncrash

Hi team,

I'm using langgraph-supervisor 0.0.20 version. When passing add_handoff_messages=False and test it on LangGraph Studio, I see that there's a loop being created between supervisor node and subagent node. This loop doesn't occur if I remove add_handoff_messages=False.

orchestrator = create_supervisor(
        [subgraph1, subgraph2],
        model=model,
        state_schema=BaseAgentState,
        prompt=AGENT_PROMPT,
        supervisor_name="orchestrator",
        output_mode="last_message",
        add_handoff_messages=False,
    )

Is this expected behaviour? (not sure if you can see the run, but sharing the link to one of the runs that showed this: https://eu.smith.langchain.com/public/a4950620-1d85-4415-b2f4-c2d76adbd072/r )

If I remember correctly, when I tried the same config last week, it didn't show the looping - https://eu.smith.langchain.com/public/55eb198c-4bb5-49f0-be02-898a56f6e365/r

Metadata

Metadata

Assignees

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