claude-code - 💡(How to fix) Fix Granting a permission from the VS Code extension requires hand-editing JSON

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

In the Claude Code VS Code extension, granting Claude a new permission (e.g. allowing git push) requires the user to manually edit .claude/settings.local.json and add a correctly-quoted Bash glob entry to a JSON array. There is no in-extension "Allow this once / always" approval flow.

Root Cause

The cognitive cost of the decision ("yes, I trust this command") is one bit. The cognitive cost of the implementation (JSON syntax, escape characters, Bash glob format, file path knowledge) is substantial. The mismatch creates friction on the exact action the permission system is meant to facilitate: a user saying yes.

RAW_BUFFERClick to expand / collapse

Summary

In the Claude Code VS Code extension, granting Claude a new permission (e.g. allowing git push) requires the user to manually edit .claude/settings.local.json and add a correctly-quoted Bash glob entry to a JSON array. There is no in-extension "Allow this once / always" approval flow.

What I expected

When the agent is denied permission for a command, the extension should surface a one-click approval that writes the corresponding rule to my settings file for me — analogous to how a browser prompts for camera or location permission.

What actually happens

  1. The agent is denied (e.g. git push origin main)
  2. The agent suggests adding an entry like "Bash(git push origin main:*)" to .claude/settings.local.json
  3. Pasting the snippet from chat into the editor mangles the quotes (the paste arrives pre-escaped as "\"Bash(...)\"..."), producing invalid permission rules
  4. The agent itself cannot edit .claude/settings.local.json because the auto-mode classifier blocks self-modification
  5. The user is left hand-typing JSON to grant a single permission

Why this matters

The cognitive cost of the decision ("yes, I trust this command") is one bit. The cognitive cost of the implementation (JSON syntax, escape characters, Bash glob format, file path knowledge) is substantial. The mismatch creates friction on the exact action the permission system is meant to facilitate: a user saying yes.

Suggested fix

When permission is denied, show an in-UI button like "Allow git push origin main:* for this project" or "Allow once" that calls into the harness to write the rule (the harness layer is above the self-modification classifier, so it can perform the write the agent cannot).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Granting a permission from the VS Code extension requires hand-editing JSON