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

[BUG] Permission approval UI not displayed - operations immediately rejected without user interaction

Open chatii opened this issue 2 months ago • 7 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?

When Claude Code attempts to perform operations that require user approval (file writes, git commands, etc.), the approval UI is not displayed to the user.

Instead, operations are immediately rejected with an error message like "Claude requested permissions to write to [file], but you haven't granted it yet." The system behaves as if the user has denied permission, but no approval prompt ever appears, making it impossible for users to grant permission for legitimate operations.

This affects:

  • Write tool (file creation)
  • Edit tool (file modification)
  • Bash tool (git commands and other operations not in the allow list)

The issue occurs even though permissionMode is set to "default", which should prompt for approval.

What Should Happen?

When Claude Code needs to perform an operation requiring approval:

  1. Claude executes a tool (e.g., Write, Bash with git command)
  2. System detects approval is needed
  3. Approval UI is displayed to the user (button/dialog to approve/deny)
  4. System waits for user response
  5. Operation proceeds or is cancelled based on user decision Instead, the current behavior skips steps 3-4 entirely and immediately returns an error.

Error Messages/Logs

Claude requested permissions to write to c:\Users\chatii\work\workdir\permission_test.txt, but you haven't granted it yet.


VSCode Output Panel log (relevant excerpt):

2025-10-12 01:46:31.918 [info] Spawning Claude with SDK query function - cwd: c:\Users\chatii\work\work-dir, permission mode: default, version: 2.0.14, c:\Users\chatii\.vscode\extensions\anthropic.claude-code-2.0.14\resources\claude-code\cli.js, resume: undefined
2025-10-12 01:46:31.918 [info] From claude: Spawning Claude Code process: node c:\Users\chatii\.vscode\extensions\anthropic.claude-code-2.0.14\resources\claude-code\cli.js --output-format stream-json --verbose --input-format stream-json --append-system-prompt ... --permission-prompt-tool stdio --permission-mode default --debug


DevTools Console log (filtered by "permission"):

{
    "type": "system",
    "subtype": "init",
    "permissionMode": "default",
    ...
}

{
    "type": "assistant",
    "message": {
        "content": [
            {
                "type": "tool_use",
                "id": "toolu_01W5vpZXN9t1hHW9WgfaqKVz",
                "name": "Write",
                "input": {
                    "file_path": "c:\\Users\\chatii\\work\\work-dir\\permission_test.txt",
                    "content": "Permission test file created at 2025-10-12\nThis file is for testing Claude Code's permission system.\n"
                }
            }
        ]
    }
}

{
    "type": "user",
    "message": {
        "role": "user",
        "content": [
            {
                "type": "tool_result",
                "content": "Claude requested permissions to write to c:\\Users\\chatii\\work\\work-dir\\permission_test.txt, but you haven't granted it yet.",
                "is_error": true,
                "tool_use_id": "toolu_01W5vpZXN9t1hHW9WgfaqKVz"
            }
        ]
    }
}


Note: There are no log entries showing an approval prompt being displayed or any user interaction request.

Steps to Reproduce

  1. Install Claude Code VSCode extension version 2.0.14 on Windows
  2. Open any project folder in VSCode
  3. Ensure .claude/settings.local.json has default permissions (not allowing all operations):
{
  "permissions": {
    "allow": [
      "Bash(sqlite3:*)"
    ],
    "deny": [],
    "ask": []
  }
}
  1. Open VSCode Developer Tools (Ctrl+Shift+I) and go to Console tab
  2. Start a Claude Code conversation
  3. Ask Claude to create a new file, for example: "Create a test file named test.txt with some content"
  4. Open the DevTools Console and filter by "permission"

Expected:

  1. An approval UI (button/dialog) appears asking to approve the file write operation
  2. User can click approve/deny
  3. Operation proceeds based on user choice

Actual

  1. No approval UI appears
  2. Operation immediately fails with error: "Claude requested permissions to write to [file], but you haven't granted it yet."
  3. DevTools shows the tool_result with is_error: true but no approval prompt logs

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.14

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

  • VSCode version:
バージョン: 1.105.0 (user setup)
コミット: 03c265b1adee71ac88f833e065f7bb956b60550a
日付: 2025-10-08T14:09:35.891Z
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
  • The flag --permission-prompt-tool stdio is present in the CLI invocation, suggesting approval prompts should use stdio communication
  • The issue appears to be in the VSCode extension's handling of stdio permission prompts from the CLI process

chatii avatar Oct 11 '25 17:10 chatii

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8460
  2. https://github.com/anthropics/claude-code/issues/5749
  3. https://github.com/anthropics/claude-code/issues/9189

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 Oct 11 '25 17:10 github-actions[bot]

I too am having this issue. I can't tell from the linked issues above if they are relevant to this as I'm very new to this utility.

Even with auto-edit enabled, Claude Code cannot use Web Fetch or WebSearch because permission to do so is never requested in the first place. It's automatically rejected. I see no way to force it to be enabled so this issue is very disruptive to my workflow.

Noxillio avatar Oct 14 '25 14:10 Noxillio

Confirming Same Issue on Windows

Environment

  • Platform: Windows 11 (Build 22631)
  • Claude Code: 2.0.25 (VSCode extension)
  • Shell: Git Bash (MINGW64_NT-10.0-22631, Msys 3.4.10)

Symptoms

Identical to original report.

  1. Claude states: "This command requires approval"
  2. No approval UI/prompt appears in the Claude Code window
  3. Claude then says: "Please approve this command" and waits indefinitely
  4. User has no way to approve or deny the command
  5. Session becomes stuck - only option is manual execution outside Claude

The approval detection logic works correctly, but the UI component never renders in VS Code on Windows.

  • ❌ No dialog box appears
  • ❌ No notification appears
  • ❌ No popup appears
  • NOTHING is displayed to the user

VSCode version

Version: 1.105.1 (user setup)
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.22631

minamikik avatar Oct 22 '25 02:10 minamikik

My extension just updated to 2.0.30 and I have modals now

keitharobertson avatar Oct 31 '25 19:10 keitharobertson

can't type in Claude after it opens :(

paydirt76 avatar Nov 03 '25 09:11 paydirt76

My extension just updated to 2.0.30 and I have modals now

Same issue again in 2.0.45. Worked fine until the update. I downgraded to 2.0.44 and it works fine in that version.

keitharobertson avatar Nov 18 '25 23:11 keitharobertson

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 19 '25 10:12 github-actions[bot]