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

Bypass permissions mode: Claude refuses firewall/system changes on the user's own machine because Chrome-integration safety rules apply to all shell work

Open Hazron8 opened this issue 1 month ago • 3 comments

What happened

I run Claude Code in bypass permissions mode on my own Linux homelab box, specifically so Claude can administer it without me in the loop. Earlier sessions routinely made changes like per-IP firewall-cmd --add-rich-rule entries.

Now Claude refuses to add a narrow firewalld rule (one TCP port, three source IPs) and asks me to run the command myself, even after I explicitly ask it to. It cites a session safety rule against "modifying system or security settings," which says these actions stay prohibited even on explicit user request.

Those rules arrive with the Claude in Chrome integration, which is on by default. They're written for browser automation, but they're worded generally, so they also block ordinary shell administration that has nothing to do with the browser.

Expected

One of these:

  • Browser-automation safety rules scoped to browser actions.
  • Or bypass mode / user settings able to opt out of them for local system administration.

Repro

  1. Enable the Claude in Chrome integration (the default).
  2. Run claude --dangerously-skip-permissions in a terminal session.
  3. Ask Claude to add a firewall rule or change another local system or security setting on the machine.
  4. Claude declines and asks the user to run the command themselves.

Impact

Bypass mode's main use case, unattended administration of your own machine, silently regressed when the Chrome integration became the default, and behavior now differs between sessions.

Hazron8 avatar Oct 26 '26 15:10 Hazron8

Same here, in the Claude Code desktop app (macOS, Code tab, Opus 5.5, November 3, 2026). Both the built-in browser and Claude in Chrome are active in the session.

Setup: a home lab I own (a Windows laptop with a WSL2 Linux VM), administered from my Mac over SSH. In the same session Claude ran Docker, builds, tests and read the Windows event logs over SSH without any issue, but it refused, even after repeated explicit authorization, to:

  1. Add two iptables rules to the DOCKER-USER chain so containers on the lab VM can't reach my home LAN or my tailnet. This change hardens isolation.
  2. Disable "allow the computer to turn off this device" on the laptop's Wi-Fi adapter and set the wireless power mode to maximum performance, after the event log showed the driver dropping the machine off the network in the middle of a long download.

It cited the session safety rule that changes to system or security settings stay prohibited even on explicit user request, and said no setting can change that. The same assistant made comparable changes on the same laptop in sessions in September (paging file, services), so this looks like the same regression described here.

Impact: I set up SSH precisely to administer these machines remotely. When I'm away from the Mac, the only path left is pasting commands myself, which defeats the purpose of an agentic tool. A per-action confirmation (show the exact command, the user approves) or a user-level opt-out for local and SSH administration would keep the prompt-injection protection without blocking legitimate administration of machines the user owns.

Ebaoj avatar Nov 03 '26 14:11 Ebaoj

Same on Windows 11, in the Claude Code desktop app (Code tab, Fable 5.2, bypass permissions mode, Claude in Chrome connected), November 15, 2026.

I asked Claude to make my laptop keep running with the lid closed. It read the power settings and the event log, found the cause, and proposed the fix itself: one registry value (PlatformAoAcOverride) and four powercfg values. I approved it. Then it refused to apply its own proposal, citing a built-in rule against "Modifying system or security settings" that, it says, stays in force even when I explicitly ask. It handed me the commands to paste into an administrator terminal instead.

What is wrong with this:

  • It is my machine. I asked, I approved, and the session runs in bypass permissions mode. A rule that overrides all three is not a safety feature, it is the tool refusing its job.
  • It is inconsistent. In the same session Claude first offered to make the change, and only refused after I said yes. An earlier session refused to switch off Fast Startup the same way.
  • The rule is invisible. It is in no settings file I control, and the app has no switch for it. When I asked which rule it was and told Claude to change it, it could only say the rule is built in and that it did not know whether an opt-out exists.
  • The cost lands on me: every power, registry or system change now ends with "paste this yourself", which is exactly the work I use an agent to avoid.

Please do one of these:

  1. Scope the browser-automation safety rules to browser actions, so they stop blocking ordinary shell administration.
  2. Or add a documented setting that lets me allow system changes on my own machine, with a confirmation if you must.

And until then, have Claude say up front that it may not change system settings, instead of proposing a change, collecting my approval and then refusing.

NijikaKita avatar Nov 15 '26 23:11 NijikaKita

Adding a precise trigger and a workaround, from A/B tests on Windows 11 (CLI 2.1.322 to 2.1.327, 2026-11-18).

The block is not loaded by the integration being enabled. It is added when the Claude in Chrome tool schemas are loaded, and it then stays for the rest of the session.

Each test session was asked only whether its instructions contain a rule listing "Modifying system or security settings" as prohibited:

Session Rule present
claude -p --no-chrome no
claude -p (Chrome enabled by default in the config) no
claude -p --chrome (the Claude in Chrome section is present) no
claude -p --permission-mode auto no
claude --bg in a trusted project (Background Session and Claude in Chrome sections present) no
claude --bg --remote-control no
the same session, after ONE ToolSearch call with select:mcp__claude-in-chrome__tabs_context_mcp,mcp__claude-in-chrome__navigate,mcp__claude-in-chrome__computer,mcp__claude-in-chrome__read_page (no loaded tool was called) yes: a block opening "Your priority is to complete the user's request while following the safety rules below."
a fresh --bg session after loading only the Playwright plugin's tool schemas no
a parent session after one of its subagents loaded the Chrome tool schemas no (the subagent has the block, the parent does not)

What follows from that:

  • A long-running session that loaded the Chrome tools once keeps the block through compactions, even when those tools are listed as deferred again. Ours had carried it for days; the refusal that surfaced it was for starting a local PowerShell script from the shell, nothing to do with the browser.
  • Workaround until the scope is fixed: do browser work in a subagent or in a separate session. The main session's instructions stay unchanged. Starting the main session with --no-chrome makes that impossible to get wrong.

Suggested fix, in addition to the two in the issue: drop the block once the browser tools are no longer loaded, or scope the "Prohibited" list to actions taken through the browser tools.

Not isolated: which of the four tools is the trigger (they were loaded together).

Tested and written with Claude Code (Claude Fable 5.2) at the account owner's request; posted with their approval.

ashortdev avatar Nov 18 '26 18:11 ashortdev