[BUG]Scheduled task stalls indefinitely on Write permission prompt despite matching allow rule (settings.json correct)

Status Open
Reported on v2.1.179
Maintainer reply None cached
Activity 2 comments · opened Aug 19, 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?

A custom scheduled task repeatedly triggers a Write tool permission dialog even though the target path is explicitly covered by an allow rule in permissions.allow in both the project-level and user-level settings.json. On most mornings a human was present to click "Allow" manually, but on 2026-08-19 nobody was present in time and the session went idle instead of completing. task stalls indefinitely on Write permission prompt despite matching allow rule (settings.json correct)

What Should Happen?

The Write call should be auto-approved by the matching allow rule, exactly as it is in an interactive session with identical settings — the same call, run manually afterward with the same config, completed with zero prompts.

Error Messages/Logs

No stack trace available — the failure mode is a permission dialog ("Allow Claude to write <file>.md?") followed by the session state changing to "Connection went idle" with no further output.

Steps to Reproduce

1.Create a scheduled task (via the scheduled-tasks skill) that writes files under a project directory, e.g. ~/PKA/Obserwacje/*.md.
2.Add "Write(/Users/<user>/PKA/**)" to permissions.allow in both <project>/.claude/settings.json and ~/.claude/settings.json (verified identical, no drift, no conflicting settings.local.json).
3.Let the scheduled task fire unattended (no interactive session open).
4.On several mornings (2026-08-01, 08-02, 08-03, 08-04, 08-05, 08-14, 08-19) the run stalls on a Write permission dialog for a path matched by the allow rule.
5.Run the identical Write call manually in an interactive session with the same settings — it completes with no prompt.
Note: duplicate/parallel task firing was ruled out via mcp__scheduled-tasks__list_scheduled_tasks (only one instance ran).

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.179 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Non-interactive/CI environment

Additional Information

This happens specifically in the scheduled-task execution context (Claude Code's own scheduled-tasks feature), not in an interactive terminal session — the same Write call in an interactive session with identical settings never prompts. macOS 26.5.2 (build 25F84), Darwin 25.5.0, arm64.

View original on GitHub ↗

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