Skip to content

[BUG] Scheduled tasks prompt for permissions despite bypassPermissions defaultMode set in settings.json #40470

Description

@certbetter

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?

Scheduled tasks (created via the scheduled-tasks MCP) prompt for tool permissions on each run, even when settings.json has "defaultMode": "bypassPermissions" and "skipDangerousModePermissionPrompt": true set globally.

Expected behavior

Scheduled tasks should respect the user's global permission settings and run unattended without prompting.

Actual behavior

Tasks like file reads/writes and bash commands trigger permission dialogs during scheduled runs, requiring manual approval each time making unattended automation impossible.

Steps to reproduce

Set "defaultMode": "bypassPermissions" in ~/.claude/settings.json
Create a scheduled task that performs file reads/writes
Let the task run on schedule
Permission prompt appears

Environment

Claude Code desktop app (Windows 11)
Claude Max 5x plan

What Should Happen?

Suggested fix

The remote scheduled task runner should inherit the account's defaultMode permission setting, or the update_scheduled_task tool should expose a permissionMode parameter so users can explicitly configure bypass for specific tasks.

Error Messages/Logs

Steps to Reproduce

Set "defaultMode": "bypassPermissions" in ~/.claude/settings.json
Create a scheduled task that performs file reads/writes
Let the task run on schedule
Permission prompt appears

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

v2.1.87

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions