Skip to content
86% off$349 $48.86code BF2026

Guides

Claude in Chrome keeps asking to run JavaScript on localhost

Bypass permissions is on, yet Claude in Chrome still asks to run JavaScript on localhost. Why it happens, where to look for per-site grants, and what to test.

GuideUpdated 6 min read

On this page

You turned on Bypass permissions in Claude Code, yet every time Claude wants to run JavaScript on your local site in Chrome, it still asks you to confirm. With about 10 sessions open, that adds up to a lot of clicking.

This page rests on one report of the problem (last seen August 2026), from a desktop user in exactly that situation, plus the replies it got. We can't give you a verified click-by-click path. Where exact labels matter, we say so, and you will need to read your own screen.

Why Bypass permissions doesn't stop the JavaScript prompt

Two separate permission systems are involved, and they don't talk to each other as far as we can tell.

  1. Claude Code's permission mode. It governs what Claude Code does in your terminal session: running commands, editing files, using tools. Bypass permissions lives here.
  2. The Claude in Chrome extension's per-site permissions. The extension keeps its own record of which sites Claude may act on in the browser, including running JavaScript on a page.

People replying to the report said the prompt belongs to the extension and its per-site permissions, separate from Claude Code's mode. That matches the symptom: the mode is on and the prompt still appears. Toggling the mode off and on again won't change anything, because the prompt isn't coming from that layer.

LayerWhat it controlsDoes Bypass permissions affect it?
Claude Code permission modeCommands, file edits and tools in the sessionYes
Claude in Chrome per-site permissionsWhat Claude may do on each website in the browserNo, as far as we know

How to tell which layer is asking

  • If the confirmation appears in your terminal and mentions a command or a file edit, it is Claude Code. Check your permission mode.
  • If the confirmation concerns running JavaScript on a page and is tied to a website, it is the browser side. That is the case this page covers.
  • If you are unsure, note the exact wording and where it appears. You will need it if you report the problem later.

Look for the per-site grant with /chrome

The replies pointed to two places: the /chrome command in Claude Code, and the extension's own settings. Neither route is verified by us, so treat the steps below as a way to look, not a guaranteed fix.

  1. In a Claude Code session, type /chrome and press Return.
  2. Look for an option to manage permissions. The label may differ between versions, so read the menu instead of hunting for specific wording.
  3. Find the entry for your local site. If the menu lets you set it to allow, do that.
  4. Run the same task again and see whether the prompt still appears.

You can also try the extension itself. We don't have a verified path to its settings screen, so open the extension from Chrome's toolbar and look for a permissions or site settings area.

Test localhost and 127.0.0.1 separately

localhost and 127.0.0.1 are different hostnames, even though they usually reach the same dev server. A grant for one may not cover the other. We haven't confirmed how the extension matches sites, and we don't know whether the port matters.

  1. Open your app in Chrome using localhost (with your port) and run the task. Note whether it asks.
  2. Open the same app using 127.0.0.1 and run the same task. Note whether it asks.
  3. Compare the results with what the permissions list shows for each hostname.
  4. Use whichever hostname is allowed, consistently, from then on.

If you run several dev servers on different ports, test each one instead of assuming a single grant covers them all. Using one hostname everywhere is the simplest way to avoid approving the same site twice.

Reducing the clicks while there is no known switch

We know of no setting that turns the JavaScript confirmation off globally, and our sources don't mention one. Until that changes, the realistic options are small:

  • Make the site match once. Settle on one hostname and one port per project so a single grant, if you can create one, covers it.
  • Avoid renaming local URLs. Switching between localhost, 127.0.0.1 and a custom local hostname multiplies the prompts.
  • Batch browser work. If you have many sessions asking at once, group the browser-touching tasks into fewer sessions so you approve fewer times.
  • Check again after updating. The report is from August 2026. The extension may have changed since, and the menu may look different from what the replies described.

If it still asks

SymptomLikely causeWhat to do
Prompt appears on one address onlyDifferent hostnameCheck the address bar and the permissions list for every local hostname your app uses
Local site isn't in the listNo entry exists and there is no Add actionRe-check the list after your next approval; otherwise report it
You keep changing the Claude Code modeWrong placePer-site permissions live in /chrome or the extension, not in the mode
Menu looks different from the steps aboveNewer extension versionRead your own menu; the report may predate changes

Checklist before you report it

  • Bypass permissions is on in Claude Code, and the prompt text mentions running JavaScript in the browser.
  • You opened /chrome and looked at the permissions list.
  • You tested both localhost and 127.0.0.1, with the port you actually use.
  • You noted which hostnames, if any, appear in the list.
  • You updated the Claude in Chrome extension and Claude Code to their latest versions.

If nothing works

Contact Anthropic through the support channel in your Claude account, or the feedback option in Claude Code. Include the exact prompt text, the hostname and port you use, what the permissions list shows, and the versions of Claude Code and the extension. A message you can adapt:

text
Claude in Chrome asks me to confirm running JavaScript on my local dev site even though Claude Code has Bypass permissions enabled.

Site: localhost:3000 (also tested 127.0.0.1:3000)
Permissions list in /chrome shows: [paste what you see]
Claude Code version: [version]
Claude in Chrome version: [version]
Steps tried: /chrome > manage permissions, allowed the site if offered, tested both hostnames.

Is there a setting to skip this confirmation for local sites, or a way to add a site to the permissions list?

Common questions

Is this a bug in Claude Code?

Probably not. Replies attributed the prompt to the Chrome extension's own permission model, which is separate from Claude Code's modes. Whether the extension should honor Bypass permissions is a question for Anthropic.

Will allowing localhost also allow 127.0.0.1?

We don't know. They are different hostnames and a grant may be matched per hostname, so test both rather than assuming.

Does the port number matter?

Our sources don't say. If you use several ports, test each one after granting.

Can I stop the prompts across all my sessions at once?

Permissions look to be kept per site in the extension, so a grant may apply to every session using that site in the same browser. We haven't confirmed this, so check it after you set a grant.

Every app.
One purchase.