anthropics / anthropics/claude-code

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

オープン
#88,310 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:claude-code-web 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?

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

領域
backend, cloud
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。