claude-code - 💡(How to fix) Fix Feature request: disable suspiciousPathGuard for bypassPermissions users [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54927Fetched 2026-05-01 05:50:46
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Claude Code's "suspicious Windows path pattern" guard fires above defaultMode: bypassPermissions, requiring manual approval on every Read/Write/Edit/Bash tool call whose target path contains characters Claude Code's internal heuristic treats as suspicious (e.g., the tilde-digit form from 8.3 short-form paths such as USERNA~1 or MYDRIV~1, certain Unicode sequences, parentheses, drive letters in unusual contexts).

For users who have already opted into bypassPermissions and whose Windows username or path layout produces 8.3 short-form paths, this guard creates a hard wall: every single tool call prompts, defeating the purpose of bypass mode entirely. The user reports 100+ prompts per day on this exact pattern.

Root Cause

Claude Code's "suspicious Windows path pattern" guard fires above defaultMode: bypassPermissions, requiring manual approval on every Read/Write/Edit/Bash tool call whose target path contains characters Claude Code's internal heuristic treats as suspicious (e.g., the tilde-digit form from 8.3 short-form paths such as USERNA~1 or MYDRIV~1, certain Unicode sequences, parentheses, drive letters in unusual contexts).

For users who have already opted into bypassPermissions and whose Windows username or path layout produces 8.3 short-form paths, this guard creates a hard wall: every single tool call prompts, defeating the purpose of bypass mode entirely. The user reports 100+ prompts per day on this exact pattern.

Fix Action

Fix / Workaround

  • bypassPermissions is rendered useless on this machine.
  • Workarounds the user must adopt: NTFS junction (mklink /J C:\alias C:\Users\USERNA~1\...) or subst to expose a clean alias path. Both are OS-level workarounds the user shouldn't need.
  • Cumulative cost: hours per week lost to manual approval clicks. The user has flagged this as a critical workflow blocker.

Workaround currently being used

RAW_BUFFERClick to expand / collapse

Feature Request — disableSuspiciousPathGuard flag (or per-path opt-out)

Target repository: anthropics/claude-code Date drafted: 2026-04-30

Summary

Claude Code's "suspicious Windows path pattern" guard fires above defaultMode: bypassPermissions, requiring manual approval on every Read/Write/Edit/Bash tool call whose target path contains characters Claude Code's internal heuristic treats as suspicious (e.g., the tilde-digit form from 8.3 short-form paths such as USERNA~1 or MYDRIV~1, certain Unicode sequences, parentheses, drive letters in unusual contexts).

For users who have already opted into bypassPermissions and whose Windows username or path layout produces 8.3 short-form paths, this guard creates a hard wall: every single tool call prompts, defeating the purpose of bypass mode entirely. The user reports 100+ prompts per day on this exact pattern.

Reproduction

  1. Windows username with a parenthesis or other shell-fragile character (the parenthesis breaks cmd.exe and PowerShell scheduled-task argument parsing, so the user must use the 8.3 short form everywhere).
  2. User configures ~/.claude/settings.json with permissions.defaultMode: "bypassPermissions".
  3. User instructs the agent to use 8.3 short-form (C:\Users\USERNA~1\...) for every path operation to avoid the underlying shell-parsing bug.
  4. Result: every Read/Write/Edit/Bash that includes the 8.3 path prompts with "contains a suspicious Windows path pattern that requires manual approval."
  5. The "Always allow" action does not generalize across path strings — each new file produces a fresh prompt.

Impact

  • bypassPermissions is rendered useless on this machine.
  • Workarounds the user must adopt: NTFS junction (mklink /J C:\alias C:\Users\USERNA~1\...) or subst to expose a clean alias path. Both are OS-level workarounds the user shouldn't need.
  • Cumulative cost: hours per week lost to manual approval clicks. The user has flagged this as a critical workflow blocker.

Requested change

One of the following, in order of preference:

  1. permissions.disableSuspiciousPathGuard: true — top-level setting that disables the guard entirely for users who have opted into bypassPermissions.
  2. permissions.suspiciousPathAllowlist: ["C:\\Users\\USERNA~1\\**"] — pattern allowlist that suppresses the guard for matching paths.
  3. Resolve symlinks/junctions before guard check — would automatically allow users to escape via OS-level aliasing without requiring a settings change.
  4. Document the guard's exact triggers — at minimum, publish what character sequences activate it so users can avoid them in their own workflows.

Workaround currently being used

mklink /J C:\alias "C:\Users\USERNA~1\MYDRIV~1\Project" — junction at C:\alias so all subsequent operations reference the clean alias. Verified to bypass the guard if Claude Code resolves the surface path string rather than the canonical realpath. Path operations through the junction succeed without prompting; identical operations through the original 8.3 path prompt every time.

Why bypass-mode users want this

Users who have already taken the explicit step to enable bypassPermissions have made a considered tradeoff: faster workflow for known-trusted environments. A safety guard that overrides their explicit setting for paths their own filesystem produces without an opt-out flag is paternalistic. It should be possible to disable.


Filing instructions: submit at https://github.com/anthropics/claude-code/issues using gh issue create -R anthropics/claude-code -t "Feature: disable suspiciousPathGuard for bypassPermissions users" -F C:\codex\tmp\claude-code-feature-request-suspicious-path-guard.md. Or paste the body manually into a new issue on the repo.

extent analysis

TL;DR

Implement a permissions.disableSuspiciousPathGuard flag or a per-path allowlist to bypass the suspicious path guard for users who have opted into bypassPermissions.

Guidance

  • Consider adding a top-level permissions.disableSuspiciousPathGuard setting to disable the guard entirely for bypassPermissions users.
  • Alternatively, introduce a permissions.suspiciousPathAllowlist to suppress the guard for specific paths, such as C:\\Users\\USERNA~1\\**.
  • To verify the effectiveness of the proposed solution, test path operations with the disableSuspiciousPathGuard flag or allowlist enabled.
  • If implementing the suspiciousPathAllowlist, ensure that the allowlist patterns are properly escaped and matched to avoid unintended consequences.

Example

No code snippet is provided as the issue focuses on configuration changes rather than code modifications.

Notes

The proposed solution assumes that the bypassPermissions mode is intended to override the suspicious path guard. However, the exact behavior and implications of disabling the guard should be carefully evaluated to avoid introducing security vulnerabilities.

Recommendation

Apply a workaround by using the mklink /J command to create a junction, as described in the issue, until a permanent solution is implemented. This allows users to bypass the guard without requiring a settings change.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature request: disable suspiciousPathGuard for bypassPermissions users [1 participants]