scheduled task with "bypass permissions" mode keeps prompting anyway

Resolved 💬 3 comments Opened Apr 10, 2026 by racquetballpro Closed Apr 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] 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).

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗