Scheduled tasks ignore permissionMode: "auto" on macOS — both per-task and global settings overridden at runtime
Summary
Scheduled tasks created with permission mode "auto" still prompt for tool approvals at runtime, defeating unattended execution. The permission mode is saved correctly to disk; it's just not honored when the task fires. Global defaultMode: "dontAsk" and a populated allow list in ~/.claude/settings.json are also ignored — only the per-task approvedPermissions array survives.
Environment
- Plan: Max
- Model: Sonnet 4.6 (also reproduces on Opus 4.7)
- Claude Code version: 2.1.121
- OS: macOS 15.3 (Darwin 25.3.0)
Saved config (correct)
~/Library/Application Support/Claude/claude-code-sessions/<workspace>/scheduled-tasks.json:
{
"id": "<task>",
"cronExpression": "10 9 * * 1-5",
"permissionMode": "auto",
"approvedPermissions": [ /* small allowlist */ ]
}
~/.claude/settings.json:
"permissions": {
"defaultMode": "dontAsk",
"allow": [ /* extensive allowlist covering tools the task uses */ ]
}
Repro
- Create a scheduled task via the UI with permission mode set to "auto".
- Confirm
permissionMode: "auto"is persisted inscheduled-tasks.json. - Optionally also set
defaultMode: "dontAsk"and anallowlist in user settings. - Wait for the task to fire (or trigger manually).
Expected
Tools execute without prompts. Task runs unattended.
Actual
Tools not in the per-task approvedPermissions array prompt for approval, including tools that are explicitly listed in the global allow list. Task hangs waiting for input.
Notes
- This is distinct from #41914 (Windows UNC paths) and #49273 (interactive sessions).
- Closed-as-duplicate #46224 reports the same root cause from another angle.
- The only approvals that survive runtime are the per-task
approvedPermissionsentries; everything else falls through as ifpermissionModewere"ask".
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗