From 4f5549391e641be9505437cc0a138005acf59fb9 Mon Sep 17 00:00:00 2001 From: Daniel Riccio Date: Mon, 21 Jul 2025 08:26:50 -0500 Subject: [PATCH] fix: allow text content after update_todo_list tool (#5847) The update_todo_list tool is a special case that doesn't produce actionable output or require user interaction beyond confirmation. Unlike other tools that perform file operations or system commands, update_todo_list simply updates the UI's todo list display. This change exempts update_todo_list from setting the didAlreadyUseTool flag, which allows subsequent text content to be rendered. This enables the assistant to provide context or explanations after updating the todo list, improving the user experience. The one-tool-per-message restriction remains in effect for all other tools to prevent multiple potentially conflicting operations in a single message. --- src/core/assistant-message/presentAssistantMessage.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/assistant-message/presentAssistantMessage.ts b/src/core/assistant-message/presentAssistantMessage.ts index ee3fa148b4..344af8bfcc 100644 --- a/src/core/assistant-message/presentAssistantMessage.ts +++ b/src/core/assistant-message/presentAssistantMessage.ts @@ -256,8 +256,11 @@ export async function presentAssistantMessage(cline: Task) { // Once a tool result has been collected, ignore all other tool // uses since we should only ever present one tool result per - // message. - cline.didAlreadyUseTool = true + // message. Exception: update_todo_list is allowed to be followed + // by text content. + if (block.name !== "update_todo_list") { + cline.didAlreadyUseTool = true + } } const askApproval = async (