[BUG] Scheduled task fires (lastRunAt updates) but no session is spawned

Resolved 💬 1 comment Opened Jun 29, 2026 by t07ebina-maker Closed Jun 29, 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 scheduled task's lastRunAt timestamp updates on each trigger, but no session is created, no files are written, and no PushNotification is sent. The task silently fails while appearing to have run successfully.

This was reproduced 3 consecutive times:

| # | Date (JST) | Trigger | lastRunAt updated | Session created | Files written | Notification |
|---|------------|---------|-------------------|-----------------|---------------|-------------|
| 1 | 2026-06-22 | Cron | Unknown (task was missing, recreated) | No | No | No |
| 2 | 2026-06-29 07:08 | Cron | Yes | No | No | No |
| 3 | 2026-06-29 08:10 | fireAt (immediate test) | Yes (2026-06-28T23:25:22.872Z) | No | No | No |

On attempt #3, update_scheduled_task with fireAt set to 2 minutes in the future was used to test immediately. The lastRunAt updated, confirming the trigger fired, but again no session was spawned.

What Should Happen?

  • A new session is spawned that executes the SKILL.md prompt.
  • The SKILL.md instructions are followed (files written, notifications sent).
  • lastRunAt reflects the execution time.

Error Messages/Logs

No error messages are surfaced. The task appears successful in `list_scheduled_tasks` because `lastRunAt` updated. This is the core problem — the failure is completely silent.

Steps to Reproduce

  1. Create a scheduled task via create_scheduled_task with a cron expression (e.g. 8 7 * * 1 for Monday 7:08 AM).
  2. Ensure the task's SKILL.md writes a file to disk and sends a PushNotification.
  3. Wait for the cron to fire (app must be open).
  4. After the expected fire time, call list_scheduled_taskslastRunAt will have updated.
  5. Check for session creation, file output, and notifications — none exist.
  6. Alternatively, use update_scheduled_task with fireAt set to 2 minutes in the future for immediate testing. Same result: lastRunAt updates, no session spawned.

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Desktop app, latest as of 2026-06-29

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • Platform: Windows 11 Pro 10.0.26200
  • Task cron: 8 7 * * 1 (Monday 7:08 AM local, Asia/Tokyo)
  • jitterSeconds: 456 (~7.6 min), which may be relevant.
  • The create_scheduled_task tool description states: "Scheduled tasks run while this app is open." The app was open and actively in use during all 3 attempts.
  • The task SKILL.md is valid and executes correctly when run manually in a normal session.
  • Workaround: Migrated the weekly task to a different automation system. The Claude Code scheduled task has been disabled (enabled: false) and retained only as a record.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗