Skip to content

Scheduled tasks hang forever: Bash commands with shell expansion get no permission suggestions, can never auto-approve, and exhaust active-session limits #68106

Description

@metrias-admin

Summary

In Claude Desktop's local scheduled tasks ([CCDScheduledTasks]), a Bash tool-permission request for any command containing shell expansion ($VAR, ${...}, $(...), backticks) arrives with no permission suggestions. Scheduled-task auto-approval matches suggestions against the task's stored approvals, so a suggestion-less request can never be auto-approved — the unattended session emits an interactive permission prompt nobody is present to answer and hangs indefinitely. Hung sessions keep counting toward the active-session limits, so subsequent scheduled fires are silently skipped (Skipping dispatch ... global_limit (active=3, limit=3) / per_task_limit), which cascades into all scheduled routines silently failing.

Environment

  • Claude Desktop (macOS) 1.12603.1
  • Bundled Claude Code CLI 2.1.170
  • macOS Darwin 25.4.0 (Apple Silicon)

Repro

  1. Create a local scheduled task whose work involves a Bash command with a shell variable, e.g. SLUG=/tmp/foo; find "$SLUG" -name '*.json' (any $VAR / $() form reproduces).
  2. Let it fire unattended.
  3. ~/Library/Logs/Claude/main.log shows:
    [CCDScheduledTasks] Not auto-approving "Bash" in scheduled task "<task>": no suggestions on request
    Emitted tool permission request <uuid> for Bash in session local_<id>
    
  4. The session freezes right after its first such tool_use (transcript stops growing; zero tool_results). It stays "active" indefinitely; later fires of any task are skipped with Skipping dispatch ... global_limit/per_task_limit.

Literal-only Bash commands in the same session log Auto-approved tool permission for "Bash" and proceed normally, and MCP tool requests carry suggestions normally (rule(s) not in stored approvals: ... (stored count=N)) — the gap is specific to expansion-bearing Bash commands.

Expected

Some combination of:

  • Generate at least an exact-command (or bare-Bash) suggestion for expansion-bearing commands so stored approvals can match, or
  • In scheduled/unattended sessions, deny-and-continue (so the model can adapt) instead of emitting an interactive prompt that can never be answered, and/or
  • A timeout on unanswered permission prompts in scheduled sessions so hung runs don't exhaust the active-session limits and silently block all other scheduled tasks.

Impact

One expansion-bearing Bash command in any scheduled task's flow silently kills that run and (via the active-session limits) starves every other scheduled task — with nothing surfaced in the UI. It took log forensics in main.log to distinguish this from a crash.

Activity

  1. added
    bugSomething isn't working
    has reproHas detailed reproduction steps
    area:routinesClaude Code routines on web, used for scheduled tasks, webhook-triggered tasks, etc.
    platform:macosIssue specifically occurs on macOS
    on Jun 13, 2026
  2. github-actions commented on Jul 25, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  3. github-actions commented on Sep 19, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  4. locked as resolved and limited conversation to collaborators on Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:basharea:permissionsarea:routinesClaude Code routines on web, used for scheduled tasks, webhook-triggered tasks, etc.bugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions