From 275fca942da8b8875d20d536cc5b9a55fac29b3a Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Tue, 28 Oct 2025 17:39:27 -0700 Subject: [PATCH] feat: improve tool denial error message display (#22) Co-authored-by: Letta --- src/cli/components/ToolCallMessageRich.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cli/components/ToolCallMessageRich.tsx b/src/cli/components/ToolCallMessageRich.tsx index c332fa5..683d1da 100644 --- a/src/cli/components/ToolCallMessageRich.tsx +++ b/src/cli/components/ToolCallMessageRich.tsx @@ -186,6 +186,13 @@ export const ToolCallMessage = memo(({ line }: { line: ToolCallLine }) => { // Not JSON, use raw text } + // Format tool denial errors more user-friendly + if (isError && displayText.includes("request to call tool denied")) { + const match = displayText.match(/User reason: (.+)$/); + const reason = match ? match[1] : "(empty)"; + displayText = `User rejected the tool call with reason: ${reason}`; + } + return (