claude-code - 💡(How to fix) Fix scheduled task with "bypass permissions" mode keeps prompting anyway [1 comments, 2 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#46224Fetched 2026-04-11 06:25:53
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Title: Bypass permissions mode does not bypass Write tool prompts for UNC / network paths in scheduled tasks

Body:

Description With "Allow bypass permissions mode" enabled in Settings → Code, and a scheduled task explicitly configured to use "bypass permissions" mode, Claude Code still presents an interactive Write permission dialog when the agent attempts to write to a UNC path (\server\share...). The yellow "Bypass permissions mode: Claude can take actions without asking, including modifying or deleting files" banner is displayed at the top of the running session at the time the prompt appears, confirming bypass mode is active.

This blocks unattended scheduled task execution against network shares — the entire reason bypass mode exists, as I understand it.

What Should Happen?

Creating a task with "bypass mode" selected should not halt work to prompt me to approve an action.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

Map a network share to a Windows drive letter (e.g. via net use A: \server\share /user:... /persistent:yes) In Claude Code, open a workspace from the network share and click Trust In Claude Code Settings → Code, enable "Allow bypass permissions mode" Create a scheduled task with permission mode set to "bypass permissions" Provide a prompt that asks the agent to use the Write tool to create a file at a UNC path (e.g. \server\share\subdir\test.json) Wait for the task to fire (do not lock the screen — separate issue: locked screen marks scheduled tasks as "skipped") Expected behavior The Write tool call completes silently, no permission dialog is shown. This is the documented behavior of bypass permissions mode.

Actual behavior A standard Write permission dialog appears with "Allow once / Deny" options and the task hangs indefinitely waiting for human input.

Environment

OS: Windows 11 Pro Claude Code: Microsoft Store packaged app, version Claude_1.1617.0.0_x64 Plan: Max Workspace path: \192.168.100.100\server\share (Samba share over SMB, port 445; WebClient service disabled) WorkspaceTrust: granted for the workspace Project-level .claude/settings.json exists with "Write" (unrestricted) User-level C:\Users\username.claude\settings.json exists with path-specific Write() glob patterns Same prompt works correctly when manually approved with "Allow once" buttons, so the issue is purely in the permission-bypass-evaluation path, not in the underlying file system access. However, repeated runs of the same task continue to ask for permission. Nothing sticks. Tried "auto mode" as well (re: https://www.anthropic.com/engineering/claude-code-auto-mode) and still prompts every run, nothing sticks.

Notes None of the following pre-approve the Write call in spawned scheduled-task sessions:

Workspace trust Project-level settings.json with "Write" (no glob) User-level settings.json with Write(\\server\path\**) glob patterns Per-task permission mode = "auto accept" (not directly tested in this run, but reported as failing in user discussions) Per-task permission mode = "bypass permissions" with the global "Allow bypass permissions mode" toggle ON (this report) Bypass mode is supposed to be the nuclear escape hatch and it's not. Either the bypass-mode evaluator has a special-case bug for UNC paths, or the "bypass" path doesn't reach the Write tool's permission gate at all in the scheduled-task code path.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

Claude_1.1617.0.0_x64

Platform

Other

Operating System

Windows

Terminal/Shell

Other

Additional Information

Using the claude code windows desktop app (no shells or terminals).

extent analysis

TL;DR

The issue can be worked around by re-examining the configuration of "bypass permissions mode" and ensuring that the UNC path is correctly trusted and configured in the project-level and user-level settings.

Guidance

  • Verify that the UNC path is correctly mapped and accessible outside of Claude Code to ensure the issue is not related to the network share configuration.
  • Review the project-level .claude/settings.json and user-level C:\Users\username\.claude\settings.json files to ensure that the "Write" permissions are correctly configured for the UNC path.
  • Test the "bypass permissions mode" with a local file path to determine if the issue is specific to UNC paths.
  • Consider testing with a different permission mode, such as "auto accept", to see if the issue is specific to "bypass permissions mode".

Example

No code example is provided as the issue appears to be related to configuration and settings rather than code.

Notes

The issue may be related to a special-case bug in the "bypass permissions mode" evaluator for UNC paths, or the "bypass" path may not be reaching the Write tool's permission gate in the scheduled-task code path. Further investigation is needed to determine the root cause.

Recommendation

Apply a workaround by re-configuring the "bypass permissions mode" and ensuring that the UNC path is correctly trusted and configured in the project-level and user-level settings, as the current configuration does not seem to be working as expected.

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