Comma Agents
@comma-agents/tuiComponents

PermissionPrompt

Sandbox permission request prompt with action buttons — allow, deny, or remember the decision for the session.

PermissionPrompt

Renders a permission request from the sandbox with a warning-styled border and four action buttons. Shown when a strategy attempts a sandbox operation that requires user approval.

import { PermissionPrompt } from "@comma-agents/tui";

<PermissionPrompt
  request={{
    agentName: "builder",
    toolName: "run_command",
    operation: "fs.exec",
    resource: "/usr/bin/node",
  }}
  onDecide={(decision) => {
    // "allow" | "deny" | "allow-session" | "deny-session"
  }}
/>

PermissionPromptProps

PropTypeDescription
requestPendingPermissionRequestThe permission request to display
onDecide(decision: PermissionDecision) => voidUser decision callback

PendingPermissionRequest

FieldTypeDescription
agentNamestringAgent that triggered the operation
toolNamestring?Tool that triggered the operation
operation"fs.read" | "fs.write" | "fs.exec"Category of operation
resourcestringAbsolute resource path

Decision Buttons

ButtonVariantDescription
Allow oncePrimaryApprove this single operation
Allow sessionSecondaryApprove all future operations of this type for the session
Deny onceDangerDeny this single operation
Deny sessionGhostDeny all future operations of this type for the session

Focus starts on "Allow once" when the prompt mounts. Tab / Shift+Tab cycles through all four buttons. Enter or left click confirms the focused choice. The prompt shows the agent name (and tool name if applicable), the human-readable operation type, and the resource path.

On this page