Problem
AnthropicClaudeCodeAdapter's streaming generation path spawns its CLI child process directly via spawnDesktopProcess (~AnthropicClaudeCodeAdapter.ts:151) with its own close listener / readline loop — it does not go through the shared runCliProcess helper.
PR #276 added an idle/inactivity watchdog to runCliProcess (default 120s, re-armed on output → PROVIDER_TIMEOUT). That guards gemini generation + the two auth status callers, but not Claude Code streaming generation. So a wedged Claude Code process that never closes is bounded by neither the runner watchdog nor the chat-state clear (the placeholder isLoading is only cleared on terminal events that, by definition, never arrive for a hung process).
The chat-state fix in #276 still cures the common terminal-but-no-first-token case for Claude Code; this issue is specifically about the process-hang class.
Proposed direction
Bring AnthropicClaudeCodeAdapter's direct streaming spawn under the same idle/inactivity timeout discipline as the shared runner — either by routing it through a streaming-aware variant of runCliProcess, or by adding an equivalent re-armed idle watchdog to its own readline loop that surfaces PROVIDER_TIMEOUT.
Context
Problem
AnthropicClaudeCodeAdapter's streaming generation path spawns its CLI child process directly viaspawnDesktopProcess(~AnthropicClaudeCodeAdapter.ts:151) with its owncloselistener / readline loop — it does not go through the sharedrunCliProcesshelper.PR #276 added an idle/inactivity watchdog to
runCliProcess(default 120s, re-armed on output →PROVIDER_TIMEOUT). That guards gemini generation + the twoauth statuscallers, but not Claude Code streaming generation. So a wedged Claude Code process that never closes is bounded by neither the runner watchdog nor the chat-state clear (the placeholderisLoadingis only cleared on terminal events that, by definition, never arrive for a hung process).The chat-state fix in #276 still cures the common terminal-but-no-first-token case for Claude Code; this issue is specifically about the process-hang class.
Proposed direction
Bring
AnthropicClaudeCodeAdapter's direct streaming spawn under the same idle/inactivity timeout discipline as the shared runner — either by routing it through a streaming-aware variant ofrunCliProcess, or by adding an equivalent re-armed idle watchdog to its own readline loop that surfacesPROVIDER_TIMEOUT.Context
docs/review/pr271-chat-loading-state-2026-06-22.md(Future F1).