Skip to main content

Overview

When an agent wants to use a tool that requires permission and no rule grants access, the SDK emits an OutputChunk::PermissionRequest. Your frontend handles this by showing UI to the user and sending back their decision.

Flow

The Permission Request

Handling Requests

Minimal Example

Tauri Integration

Backend (Rust):
Frontend (TypeScript):

Remember Checkbox

When remember is true in the response, the decision is added as a session rule (in-memory only). It applies for the lifetime of this agent instance and is lost on shutdown.
For persistent permissions, use local or global rules instead. See Three-Tier System.

Next Steps

Three-Tier System

Understanding permission tiers

Dangerous Skip Mode

Bypassing permissions