From ca819f8c90b075ff9d7662bb46613f5cbd5522b4 Mon Sep 17 00:00:00 2001 From: hermes Date: Sat, 17 Oct 2026 09:45:20 +0000 Subject: [PATCH] claude_cli: request summarized thinking, skip empty thinking deltas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit claude -p defaults to thinking display 'omitted' on new models, so the thinking text was empty and the TUI showed 'thought ยท 0 words'. Pass --thinking-display summarized (verified on claude 2.1.295) and drop empty deltas. --- crates/hx-ai/src/claude_cli.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/hx-ai/src/claude_cli.rs b/crates/hx-ai/src/claude_cli.rs index a455959..c299312 100644 --- a/crates/hx-ai/src/claude_cli.rs +++ b/crates/hx-ai/src/claude_cli.rs @@ -142,6 +142,10 @@ impl Provider for ClaudeCli { "stream-json", "--verbose", "--include-partial-messages", + // print mode defaults to display "omitted" (empty thinking text) on new models + // ponytail: hidden flag; an older claude that rejects it needs a version probe + "--thinking-display", + "summarized", "--model", &req.model, ]); @@ -199,6 +203,10 @@ impl Provider for ClaudeCli { } Some("thinking_delta") => { let t = e["delta"]["thinking"].as_str().unwrap_or_default(); + // omitted thinking: claude sends empty deltas (signature only) + if t.trim().is_empty() { + continue; + } think += t; let _ = tx.send(Ok(StreamEvent::ThinkingDelta { text: t.into() }));