anthropics / anthropics/claude-code

[BUG] RemoteTrigger routine stalls silently after "Claude Code process started" — no tool calls, session stuck active/idle (same symptom as closed #54260)

Aperta
#87,904 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:routines bug has repro stale
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?

Same symptom as [#54260](https://github.com/anthropics/claude-code/issues/54260) ("Code Routines: cron fires but cloud containers never execute prompts"), closed as "not planned" in April 2026 — but still reproducing as of August 2026. That issue is locked to collaborators so I can't comment there directly; filing fresh with new reproduction evidence.

A RemoteTrigger routine reproducibly fails to execute its prompt. The cloud environment provisions correctly and the Claude Code process starts, but no further activity ever occurs — no tool calls, no completion, session stays in status: active / worker_status: idle indefinitely.

Reproduction (2/2 failures, 100% reproducible on this environment):

Trigger trig_01FcM49NKnk6GyUg36k5ghiu, scheduled run 2026-08-19 07:01:52 UTC
Session: cse_01FqfcpMh9deqNWd3TqaLfQS
Log stops after: [07:01:57.484088Z] env[info]: Claude Code process started
No events after that point.
Diagnostic re-test, trigger trig_01SxapPMmaoWUbdAvG5ssDst, fired 2026-08-19 09:06:21 UTC (same environment_id, same job_config)
Session: cse_01DBDPjLqzYZSeWMgTJDWxS6
Identical log pattern, stops after: [09:06:26.332504Z] env[info]: Claude Code process started
No events after that point.

Environment: env_01YD8XsmtTLiUrLkZumGrnUV

Expected: The prompt is processed, tools are called, the session completes.
Actual: Environment provisioning completes normally (sandbox allocated, environment initialized, Claude Code process started), then the session never progresses — no prompt processing, no tool calls, no error, no completion event.

Impact: A scheduled content-publishing routine that ran fine when created is now silently non-functional — nothing surfaces as an error, so the only way to detect the failure is checking the target system directly for missing output.

### What Should Happen?

The prompt should be processed and the routine should execute normally: the cloud container connects to Claude Code, the prompt is picked up, tool calls are made (reading/writing files, API calls as instructed in the routine's system prompt), and the session completes with a result — the same way it worked when this routine was first created and ran successfully.

Instead, the container provisions correctly and the Claude Code process starts, but execution never begins: no tool calls, no output, no error — the session just sits idle indefinitely.

### Error Messages/Logs

```shell
Run 1 (trig_01FcM49NKnk6GyUg36k5ghiu, session cse_01FqfcpMh9deqNWd3TqaLfQS):
[2026-08-19T07:01:52.122414Z] env[info]: Allocating sandbox
[2026-08-19T07:01:55.900773Z] env[info]: Environment runner started
[2026-08-19T07:01:56.020627Z] env[info]: Initializing environment
[2026-08-19T07:01:56.037281Z] env[info]: No sources configured
[2026-08-19T07:01:57.309694Z] env[info]: No setup script configured
[2026-08-19T07:01:57.435697Z] env[info]: Parallel initialization completed
[2026-08-19T07:01:57.451006Z] env[info]: Claude Code executor created
[2026-08-19T07:01:57.470225Z] env[info]: Starting Claude Code
[2026-08-19T07:01:57.484088Z] env[info]: Claude Code process started
— no further events —

Run 2 (trig_01SxapPMmaoWUbdAvG5ssDst, session cse_01DBDPjLqzYZSeWMgTJDWxS6):
identical pattern, stops after "Claude Code process started" at 09:06:26.332504Z
```

### Steps to Reproduce

1. Create a RemoteTrigger routine via POST /v1/code/triggers with job_config.ccr.environment_id set to an existing environment, session_context with model/allowed_tools/system_prompt/prompt, and a cron_expression.
2. Wait for the cron to fire (or trigger manually via the run action).
3. Check the run session log via GET /v1/code/sessions/{session_id}/events.
4. Observe: provisioning events complete normally, "Claude Code process started" logs, then no further events ever appear. Session status stays "active", worker_status "idle" indefinitely.

### Claude Model

Sonnet (default)

### Is this a regression?

I don't know

### Last Working Version

Unknown / N/A

### Claude Code Version

Unknown

### Platform

Other

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by reproducing the RemoteTrigger through POST /v1/code/triggers, then inspect the run with GET /v1/code/sessions/{session_id}/events and the manual run action. Trace the flow after the “Claude Code process started” event, using the two provided session logs as comparisons. Done means the prompt is processed, tool calls and output appear, and the session completes instead of remaining active and idle.

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

Valutazione

Stack tecnologico
python
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
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.