tinyhumansai/openhuman · error · anyhow::Error
[claude_agent_sdk] subprocess timed out while waiting for ex
Error message
[claude_agent_sdk] subprocess timed out while waiting for exit
What it means
The claude_agent_sdk subprocess did not exit within the 30-second wait timeout after output reading completed — the process is hung. The sibling read path kills the child on timeout; this site surfaces the hang as an error so the caller's turn fails fast instead of blocking the task indefinitely.
Source
Thrown at src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs:221
}
}
}
anyhow::Ok(())
})
.await;
match read_result {
Ok(inner) => inner?,
Err(_) => {
let _ = child.kill().await;
anyhow::bail!("[claude_agent_sdk] subprocess timed out while reading output");
}
}
let status = timeout(Duration::from_secs(30), child.wait())
.await
.map_err(|_| {
anyhow::anyhow!("[claude_agent_sdk] subprocess timed out while waiting for exit")
})??;
let stderr_output = stderr_task.await.unwrap_or_default();
tracing::debug!("[claude_agent_sdk] subprocess exited status={}", status);
if let Some(err) = error_message {
anyhow::bail!("[claude_agent_sdk] error from claude CLI: {err}");
}
// Use the final result message if present; otherwise join streaming text parts.
let output = result_text
.filter(|s| !s.is_empty())
.unwrap_or_else(|| text_parts.join(""));
if !status.success() && output.is_empty() {
anyhow::bail!(
"[claude_agent_sdk] claude subprocess exited with non-zero status {} and no output; stderr={}",
status,
stderr_outputView on GitHub (pinned to 7491200858)
Solutions
- Treat the turn as failed and retry
- Check for a stuck claude subprocess and kill it
- Investigate CLI hangs (interactive prompt, blocked I/O) if recurrent
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs:221 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/d52273ba3e451d9e.
Report an issue: GitHub.