From 863973be83ab68a592fc86fde5629aa0636e597b Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Wed, 11 Feb 2026 01:35:58 -0800 Subject: [PATCH] fix: improve task approval display text and spacing (#913) Co-authored-by: Letta --- src/cli/components/InlineTaskApproval.tsx | 53 +++++++---------------- src/permissions/analyzer.ts | 11 +++++ 2 files changed, 26 insertions(+), 38 deletions(-) diff --git a/src/cli/components/InlineTaskApproval.tsx b/src/cli/components/InlineTaskApproval.tsx index 958e640..dfa82e1 100644 --- a/src/cli/components/InlineTaskApproval.tsx +++ b/src/cli/components/InlineTaskApproval.tsx @@ -143,53 +143,30 @@ export const InlineTaskApproval = memo( {/* Header */} - Run Task? + Dispatch subagent? {/* Task details */} - {/* Subagent type */} + {/* Type — Description (with optional model) */} - - Type: - - - - {subagentType} + + + + {subagentType} + + + {" — "} + {description} + {model ? ` (${model})` : ""} + - {/* Model (if specified) */} - {model && ( - - - Model: - - - - {model} - - - - )} - - {/* Description */} - - - Description: - - - {description} - - - {/* Prompt */} - - - Prompt: - - + + {truncatedPrompt} @@ -209,7 +186,7 @@ export const InlineTaskApproval = memo( // Generate "always" text for Task tool const alwaysText = - approveAlwaysText || "Yes, allow Task operations during this session"; + approveAlwaysText || "Yes, allow subagent operations during this session"; return ( diff --git a/src/permissions/analyzer.ts b/src/permissions/analyzer.ts index 6816e70..7cd5ef2 100644 --- a/src/permissions/analyzer.ts +++ b/src/permissions/analyzer.ts @@ -74,6 +74,17 @@ export function analyzeApprovalContext( workingDirectory, ); + case "Task": + case "task": + return { + recommendedRule: "Task", + ruleDescription: "subagent operations", + approveAlwaysText: "Yes, allow subagent operations during this session", + defaultScope: "session", + allowPersistence: true, + safetyLevel: "moderate", + }; + default: return analyzeDefaultApproval(toolName); }