anthropics / anthropics/claude-code

[BUG] Scheduled routine "Run Now" hangs at "Initialized session" — possible regression of #84271

Abierto
#89,135 1 comentario 0 reacciones 0 asignados Ver en GitHub
area:routines bug has repro 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?

Created a scheduled cloud routine (Claude Code Routines / RemoteTrigger API) with job_config.ccr.session_context.events containing one type: "user" message, and Gmail + Google Calendar MCP connectors attached. Running it (both via manual "Run Now" and the API run action) consistently produces a session that opens, shows "Initialized session," and then does nothing — no assistant turn, no tool call, no response to the prompt at all.

This looks like the same symptom as #84271 ("Cloud routine sessions 'Complete' without ever processing the initial prompt message"), which was closed without a resolution comment. Reproduced fresh today, so flagging in case it's a regression or the fix was incomplete.

### What Should Happen?

The scheduled routine should process the initial prompt message and actually execute — e.g. search Gmail/Calendar and produce the digest it was configured to generate — instead of idling indefinitely after "Initialized session."

### Error Messages/Logs

```shell
No error is shown — that's the problem. GET /v1/code/sessions/{id}/events shows only environment provisioning events (sandbox allocated, Claude Code process started), then nothing further. Both stuck sessions stayed at worker_status: idle for 45+ minutes with zero additional events.

Trigger: trig_01TpKG1YKz9yNg6nkLEahf7n
Stuck sessions: cse_01EggXthZPAMZN31DTMPf1am, cse_01RqeZ13BydGXewQytsvLqdd
Environment: env_01FekAh6dF6nYSuQQDrxV58R (Default)
Related: #84271 (closed, same symptom, no resolution noted)
```

### Steps to Reproduce

1. Create a routine via POST /v1/code/triggers with job_config.ccr.session_context.events containing one type: "user" message, and Gmail + Google Calendar MCP connectors attached.
2. Trigger action: "run" (also reproduced via the Routines page "Run Now" button).
3. Session opens, shows "Initialized session," and never progresses.

### Claude Model

Sonnet (default)

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

claude --version

### Platform

Other

### Operating System

Windows

### Terminal/Shell

PowerShell

### Additional Information

This bug is specifically about the claude.ai/code cloud routines feature (scheduled agents), not the local CLI — several fields above (OS, terminal, Claude Code version) may not be directly applicable since the failure happens in Anthropic's cloud dispatcher, not on my machine.
Platform is "Other" because this is via claude.ai's Routines/Claude Code cloud feature (claude.ai/code/routines), not direct Anthropic API usage.

Guía de contribución

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

Línea de trabajo

Start by reproducing the trigger through POST /v1/code/triggers and the Routines page “Run Now” action, then inspect GET /v1/code/sessions/{id}/events for the provisioning and initialization sequence. Done means the session processes the initial user message, performs the configured Gmail or Google Calendar tool call, and produces a response instead of remaining idle.

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

Evaluación

Área
api, backend, cloud
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.