[BUG] Browser pane per-action permission prompts never persist for non-localhost origins
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?
In the Claude Desktop Browser pane (embedded browser used by Claude's browser tools), per-action permission prompts ("Allow Claude to access," "Allow Claude to read the page," "Allow Claude to execute JavaScript," etc.) are supposed to be governed by a per-site "Allow site" setting, so that approving a site once stops future prompts for that site. This works correctly for localhost origins, but does not work for any other hostname — including hostnames that resolve to 127.0.0.1 via the local hosts file. On a non-localhost hostname, every single browser action re-triggers its own approval prompt, indefinitely, even after:
• Explicitly adding the exact host (with and without port) to the "Allow site" list multiple times
• Restarting Claude Desktop entirely
• Confirming via the site list UI that the host shows as allowed
Every single action on a non-localhost hostname re-triggers its own prompt, forever, regardless of prior approvals. localhost origins are unaffected and never prompt.
What Should Happen?
Once a site is approved (either via the prompt's "always allow"/persistent option, or via the "Allow site" settings list), subsequent actions on that same site should not re-prompt — matching the behavior already seen on localhost.
Error Messages/Logs
Steps to Reproduce
- Open the Browser pane and navigate to http://localhost:<port> — confirm no permission prompts occur across repeated navigate/read/click/type/JS actions.
- Navigate to a non-localhost hostname that resolves locally (e.g. via hosts file) to the same server, such as http://myhost.local:<port>.
- Approve the first "Allow Claude to access [site]" prompt.
- Perform a second, unrelated action on the same page/host (e.g. read the page, click something, run JavaScript).
- Observe that a new approval prompt fires for this new action, on the same already-approved host.
- Open the Browser pane's own "Allow site" settings screen — confirm the host is listed as allowed (possibly listed multiple times as duplicate entries from repeated approvals — see note below).
- Repeat steps 3–5 indefinitely — the prompt never stops recurring for this host, no matter how many times it's approved.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.46388.2.0
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
The "Allow site" list accumulates duplicate entries for the same hostname (e.g. the same hostname appeared 4 times in the list) rather than recognizing it's already present — suggesting the approval-write path isn't correctly checking/deduplicating against existing entries, which may be related to why the approval isn't being honored on read.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
This issue is DRIVING ME ABSOLUTLY MENTAL.
The workaround is to tell it "Use claude in chrome not the in-app browser" and it'll use the chrome extension JUST FINE without relentless never-ending approval prompts.
But you can put that in the CLAUDE.md and it'll ignore it sometimes, but also I kinda want it in app not external on chrome
Seeing the same thing on macOS, and I think I found where it goes wrong.
I run local Laravel sites through Herd on plain
http://*.test(they resolve to 127.0.0.1). When the browser pane opens one, I get the "This site is on a private network…" card and press Always allow. But every click or keystroke afterwards still asks: "Site-level permissions are disabled for this site. You'll be asked for each action." Only Deny and Allow once are offered. Switching to bypass permissions doesn't change anything.The app's own log (
~/Library/Logs/Claude/main.log) shows the Always allow being received, and then the very next click asking again:In
claude_desktop_config.json, the site lands inlaunchPreviewAllowedOriginsbut never inlaunchPreviewPrivateNetworkTrustedOrigins. As far as I can tell from the app code, the card's Always allow only adds the site to the allowed list. It even removes any existing trust for the site if it wasn't listed yet.What does work: adding the site by hand under Settings → Claude Code → Manage allowed sites…. That writes it to the trusted list, and after that clicks and typing go through without prompts:
Things I tried that didn't help: serving the site over HTTPS, and wildcard entries like
http://*.test, which seem to be matched literally.*.localhostdomains do work without any prompts, but Herd no longer supports switching to that suffix.So for now the workaround is to add every local site through Settings instead of pressing Always allow in the chat. It'd be great if the card's Always allow did the same thing the Settings panel does, or didn't show up when it won't stick.
Claude desktop 2.7032.0 (Claude Code 2.1.280), macOS 26.
Also using Herd with Laravel, but Allow list in settings does nothing here, never has.