What
A tool result is the output Claude gets back after using a tool. Sometimes Claude Code replaces a tool result with a shorter version. It now keeps track of images that were removed this way:
clearedImagesOfis a new record on messages. When a tool result is replaced, it lists thetool_use_idof each tool call whose result had image content. Atool_use_idis the label that ties a tool result to the tool call that produced it.- The code that handles images and documents in tool results now treats a result as carrying an image when its
tool_use_idis listed inclearedImagesOf. - That same code now treats results from any tool in a named set of tools as carrying both images and documents. Before, it only compared the tool against a short fixed list of tool names, such as
WebBrowser.
Why
This lets Claude Code account for images it has already stripped from tool results. In practice, it changes which tool results count as holding images or documents when that media has to be removed or replaced, for example after the API turns down an image or document.