anthropics / anthropics/claude-code

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

Aperta
#89,135 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
area:routines bug has repro platform:web
Lingua principale
Python
Stelle
145k
Fork
23.1k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
api, backend, cloud
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.