WebFetch domain permission not persisting when using 'Allow for all projects'
Bug Description
When Claude Code prompts to allow fetching a URL and the user selects "Yes, allow domain:xxx for all projects", the permission is not saved to ~/.claude/settings.json. The next time WebFetch is called for the same domain, it prompts again.
Steps to Reproduce
- Claude Code attempts to fetch a URL (e.g.,
https://www.softwarexp.com/blog/verkada-pricing) - The permission dialog appears with 3 options:
- Yes
- Yes, allow domain:www.softwa... for all projects
- No
- User selects option 2: "Yes, allow domain:www.softwa... for all projects"
- The fetch succeeds
- Later, Claude Code attempts to fetch another URL from the same domain
- The permission dialog appears again for the same domain
Expected Behavior
After selecting "allow domain for all projects", the entry WebFetch(domain:www.softwarexp.com) should be appended to ~/.claude/settings.json under permissions.allow, and subsequent fetches to the same domain should not prompt again.
Actual Behavior
The permission is not persisted to settings.json. Manually adding the entry to the file works correctly.
Environment
- OS: Windows 11 Pro 10.0.26200
- Shell: Git Bash (MINGW64)
- Claude Code: VSCode extension
- settings.json location:
C:\Users\Anderson\.claude\settings.json
Workaround
Manually edit ~/.claude/settings.json and add the domain entry:
"WebFetch(domain:www.softwarexp.com)"
Additional Notes
Other permission types (like Bash(...)) appear to save correctly via the same UI flow. The issue seems specific to WebFetch(domain:...) permissions. The settings.json file already contains several manually-verified WebFetch(domain:...) entries that were likely added through some other mechanism or older versions.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗