anthropics / anthropics/claude-code

[BUG] Schedule Cloud Task starts at scheduled time but doesn't continue to run until I open the scheduled task

未关闭
#90,119 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:routines bug platform:web
主要语言
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?

I have a Scheduled Task that runs in the cloud. (A morning briefing task where it reads my emails and calendars and tells me what's important. Then sends me an email with the briefing.)
It kicks off at the correct time (6:00 AM).
But it sits idle until I turn on my computer, open the scheduled task that's running / sitting idle.
Then it starts to run through the rest of the task and finishes within a few minutes.

Image

### What Should Happen?

It should
- ✅ kick off at 6:00 AM - this is working
- ❌ run through my tasks where it reads my emails, reads my calendar - doesn't run until I open the scheduled task
- ✅ draft and send an email - works fine after I open the scheduled task and it's able to get through the email and calendar tasks

### Error Messages/Logs

```shell
I asked Claude to look into why this is happening. This is the response:
That matches what I can see in the trigger's run history. The schedule itself fired right on time — 10:09 UTC, which is 6:09am Toronto — but the actual work (the Gmail/Calendar pulls) didn't start until around 12:40 UTC, and the run didn't finish until 12:46 UTC (8:46am). So there's a real ~2.5 hour gap between "the trigger fired" and "the session actually did anything," and it lines up with roughly when you'd have opened your computer.

That's a session-wake issue on the scheduled-task infrastructure, not a problem with how the trigger or the skill is configured — the cron is correctly set to `0 10 * * *` UTC (6am Toronto), and once it actually ran, everything worked normally. But I don't have visibility into why the cloud session sits idle after firing instead of immediately running, and it's not something I can fix from inside this session — it sounds like a platform behavior worth reporting through the feedback/thumbs-down channel so Anthropic's team can look at it, especially since you've now seen it happen more than once.

A couple of things I can do on my end:
- I noted this pattern in your Claude workflow memory so it's tracked if it keeps happening.
- If you want, I can also try nudging the trigger a bit earlier (e.g. set it for 5am instead of 6am) as a workaround so the briefing is more likely to have actually run by the time you're up — though that's a band-aid, not a fix.
```

### Steps to Reproduce

I run this scheduled task every day and it happens everyday where I don't receive the email briefing

### Claude Model

Sonnet (default)

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.247 (Claude Code)

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Non-interactive/CI environment

### Additional Information

_No response_

贡献指南

这个仓库没有索引到贡献指南

调研方向

No repository file or test is identified in the report. Start by reproducing the daily scheduled task and comparing the trigger time with the session's first work in its run history; done means the cloud session performs the email and calendar steps at the scheduled time and sends the briefing without opening the task.

由索引模型根据 Issue 内容生成。

评估

技术栈
cloud, macos
领域
backend, cloud
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。