anthropics / anthropics/claude-code

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

オープン
#87,843 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:permissions area:skills bug platform:macos stale
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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

```shell
No stack trace available — the failure mode is a permission dialog ("Allow Claude to write .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//PKA/**)" to permissions.allow in both /.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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with the scheduled-tasks skill and compare an unattended run with the identical interactive Write call. Check the project-level and user-level settings.json permission rules and use mcp__scheduled-tasks__list_scheduled_tasks to confirm a single run; done means a matching Write rule is auto-approved in the scheduled-task context without the session going idle.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
authorization, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。