From 76787f205c2ece79143d7af0a35f1d4a5d900555 Mon Sep 17 00:00:00 2001 From: Julian Merkle Date: Thu, 5 Nov 2026 16:24:54 +0100 Subject: [PATCH] Fix duplicate tool calls with empty arguments Observation: Tool calls are duplicated, where the second call has empty arguments. --- src/client.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client.rs b/src/client.rs index 0084958..82ed16d 100644 --- a/src/client.rs +++ b/src/client.rs @@ -559,6 +559,15 @@ impl LumoClient { { args = clear; } + // Progress echoes often arrive with empty (or undecryptable) + // arguments before the real call streams in via + // `delta.tool_calls`. Registering them produces phantom calls + // with `{}` arguments that later fail validation with + // "missing string argument …". Skip anything empty; the + // delta channel (or a later echo) carries the real call. + if args.trim().is_empty() { + return Ok(()); + } // A `chat.tool_call` may describe a CLIENT tool call with // decrypted arguments; register it so it merges with the // delta.tool_calls channel.