From 637884f84bd12816109fe530e788cae563b0fe38 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Fri, 16 Jan 2026 06:38:11 +0530 Subject: [PATCH] Fix duplicate todo_read display in agent mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The print_todo_compact() function was missing the call to clear the streaming hint line before printing the final tool output. This caused the tool name to appear twice when the hint line wasn't cleared: ● todo_read ● todo_read | empty Added the missing handle_hint(ToolParsingHint::Complete) call to match the behavior of print_tool_compact(). --- crates/g3-cli/src/ui_writer_impl.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/g3-cli/src/ui_writer_impl.rs b/crates/g3-cli/src/ui_writer_impl.rs index 962eb2f..7b40515 100644 --- a/crates/g3-cli/src/ui_writer_impl.rs +++ b/crates/g3-cli/src/ui_writer_impl.rs @@ -584,6 +584,10 @@ impl UiWriter for ConsoleUiWriter { fn print_todo_compact(&self, content: Option<&str>, is_write: bool) -> bool { let tool_name = if is_write { "todo_write" } else { "todo_read" }; + // Clear any streaming hint that might be showing + // This ensures we don't duplicate the tool name on the line + self.hint_state.handle_hint(ToolParsingHint::Complete); + let is_agent_mode = self.hint_state.is_agent_mode.load(Ordering::Relaxed); let tool_color = if is_agent_mode { TOOL_COLOR_AGENT } else { TOOL_COLOR_NORMAL };