From 5405a4d0978d1090a8965bdfac6e36331fae451f Mon Sep 17 00:00:00 2001 From: Nawapat Buakoet Date: Tue, 26 May 2026 15:27:16 +0700 Subject: [PATCH] Add Auto Mode option to Permission Mode dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code shipped Auto Mode in March 2026 as a new permission mode value (`auto`) — autonomous execution gated by a Sonnet 4.6 safety classifier. It sits between `acceptEdits` and `bypassPermissions` in risk profile. Extend the `PermissionMode` union and `PERMISSION_MODE_OPTIONS` array with the `auto` entry. The Settings dropdown and first-time setup modal both iterate the options array, so no UI component changes are needed. The hook stdout payload (`updatedPermissions[].mode`) is already generic over mode value, so server-side plumbing also requires no changes. Refs: - https://www.anthropic.com/engineering/claude-code-auto-mode - https://code.claude.com/docs/en/permission-modes --- packages/ui/utils/permissionMode.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/ui/utils/permissionMode.ts b/packages/ui/utils/permissionMode.ts index 809995377..46bfa61d1 100644 --- a/packages/ui/utils/permissionMode.ts +++ b/packages/ui/utils/permissionMode.ts @@ -5,8 +5,9 @@ * Claude Code 2.1.7+ supports updatedPermissions in hook responses. * * Available modes: - * - bypassPermissions: Auto-approve all tool calls * - acceptEdits: Auto-approve file edits only + * - auto: Autonomous execution gated by a model-based safety classifier (Claude Code 2026-03+, Sonnet 4.6+) + * - bypassPermissions: Auto-approve all tool calls * - default: Manually approve each tool call */ @@ -15,7 +16,7 @@ import { storage } from './storage'; const STORAGE_KEY_MODE = 'plannotator-permission-mode'; const STORAGE_KEY_CONFIGURED = 'plannotator-permission-mode-configured'; -export type PermissionMode = 'bypassPermissions' | 'acceptEdits' | 'default'; +export type PermissionMode = 'bypassPermissions' | 'acceptEdits' | 'auto' | 'default'; export interface PermissionModeSettings { mode: PermissionMode; @@ -28,6 +29,11 @@ export const PERMISSION_MODE_OPTIONS: { value: PermissionMode; label: string; de label: 'Auto-accept Edits', description: 'Auto-approve file edits, ask for other tools', }, + { + value: 'auto', + label: 'Auto Mode', + description: 'Autonomous execution with a safety classifier (requires Claude Code 2026-03+ and Sonnet 4.6+)', + }, { value: 'bypassPermissions', label: 'Bypass Permissions',