anthropics / anthropics/claude-code

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

Abierto
#88,310 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:claude-code-web area:routines bug platform:web
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

### 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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
backend, cloud
Tipo de issue
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Activo
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.