diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index c9c94a9..1615211 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -2194,7 +2194,12 @@ impl Agent { let is_todo_tool = tool_call.tool == "todo_read" || tool_call.tool == "todo_write"; - if is_compact_tool && tool_success { + if is_compact_tool { + // For failed compact tools, show truncated error message + if !tool_success { + let error_msg = streaming::truncate_for_display(&tool_result, 60); + Some(error_msg) + } else { // Generate appropriate summary based on tool type match tool_call.tool.as_str() { "read_file" => Some(streaming::format_read_file_summary(output_len, tool_result.len())), @@ -2227,6 +2232,7 @@ impl Agent { } _ => Some(format!("✅ completed")) } + } } else if is_todo_tool { // Skip - todo tools print their own content None