anthropics / anthropics/claude-code

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

Ouverte
#87,843 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area:permissions area:skills bug platform:macos stale
Langage dominant
Python
Étoiles
145k
Forks
23.1k
Métriques de merge des PR
Métriques de PR en attente

Description

### 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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
authorization, tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.