Skip to content

Add Auto Mode option to Permission Mode dropdown#796

Merged
backnotprop merged 1 commit into
backnotprop:mainfrom
BeamNawapat:feat/auto-mode-permission
May 26, 2026
Merged

Add Auto Mode option to Permission Mode dropdown#796
backnotprop merged 1 commit into
backnotprop:mainfrom
BeamNawapat:feat/auto-mode-permission

Conversation

@BeamNawapat
Copy link
Copy Markdown
Contributor

Summary

  • Adds auto as a fourth option in the Permission Mode dropdown so users can opt into Claude Code Auto Mode after approving a plan.
  • Auto Mode is a March 2026 Claude Code feature: autonomous execution gated by a Sonnet 4.6-based safety classifier — less interrupting than acceptEdits, safer than bypassPermissions.
  • Single-file change: extends the PermissionMode union + PERMISSION_MODE_OPTIONS array in packages/ui/utils/permissionMode.ts. The Settings dropdown and first-time setup modal both iterate that array, so no other UI changes are needed. The hook stdout payload (updatedPermissions[].mode) is already generic over the mode string, so server-side plumbing requires no changes either.

Why this is safe to send to all Claude Code installs

Claude Code's setMode handler treats unknown mode values gracefully — older installs that pre-date Auto Mode support will silently keep the previous mode rather than crash. No version-gating UI is required.

References

Test plan

  • bun run typecheck (all 5 packages: shared, ai, server, ui, pi)
  • bun run --cwd apps/review build succeeds
  • bun run build:hook succeeds; grep confirms "Auto Mode" present in apps/hook/dist/index.html
  • bun run build:opencode succeeds; grep confirms "Auto Mode" present in apps/opencode-plugin/plannotator.html
  • Manual smoke: trigger a plan, open Settings → Permission Mode → verify 4 options (Auto-accept Edits, Auto Mode, Bypass Permissions, Manual Approval). Select Auto Mode, approve, confirm Claude Code session indicator shows auto.
  • First-time setup modal renders the Auto Mode card alongside existing options.

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
Copilot AI review requested due to automatic review settings May 26, 2026 08:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new auto permission mode option to the UI permission mode utilities, including documentation and option metadata for display.

Changes:

  • Extends PermissionMode union type to include 'auto'
  • Adds an 'auto' entry to PERMISSION_MODE_OPTIONS
  • Updates the mode documentation comment to describe the new option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@backnotprop backnotprop merged commit 92efe6f into backnotprop:main May 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants