[BUG] Scheduled task execution ignores UI-configured permission mode and model settings
Status Open
Reported on v2.1.158
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 3 comments · opened Jul 21, 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?
Summary
When I configure a scheduled task's execution options in the app UI (permission mode set to "skip/bypass permissions" and model set to Claude Sonnet 5), those settings are not respected when the task actually runs. At execution time, the task instead runs with manual permission prompts and the Opus model, as if the UI settings were never saved or were reset before the run.
Environment
- OS: Windows 11 Pro (build 10.0.26200)
- Claude Code (app/CLI) version: [버전 확인 후 기입 — 프로그램 정보/도움말 메뉴에서 확인]
- Affected: multiple recurring scheduled tasks (4 different tasks) in the same project
Steps to reproduce
- Create a scheduled task in the app.
- In the task's settings UI, set permission mode to "skip permissions" (bypass/auto-approve) and model to Claude Sonnet 5.
- Save the settings.
- Let the scheduled task run automatically (or trigger it).
- Observe the actual run: it prompts for manual permission approval and/or runs on Opus instead of Sonnet 5.
Expected behavior
The scheduled task should run using the permission mode and model configured in the UI (skip permissions, Sonnet 5).
Actual behavior
The task reverts to manual permission approval and the Opus model, ignoring the saved configuration.
Additional context
- This is not a
.claude/settings.jsonallowlist issue — the fixed commands used by these tasks are already correctly allowlisted and pass without prompting when run manually/interactively. - The issue only appears at scheduled-task execution time, specifically with the permission-mode and model settings configured per-task in the UI.
- This happens consistently across multiple separate scheduled tasks, not a one-off.
- First observed: 2026-07-20.
What Should Happen?
한번 지정한 설정은 바뀌면 안된다.
Error Messages/Logs
오류출력은 없다, 지정한 설정이 자꾸 지정되지않은 디폴트값으로 회귀한다.
Steps to Reproduce
없음
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.158
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
3 Comments
Corroborating this — same bug, reproduced independently 3 separate times on my end (Windows 11 Pro, build 10.0.26200, Claude Code Desktop app), most recently with detailed timestamped evidence.
2026-08-20 (most detailed reproduction):
tool_useblock with its matchingtool_resultin the session's own JSONL transcript.local_<uuid>.jsonunder the app's session-storage folder) showedpermissionMode: "acceptEdits"when inspected afterward — i.e. it started in manual/default mode (not the "Bypass permissions" I had configured). At the time I wasn't sure whether that "acceptEdits" value reflected an automatic app escalation or my own manual fix; the 2026-08-21 update below confirms it's the latter.Also confirmed:
create_scheduled_task/update_scheduled_task(the in-app scheduled-task tools) expose no parameter to explicitly set the permission mode for the spawned session, so there's currently no user-facing workaround beyond being present to click through the first few prompts each morning.Update, 2026-08-21 — 4th reproduction: Explicitly set "Bypass permissions" the night before specifically to prevent a repeat. The next morning the scheduled run was stalled again; on opening the app the permission toggle was showing "manual", not what I'd set before sleeping — I witnessed this directly. The stalled call this time blocked ~35 minutes (2116s, measured the same way as before via the JSONL transcript). I clicked "Approve" on the pending prompt and manually switched the mode to "auto" myself — which also resolves an open question from my 2026-08-20 report above: the post-hoc
permissionMode: "acceptEdits"/"auto"value found in session metadata after these incidents is just my own manual fix being captured, not an automatic app escalation. The metadata file only ever shows current state, not history, so it can't be used to catch the reverted mode — only being there in real time can. 4 for 4 now, always the same shape: a permission mode explicitly configured before an unattended run does not carry over to the session the scheduler spawns.Happy to share more detail from the transcript/metadata analysis if useful for debugging.
Update, 2026-08-22 — 5th reproduction, strongest evidence yet: This time the stalled command wasn't an ad-hoc/unlisted one — it exactly matched a wildcard rule already in my project's allow-list (PowerShell($word = New-Object -ComObject Word.Application*)). The call still blocked for 3627.9s (~60.5 min), the session's very first PowerShell invocation. This shows the bug isn't "missing allow-list entry" but "the allow-list is bypassed entirely while the spawned session is in manual/default mode" — even a wildcard-matched, pre-approved command still needed a live human click. Confirmed via two independent analyses of the session's own JSONL transcript (tool_use/tool_result pairing across all 90 tool calls, and a type-agnostic timestamp-gap sweep across every log line) — both agree only this one call was a multi-minute outlier; the other 89 all completed in under 17 seconds. Also directly confirmed "permissionMode":"default" recorded in the session log both ~2 seconds after the scheduled task was enqueued and again ~76 minutes later, despite the project's permissions.defaultMode being set to "auto". 5 for 5 now.
Happy to share more detail from the transcript/metadata analysis if useful for debugging.
Corroborating on Windows 11 Desktop as well — same combined symptom (model + permission mode both revert), with a clean before/after timeline.
Setup: A daily recurring local scheduled task (git fetch/log across 3 repo clones, MCP reads, a Python SMTP send, a watermark-file update).
Timeline:
get_sessionthat it defaulted toclaude-opus-5and manual permission mode (every tool call prompted).get_sessionnow correctly showedmodel: "claude-sonnet-5", and the run completed with zero permission prompts (auto mode working as configured).claude-opus-5and manual mode — 12 separate approval prompts for otherwise-routine git/python calls, several of which had already been "Always Allow"-approved in the prior manual run.So the settings visibly took effect for one manual run, then silently reverted before the next scheduled fire — matching the "acceptEdits"/manual-mode-on-next-run pattern described above.
Additional data point, possibly related to #94455 / #90938: a general Bash wildcard rule added to
.claude/settings.json(e.g.Bash(git -C * fetch origin)) also did not suppress the re-prompts on the scheduled fire, even though the exact same command pattern ran cleanly (no prompt) during the manually-triggered runs. The scheduled-run prompts appear as structured/named tool descriptions (e.g. "Fetch exigo-platform from origin") rather than raw Bash command strings, which may be why settings.json's command-string matching doesn't apply to them.Between this and the several related issues (#78430, #91884, #94455, #90938), this looks like a systemic gap between how scheduled-task "Routine" config (model, permission mode, allow-rules) is persisted/applied versus how it's applied to interactive or manually-triggered runs — not a one-off. Happy to share full session IDs/timestamps if useful for debugging.