[BUG] bypassPermissions not working on Windows/WSL — still prompts for Edit/Write
Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 4 comments · opened Mar 23, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
defaultMode: "bypassPermissions" in ~/.claude/settings.json is ignored when running Claude Code on Windows with WSL paths (\wsl.localhost\Ubuntu\...). Claude Code still prompts for permission on every Edit() and Write() call.
Environment
- OS: Windows 11 Pro (10.0.26200) with WSL2 Ubuntu
- Claude Code: latest
- Working directory:
\wsl.localhost\Ubuntu\home\dev\Code
Configuration (~/.claude/settings.json)
{
"permissions": {
"defaultMode": "bypassPermissions"
},
"skipDangerousModePermissionPrompt": true
}
Steps to Reproduce
- Set
defaultMode: "bypassPermissions"in global settings - Open Claude Code in a WSL directory
- Ask Claude to create or edit any file
- Permission prompt appears despite bypass mode
Related Issues
- #18187 (closed as NOT PLANNED by bot, no Anthropic response)
- #29574 (duplicate)
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Dealt with this same thing — spent way too long trying every combination of
bypassPermissions,Edit(*),dontAsk, etc. None of it works because the protection is hardcoded for certain paths. See #37516.Ended up finding that
PreToolUsehooks actually run before the hardcoded check, so you can short-circuit it. Here's what I landed on:~/.claude/hooks/approve-edits.sh:Then register it in
settings.json:The thing that surprised me — hooks override the hardcoded protection, not just user-configured permissions. Exit 0 with no JSON output just falls through to the normal prompt, so anything you don't explicitly match stays protected.
Not a proper fix but it works. Hopefully proper path-level permissions show up eventually.
This was fixed in v2.1.105 — bypassPermissions mode now applies to files on
\\wsl$\and\\wsl.localhost\paths instead of falling back to per-edit prompts. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.