Problem
When an agent that performs handoffs (in our case a router agent we created) tries to transfer to another agent (e.g. a “Code Refactorer”), it sometimes calls the handoff tool with a wrong name: the correct ID suffix is duplicated (e.g. ...7yu becomes ...7yu7yu). The tool is then not found on the host (handoff tools are graph-managed, not in the host’s loadTools), which leads to repeated failed handoffs and multiple “Transferred to Agent” messages without an actual transfer.
Observed: Several “Transferred to Agent” lines in a row, then the assistant reports that the transfer to the code refactorer failed.
Provider/Model: Scaleway / devstral-2-123b-instruct-2512
(The full ModelSpec configuration can be viewed here and the full Agents configuration here.)
Relevant logs
2026-02-17 13:41:29 warn: [ON_TOOL_EXECUTE] Tool "lc_transfer_to_agent_V_29lG4o1TnQ3-C0wu7yu7yu" not found. Available:
2026-02-17 13:41:31 warn: [ON_TOOL_EXECUTE] Tool "lc_transfer_to_agent_V_29lG4o1TnQ3-C0wu7yu7yu" not found. Available:
2026-02-17 13:41:32 warn: [ON_TOOL_EXECUTE] Tool "lc_transfer_to_agent_V_29lG4o1TnQ3-C0wu7yu7yu" not found. Available:
2026-02-17 13:41:33 warn: [ON_TOOL_EXECUTE] Tool "lc_transfer_to_agent_V_29lG4o1TnQ3-C0wu7yu7yu" not found. Available:
2026-02-17 13:41:34 warn: [ON_TOOL_EXECUTE] Tool "lc_transfer_to_agent_V_29lG4o1TnQ3-C0wu7yu7yu" not found. Available:
2026-02-17 13:41:36 error: [api/server/controllers/agents/client.js #sendCompletion] Operation aborted 400 Cannot set `add_generation_prompt` to True when the last message is from the assistant. Consider using `continue_final_message` instead.
2026-02-17 13:41:36 error: [api/server/controllers/agents/client.js #sendCompletion] Unhandled error type 400 Cannot set `add_generation_prompt` to True when the last message is from the assistant. Consider using `continue_final_message` instead.
The correct tool name would be lc_transfer_to_agent_V_29lG4o1TnQ3-C0wu7yu (without the duplicated 7yu).
Screenshot
Context
- Handoff tools are created with names like
lc_transfer_to_ + edge.to (agent ID). Edges/init do not duplicate the ID.
- Possible mitigation: when a handoff tool name is “wrong” but prefix-matches a known handoff tool, return a ToolMessage to the LLM with the correct name so it can call the right tool in the next turn (instead of executing silently or leaving the host to report “tool not found”).
Problem
When an agent that performs handoffs (in our case a router agent we created) tries to transfer to another agent (e.g. a “Code Refactorer”), it sometimes calls the handoff tool with a wrong name: the correct ID suffix is duplicated (e.g.
...7yubecomes...7yu7yu). The tool is then not found on the host (handoff tools are graph-managed, not in the host’sloadTools), which leads to repeated failed handoffs and multiple “Transferred to Agent” messages without an actual transfer.Observed: Several “Transferred to Agent” lines in a row, then the assistant reports that the transfer to the code refactorer failed.
Provider/Model: Scaleway / devstral-2-123b-instruct-2512
(The full ModelSpec configuration can be viewed here and the full Agents configuration here.)
Relevant logs
The correct tool name would be
lc_transfer_to_agent_V_29lG4o1TnQ3-C0wu7yu(without the duplicated7yu).Screenshot
Context
lc_transfer_to_+edge.to(agent ID). Edges/init do not duplicate the ID.