anthropics / anthropics/claude-code

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

Ouverte
#89,135 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
area:routines bug has repro platform:web
Langage dominant
Python
Étoiles
145k
Forks
23.1k
Métriques de merge des PR
Métriques de PR en attente

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Domaine
api, backend, cloud
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
38/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.