claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] VSCode Extension Ignores All Permission Settings

Open slinktaylor opened this issue 11 months ago • 1 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary

The Claude Code VSCode extension does not read or respect any permission settings from settings files, despite documentation stating settings are shared between CLI and extension.

Environment

  • OS: macOS Darwin 24.6.0
    • VSCode Extension: Claude Code for VS Code (anthropic.claude-code)
      • Extension Version: 2.0.75
        • CLI Version: 2.0.53

Expected Behavior

Permission settings in ~/.claude/settings.json and .claude/settings.json should be respected by the VSCode extension, auto-approving commands in the allow list and blocking commands in the deny list.

Actual Behavior

The VSCode extension prompts for permission on EVERY bash command regardless of settings configuration. Neither allow rules nor deny rules have any effect.

Files Tested

  • ~/.claude/settings.json (global user settings) ❌ Not read
    • .claude/settings.json (project settings) ❌ Not read
      • .claude/settings.local.json (local project settings) ❌ Not read
        • VSCode settings.json with claudeCode.* keys ❌ Not read

Additional Observations

  • CLI claude in terminal) correctly reads and respects these same settings files
    • The extension appears to use default "prompt for everything" behavior
      • No combination of settings files or VSCode settings changes this behavior
        • Restarting VSCode, creating new chat instances, etc. have no effect

What Should Happen?

Permission settings in ~/.claude/settings.json and .claude/settings.json should be respected by the VSCode extension:

  • Commands in the "allow" list should be auto-approved without prompting
    • Commands in the "deny" list should be blocked
      • The claudeCode.allowDangerouslySkipPermissions VSCode setting should bypass permission prompts when set to true
        • Settings from CLI should be shared and honored by the VSCode extension as documented

Steps to Reproduce

  1. Create ~/.claude/settings.json with permission rules
    1. Create .claude/settings.json in project with same content
    1. Completely quit and restart VSCode
    1. Open new Claude Code chat
    1. Ask Claude to run a bash command (e.g., eb --version) Expected: Command runs without prompt (if in allow list) or is blocked (if in deny list) Actual: Extension prompts "Allow this bash command?" regardless of settings

Impact

  • Users cannot configure autonomous workflows in VSCode
    • Every bash command requires manual approval
      • Significantly impacts productivity for trusted development environments
        • Documentation claims settings are shared but they are not

Workaround

Use CLI in terminal instead of VSCode extension (CLI correctly reads settings)

Error Messages/Logs


Steps to Reproduce

  1. Create ~/.claude/settings.json with:
  2. {
  3. "permissions": {
  4. "allow": ["Bash", "Edit", "Write"],
    
  5. "deny": ["Bash(rm -rf:*)"]
    
  6. }
  7. }
  8. Create .claude/settings.json in project with same content
  9. (Optional) Create .claude/settings.local.json in project with same content
  10. (Optional) Add to VSCode settings.json:
  11. {
  12. "claudeCode.allowDangerouslySkipPermissions": true
  13. }
  14. Completely quit and restart VSCode
  15. Open new Claude Code chat
  16. Ask Claude to run any bash command (e.g., "run eb --version") Expected Result: Command runs without prompt (or is blocked if in deny list)

Actual Result: Extension prompts "Allow this bash command?" despite settings configuration

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.75

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

slinktaylor avatar Dec 30 '25 05:12 slinktaylor

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/15551
  2. https://github.com/anthropics/claude-code/issues/13028
  3. https://github.com/anthropics/claude-code/issues/13827

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 30 '25 05:12 github-actions[bot]

GitHub Comment Draft for Issue #15772

Target Issue: https://github.com/anthropics/claude-code/issues/15772 Related Work Item: BUGFIX-003 Date Prepared: 2025-12-31


Comment Text

I can confirm this issue and have additional test findings that may help with diagnosis.

Environment

  • OS: Windows 11
  • VSCode Extension: Latest
  • Configuration Files Tested: .claude/settings.local.json, VSCode settings.json

Configuration That Doesn't Work

.claude/settings.local.json:

{
  "permissions": {
    "defaultMode": "dontAsk",
    "allow": [
      "Read(**)",
      "Glob",
      "Grep",
      "Task",
      "Bash(dir:*)"
    ],
    "deny": [
      "Read(.env)",
      "Read(.env.*)",
      "Read(secrets/**)",
      "Read(credentials.json)",
      "Read(.aws/**)",
      "Read(.git/config)",
      "Read(../**)"
    ]
  }
}

VSCode settings.json:

{
    "claudeCode.initialPermissionMode": "acceptEdits"
}

Test Results - Partial Functionality Found

✅ What WORKS (No prompts):

  • Read(**) tool - respects configuration correctly
  • Glob tool - respects configuration correctly
  • Grep tool - respects configuration correctly

❌ What DOESN'T WORK (Still prompts despite configuration):

  • ALL Bash commands - cat, ls, git status, pipelines, etc.
  • Write tool - creating new files
  • Edit tool - modifying existing files

Critical Finding: bypassPermissions Mode Also Fails

To verify this wasn't a configuration issue, I tested with VSCode initialPermissionMode set to "bypassPermissions", which according to the documentation should bypass ALL permission checks.

Result: Even with bypassPermissions mode enabled, Bash/Write/Edit operations STILL prompted for approval.

This strongly suggests the permission system for Bash/Write/Edit operations is not properly integrated with the configuration system at all.

Hypothesis

The VSCode extension appears to have two separate permission pathways:

  1. Read-type tools pathway (Read, Glob, Grep) - ✅ Correctly integrated with config system
  2. Bash/Write/Edit pathway - ❌ NOT integrated with config system, always prompts regardless of settings

Impact

The partial functionality (Read/Glob/Grep working) is valuable but doesn't eliminate the core friction - workflow automation with Bash commands and file modifications is still impossible without manual approval for each operation.

Additional Resources

I have comprehensive test documentation and can provide more details if helpful for debugging this issue.


Reported by: SpearIT Project Framework Team Date: 2025-12-31

elliottgaryusa avatar Dec 31 '25 18:12 elliottgaryusa

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 08 '26 14:01 github-actions[bot]