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)

オープン
#87,904 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:routines bug has repro stale
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api, backend, cloud
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。