Hi there,
I noticed that when a tool returns a CallToolResult with multiple content items (e.g. both text and an image), only the first item gets processed. The rest are silently dropped.
Looking at tool_loop_agent_runner.py, the handler checks res.content[0] directly instead of iterating over all items in res.content. This means the LLM only sees partial results from tools that return rich/multi-part responses.
This seems related to #6140.
I have a fix ready — happy to open a PR if that works.
Hi there,
I noticed that when a tool returns a
CallToolResultwith multiple content items (e.g. both text and an image), only the first item gets processed. The rest are silently dropped.Looking at
tool_loop_agent_runner.py, the handler checksres.content[0]directly instead of iterating over all items inres.content. This means the LLM only sees partial results from tools that return rich/multi-part responses.This seems related to #6140.
I have a fix ready — happy to open a PR if that works.