From e5781325c61576ca82be40379d62a80bf3759187 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 24 Apr 2026 14:25:53 -0400 Subject: [PATCH] fix(ai): render tool-call arguments as compact JSON in logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch the "Agentic tool call" log from {:?} (Debug) to {} (Display) on serde_json::Value. Display produces compact JSON — `{"date":"2023-08-15"}` instead of `Object {"date": String("2023-08-15")}` — which is what the model actually sent and what a human reading the log wants to see. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/ai/insight_generator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/insight_generator.rs b/src/ai/insight_generator.rs index 65ba3a1..d718b7e 100644 --- a/src/ai/insight_generator.rs +++ b/src/ai/insight_generator.rs @@ -3281,7 +3281,7 @@ Return ONLY the summary, nothing else."#, { for tool_call in tool_calls { log::info!( - "Agentic tool call [{}]: {} {:?}", + "Agentic tool call [{}]: {} {}", iteration, tool_call.function.name, tool_call.function.arguments