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 (