anthropics / anthropics/claude-code

[BUG] Scheduled Routine trigger fires on schedule but session doesn't execute until a browser tab is opened on it

Đang mở
#88,310 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:claude-code-web area:routines bug platform:web
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### 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 scheduled Routine (cron trigger) fires correctly server-side at its scheduled time, but the resulting session does not actually begin executing tool calls until a user manually opens the Routines page in the browser and clicks into that session. Until then it sits idle showing a persistent "needs attention" (yellow hand) icon, with no actual prompt, dialog, or approval request shown. Clicking into it starts execution immediately with no input required — confirming this isn't a permission gate, but the environment appears to stay cold until a live client connects and wakes it.

### What Should Happen?

A Routine scheduled via cron should execute fully unattended at its scheduled time and run to completion in the background, without requiring a user to open a browser tab and click into the session to "wake" it.

### Error Messages/Logs

```shell
No error message or dialog appears. The session simply shows a "needs attention" indicator with no explanation, and silently begins running only once opened.
```

### Steps to Reproduce

1. Create a Routine in claude.ai with a daily cron schedule (e.g. weekdays at a fixed UTC time) and at least one connector granted (e.g. Gmail).
2. Do not open the Routines page after the scheduled fire time.
3. Check back later — the session shows a "needs attention" icon, but no explicit approval request or error.
4. Click into the session — it starts executing immediately with no input from the user.
Note: a session fired manually via the API (force-run) instead of by the cron scheduler runs to completion on its own within about a minute, with no browser interaction needed — so the same session type CAN run fully unattended when woken via a live connection. It just doesn't self-wake on a pure cron fire with nobody watching.

### Claude Model

None

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.237

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

This is a claude.ai Routines/Cowork scheduling issue, not a local CLI bug — reproduction doesn't depend on OS or local environment.
Supporting evidence: trigger's last_fired_at timestamp matched the scheduled time exactly, but the session's actual tool-call activity didn't start until ~3.5 hours later, matching almost exactly when the user opened the Routines page. This defeats the purpose of "scheduled" execution, since the routine only reliably runs if a human happens to check in on it.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

No repository files, tests, or entry points are named. Reproduce the claude.ai Routines behavior by comparing a cron-triggered session with a force-run session, then verify that the scheduled run completes unattended without opening the browser.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
backend, cloud
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.