Skip to content

Repository files navigation

Claude Code AutoAccept — auto-approve Claude Code permission requests in VS Code

Claude Code AutoAccept

A one-click Auto-Accept toggle for Claude Code in VS Code — automatically approve every permission request through Claude Code's official PermissionRequest hook.

License: MIT VS Code Platform Made for Claude Code


Adds an Auto toggle inside the Claude Code header in VS Code. When enabled, Claude Code permission requests are approved through its official PermissionRequest hook API — including the plan-completion prompt with "Tell Claude what to do instead". No more clicking Yes on every shell command, file edit, or tool call while you supervise a trusted task.

Keywords: claude code, anthropic, vscode extension, auto approve permissions, auto accept, skip permissions, yolo mode, permission hook, ai coding assistant, developer tools.

⚠️ Safety warning: AutoAccept approves every permission request, including shell commands, file changes, network access, MCP tools, and plan approval. Use it only while supervising a trusted task, preferably in a repository that can be reverted or in an isolated environment.

Disclaimer: This is an independent, community-built tool. It is not affiliated with, endorsed by, or sponsored by Anthropic. "Claude" and "Claude Code" are trademarks of Anthropic; they are used here only to describe compatibility.

How it works

flowchart LR
    A["Click <b>Auto</b><br/>in the Claude Code header"] --> B["Extension adds a<br/><b>PermissionRequest</b> hook to<br/>~/.claude/settings.json"]
    B --> C{"Claude Code needs<br/>permission<br/>(shell · edit · tool · plan)"}
    C --> D["Hook returns<br/><b>behavior: allow</b>"]
    D --> E["✓ Auto-approved —<br/>no prompt shown"]
Loading

Approvals happen inside Claude Code's own permission engine — the extension never clicks buttons or reads dialogs. Turn it off and normal prompts return.

Architecture

Version 0.3 uses a hybrid design:

  • UI only: a small marker-delimited bridge adds the Auto button to Claude's internal header and forwards its ON/OFF request to the extension host.
  • Approval behavior: an official Claude Code PermissionRequest hook returns decision.behavior = "allow".
  • State synchronization: the internal button queries the real hook state and displays Auto when OFF or ✓ Auto when ON.
  • Fallback UI: native VS Code title actions and a status-bar item remain available if Claude changes its internal header structure.

The UI bridge does not inspect permission dialogs, depend on Yes/No selectors, or click buttons. All approval decisions happen in Claude's permission engine before a dialog is displayed.

Install

npm install
npx @vscode/vsce package
code --install-extension .\claude-code-autoaccept-0.3.0.vsix --force

Run Developer: Reload Window once after installation. The extension automatically repairs the UI bridge after a Claude Code update and asks for another reload only when that repair is needed.

Use

  1. Open Claude Code.
  2. Click Auto in Claude's internal header.
  3. Accept the one-time safety warning.
  4. The button becomes ✓ Auto; permission requests are now approved automatically.
  5. Click it again to restore normal permission prompts.

The same state can be controlled from the shield/check-all icon in Claude's native view toolbar or from the Claude AutoAccept status-bar item.

Commands

Command Action
Claude AutoAccept: Enable Add and activate the official auto-approval hook.
Claude AutoAccept: Disable Remove only this extension's hook.
Claude AutoAccept: Toggle Switch between ON and OFF.
Claude AutoAccept: Repair Internal UI Button Reapply the minimal UI bridge after an update.
Claude AutoAccept: Show Status Show hook and bridge state.

Settings safety

The extension edits the user-level Claude settings file:

~/.claude/settings.json

Existing settings and hooks are preserved. JSON comments and trailing commas are supported through jsonc-parser. Before the first settings change, the extension creates settings.json.autoaccept.bak. Disable removes only the command handler containing the unique CLAUDE_CODE_AUTOACCEPT_HOOK marker.

Claude UI bridge safety

The bridge touches only the active anthropic.claude-code installation:

  • extension.js: intercepts the private claude-autoaccept message and invokes one of three fixed commands: get state, enable, or disable.
  • webview/index.js: captures Claude's existing VS Code message API and inserts the header button.

Backups are created once beside each file with the suffix .autoaccept-ui.bak. All additions are marker-delimited and idempotent. The bridge does not enable arbitrary command URIs and does not forward untrusted command names from the webview.

Updating Claude Code

Claude updates replace the patched files. On the next VS Code startup, AutoAccept detects the new active Claude installation, reapplies only the UI bridge, and offers Reload Now. The hook state in ~/.claude/settings.json is unaffected by Claude updates.

Uninstall

Turn AutoAccept OFF before uninstalling so its hook is removed. Then run Claude AutoAccept: Repair Internal UI Button only when reinstalling; for full manual cleanup, remove the blocks between the Claude AutoAccept UI bridge, host bridge, and internal button markers. Do not restore whole backups over live files because unrelated extensions may also patch Claude Code.

About

One-click Auto-Accept toggle for Claude Code in VS Code — auto-approve permission requests via the official PermissionRequest hook. Windows / macOS / Linux.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages