Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>LLM Auto ConfirmNew to Visual Studio Code? Get it now.
LLM Auto Confirm

LLM Auto Confirm

sudoghut

|
95 installs
| (0) | Free
Auto-confirm permission prompts for LLM coding assistants (Claude Code, Aider, Goose, Codex) in VS Code terminals and WebView panels
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LLM Auto-Confirm (VS Code Extension)

A VS Code extension that auto-confirms permission prompts for LLM coding assistants (Claude Code, Aider, Goose, Codex, etc.). Install and forget — no special setup required.

Compatibility

Terminal Mode (default, enabled by default)

Reads terminal output via the VS Code Terminal Shell Integration API, matches prompts with regex, and sends the appropriate response to the specific terminal. This is the primary and most reliable mode.

The status bar toggle now switches between two runtime states without dropping terminal attachments:

  • Active: prompt matches are auto-confirmed.
  • Observe Only: prompt matches are logged, but no text is sent back to the terminal or WebView.

Testing status: Only Claude Code and Codex have been tested at the code level against the actual CLI prompts. Rules for Aider, Goose, and the WebView entries below are written from each tool's documented prompt format but have not been verified end-to-end. Treat them as best-effort starting points — if a rule misfires or fails to match, please open an issue.

Tool Terminal Command Prompt Rule Response Status
Claude Code claude (?:Allow\|approve\|Do you want\|proceed\?)[\s\S]*?\d+\s*\.?\s*Yes 1 (auto-newline) Verified (tested)
Claude Code claude Save file to continue[\s\S]*?\d+\s*\.?\s*Yes 1 (auto-newline) Verified (tested)
Claude Code claude (?:❯\|›\|>)\s*\d+\s*\.? (interactive list cursor) Enter Verified (tested)
Codex CLI codex Allow command\? Enter Verified (tested)
Aider aider (?:[\[\(]\s*y\s*\/\s*n\s*[\]\)]\|\(y\)es\|\(n\)o) y + Enter Untested
Goose goose Fallback patterns 1 Untested
Any CLI tool User-configured User-configured promptRules User-configured Extensible

The Y/n rule requires bracket or parenthesis wrapping ([y/n], (y/N), (y)es/(n)o) to avoid misfiring on prose that contains a bare y/n.

Key: Any LLM tool that runs in the terminal and prompts via text output can be supported by adding a promptRule.

WebView Mode (experimental, opt-in, default off)

Calls known VS Code commands exposed by LLM extensions. This mode has significant limitations because most extensions handle permission prompts inside their webview and do not expose per-prompt approval commands.

Testing status: None of the WebView integrations below have been tested at the code level — the command IDs come from each extension's published manifest but the wiring has not been exercised end-to-end. If you rely on WebView mode, treat it as experimental and please report what works.

Extension VS Code Command What It Does Limitation
Kilo Code kilo-code.toggleAutoApprove Enables auto-approve mode (one-shot) Toggles a mode, not per-prompt; untested
Kilo Code kilo-code.acceptInput Accepts pending input Untested
Claude Code claude-vscode.acceptProposedDiff Accepts editor diff proposals Does NOT approve webview tool-use prompts; untested
Cline cline.approveTask Approves pending task Untested (not installed)
Roo Code roo-cline.approveTask Approves pending task Untested (not installed)
Codex (none) — No approval commands exposed

Recommendation per tool:

Tool Best Approach
Claude Code Use terminal mode (claude CLI) — tested. WebView acceptProposedDiff only handles editor diffs.
Codex Use terminal mode (codex CLI) — tested. Or use Codex's own --full-auto flag. WebView has no commands.
Kilo Code WebView mode wires toggleAutoApprove but is untested — treat as experimental.
Cline / Roo Code WebView mode may work (untested).
Aider / Goose Use terminal mode (untested but rules are wired up). These are terminal-only tools.

How It Works

Terminal Mode

  1. The extension listens for terminal commands matching LLM tool patterns (e.g., claude, aider).
  2. When detected, it streams the terminal output using VS Code's Terminal Shell Integration API.
  3. It matches the output against promptRules (checked in order; first match wins).
  4. When a prompt matches, it sends the rule's configured response to that specific terminal in Active mode, or logs a suppressed match in Observe Only mode.
  5. Dangerous commands (e.g., rm -rf /) are automatically blocked.

No CDP, no special flags, no mouse/keyboard interference — it only writes to the target terminal via the VS Code API.

WebView Mode

  1. On startup, discovers which LLM extensions are installed by scanning registered VS Code commands.
  2. Periodically calls the discovered approval commands via vscode.commands.executeCommand.
  3. Each command only fires when its specific extension's webview tab is visible (tab label matching).
  4. User-configured commands are validated against an allowlist of known extension prefixes.

No OS-level keystroke simulation, no shell execution, no command injection risk.

Setup

Install from Marketplace

Search for "LLM Auto Confirm" in the VS Code Extensions view, or install from the Visual Studio Marketplace.

The extension is enabled by default (terminal mode). Just install and use your LLM tool as usual.

Install from Source

cd vscode-extension
npm install
npm run compile

Then press F5 to run in development mode, or package it:

npx vsce package
code --install-extension llm-auto-confirm-0.6.4.vsix

Usage

  1. Install the extension
  2. Open a terminal in VS Code
  3. Run your LLM tool (e.g., claude, aider)
  4. Permission prompts are automatically confirmed

Use the status bar item to switch between Active and Observe Only. It does not stop monitoring. Use the Command Palette Start / Stop commands only when you want to fully start or stop monitoring.

Requirements

  • VS Code 1.93+ (for Terminal Shell Integration API)
  • Shell integration must be enabled (it is by default)

Configuration

Terminal Settings

Setting Default Description
llmAutoConfirm.enabled true Start monitoring on startup (status bar still lets you pause auto-confirm into Observe Only mode)
llmAutoConfirm.commandPatterns ["claude", "aider", "goose", "codex"] Command patterns to monitor in terminals
llmAutoConfirm.confirmResponse "1" Fallback text to send when no prompt rule matches
llmAutoConfirm.cooldown 1000 Cooldown (ms) after confirming before checking again
llmAutoConfirm.promptPatterns (see below) Fallback regex patterns for permission prompts
llmAutoConfirm.promptRules (see below) Rules with per-pattern responses (checked first)
llmAutoConfirm.dangerousCommandPatterns ["rm -rf /", ...] Patterns for commands to never auto-approve
llmAutoConfirm.debug false Enable verbose debug logging (raw terminal output, match details)

WebView Settings

Setting Default Description
llmAutoConfirm.webviewAutoConfirm false Enable command-based WebView auto-confirm (experimental)
llmAutoConfirm.webviewPollInterval 3000 How often (ms) to attempt the approval command
llmAutoConfirm.webviewApprovalCommands [] Additional VS Code command IDs to try (user entries checked first)

Built-in commands for Kilo Code, Claude Code (diff only), Cline, and Roo Code are always included. User-configured commands are validated against an allowlist of known LLM extension prefixes. Add custom entries for other extensions:

{
  "llmAutoConfirm.webviewApprovalCommands": [
    { "name": "My Extension", "command": "myext.approveAction" }
  ]
}

Default Prompt Rules

[
  {
    "name": "Claude Code (numbered prompt)",
    "pattern": "(?:Allow|approve|Do you want|proceed\\?)[\\s\\S]*?\\d+\\s*\\.?\\s*Yes",
    "response": "1",
    "addNewline": "auto"
  },
  {
    "name": "Claude Code (save file prompt)",
    "pattern": "Save file to continue[\\s\\S]*?\\d+\\s*\\.?\\s*Yes",
    "response": "1",
    "addNewline": "auto"
  },
  {
    "name": "Claude Code (interactive list cursor)",
    "pattern": "(?:\\u276F|\\u203A|>)\\s*\\d+\\s*\\.?",
    "response": "",
    "addNewline": true
  },
  {
    "name": "Codex (selection list)",
    "pattern": "Allow command\\?",
    "response": "",
    "addNewline": true
  },
  {
    "name": "Y/n prompt (Aider, etc.)",
    "pattern": "(?:[\\[\\(]\\s*y\\s*\\/\\s*n\\s*[\\]\\)]|\\(y\\)es|\\(n\\)o)",
    "response": "y",
    "addNewline": true
  }
]

addNewline values:

Value Behavior
true Append a newline after response (sends response + Enter).
false Send response only — no Enter.
"auto" Auto-detect: if the buffer shows an interactive list cursor (❯ / ›) on the matched option, only Enter is sent (the cursor already points at the choice); otherwise behaves like true (response + Enter).

Default Fallback Patterns

Used with confirmResponse when no promptRules match:

[
  "(?:Allow|Do you want).*(?:Yes|No)",
  "Save file to continue",
  "(?:[\\[\\(]\\s*y\\s*\\/\\s*n\\s*[\\]\\)]|\\(y\\)es|\\(n\\)o)"
]

You can add custom rules and patterns for other LLM tools.

Safety

  • Dangerous command blocking: Commands matching dangerousCommandPatterns are never auto-approved.
  • Status bar indicator: Shows whether monitoring is stopped, active, or in observe-only mode, plus the current mode label (Terminal / Terminal+WebView).
  • Output log: All actions are logged to the "LLM Auto-Confirm" output channel.
  • Observe-only toggle: Click the status bar item to pause auto-confirm while keeping terminal watchers attached.
  • Terminal-scoped: Only sends input to the specific terminal running the LLM tool. No keyboard/mouse interference.
  • WebView safety: Uses VS Code command API only — no OS-level input simulation, no shell execution, no command injection risk. User-configured commands are validated against an allowlist of known LLM extension prefixes. Each built-in command is bound to its extension's webview tab label, preventing cross-extension misfires.
  • Post-confirm cooldown: After each confirm, an 8-second cooldown prevents duplicate sends caused by TUI redraws.

Comparison with Python Script

Feature Python Script VS Code Extension
Technique Screenshot + OpenCV Terminal Shell Integration API
Mouse movement Briefly moves and restores None
Setup required Just run Just install (no special flags)
Works minimized No Yes
CPU usage Higher (screen capture) Minimal (event-driven)
Universality Any app on screen Terminal-based LLM tools in VS Code
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft