[BUG] Scheduled tasks prompt for permissions despite bypassPermissions defaultMode set in settings.json
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?
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_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗