DEV Community

Raid ➐
Raid ➐

Posted on

Stop Babysitting Al: Automating Claude Code Permissions in VS Code

If you’ve been using Claude Code in your terminal or IDE, you already know the magic. You give it a high-level prompt, and it starts navigating your codebase, writing scripts, and running terminal commands.

But you also know the absolute worst part: The Interrogation.

"Claude wants to run npm install. Allow?" Yes.
"Claude wants to read utils.py. Allow?" Yes.
"Claude wants to run pytest. Allow?" YES.

AI is supposed to be an autonomous assistant, but the constant permission prompts make it feel like you are micromanaging a junior developer who lacks all confidence. It completely breaks your flow state.

I got tired of babysitting Claude, so I built a solution: Claude Auto-Accept, a VS Code extension that handles the permissions for you.

Here is a deep dive into why I built it, how it works under the hood, and how we can achieve autonomous AI workflows without accidentally rm -rf-ing our root directories.


The "Flow State" Problem

When you are deep in a problem—say, configuring a local Docker registry on port 5000, tweaking Linux server permissions, or writing a complex Azure CLI deployment script—you want to delegate the tedious boilerplate to AI.

Ideally, you write the prompt, step back, and let the AI spin up the containers or test the endpoints. But standard Claude Code forces you to stay glued to the terminal, pressing "Enter" every 15 seconds. You can't switch context, you can't go grab coffee, and you certainly can't focus on high-level architecture.

Security and user consent are vital. But there has to be a middle ground between "approve every single bash command" and "let the AI have unfettered root access to my entire life."

The Solution: One Toggle to Rule Them All

The goal was simple: provide a status bar toggle in VS Code that silently intercepts and auto-approves Claude's standard actions, while keeping the developer in the loop only when absolutely necessary.

With Claude Auto-Accept, you flip one switch. From then on, Claude runs bash, edits files, and fetches documentation seamlessly.

How it handles interaction

The extension intercepts standard read/write/execute hooks. However, when Claude hits an ambiguity and uses the AskUserQuestion tool, the auto-accept pauses. It plays a subtle "ding" attention sound to let you know your input is actually required. You stay in control of the decisions that matter; everything else just flows.

Remote Workflows

A lot of us don't develop on our bare-metal local machines anymore. The extension supports Remote SSH out of the box. If you are coding on a headless Linux box or inside a container, installing the extension in the SSH workspace registers the approval hooks on the actual machine where Claude Code is executing.


The Elephant in the Room: Safety & Guardrails

"Wait, you're letting an LLM run arbitrary bash commands without asking?"

Yes, and I understand why that sounds terrifying. If an AI hallucinates, it could overwrite a critical .env file or force-push broken code.

To solve this, I built a safety net into the extension's Pro tier to ensure you can sleep at night:

1. Hardcoded Guardrails 🛡️

The extension actively scans the commands Claude attempts to run.

  • It explicitly blocks scary commands like rm -rf, curl | sh, and git push --force.
  • It protects sensitive files (like .env, .git, or SSH keys) from being modified or read unnecessarily.
  • It scans outbound edits to ensure you aren't accidentally leaking API keys into your logs.

2. The "Time Machine" ⏪

Mistakes happen. Sometimes Claude goes down a rabbit hole and completely ruins a perfectly good Python script.
The Time Machine feature takes an automatic snapshot of your workspace before every turn. If Claude goes sideways, you just click a button to rewind your environment back to the exact state it was in before the AI started its tangent.

3. Auto Quality Gates ✅

Instead of reviewing code after it breaks, the extension can trigger your linter or test suite (like pytest or flake8) on each edit. If the AI introduces a syntax error, the tool catches it and forces Claude to fix its own mistake before you even look at it.


Asynchronous AI: Webhooks and Alerts

Once you remove the permission friction, your relationship with the AI changes. You start giving it larger, more complex tasks.

"Refactor this legacy authentication module, write the tests, and verify the endpoints."

Since you don't have to sit there clicking "Allow," you can actually walk away. To support this, I integrated Remote Alerts. You can set up webhooks for Slack, Discord, or Telegram.

When Claude finishes a 10-minute refactoring task, or when it genuinely gets stuck and throws an AskUserQuestion, it pings your phone. You can be in the kitchen or on the couch, and you only come back to your desk when the work is either done or blocked.


Try it out (It has a generous Free Tier)

I want developers to experience the speed of frictionless AI.

The Free Tier gives you 200 auto-accepts every single day (which easily covers most casual coding sessions), the status bar toggle, the attention sound, and an Activity Dashboard to track how many manual clicks you've saved.

If you're a power user who wants unlimited auto-accepts, the Guardrails, Webhooks, and Time Machine rollbacks, the Pro tier is just $1.99/month.

You can grab it from the VS Code Marketplace here:
👉 Claude Auto-Accept on the Visual Studio Marketplace

Stop babysitting your AI. Let it work, so you can too. Let me know what you think in the comments, and I'd love to hear feature requests!

Top comments (0)