tinyhumansai/openhuman · error · anyhow::Error

read stdout: {e}

Error message

read stdout: {e}

What it means

Reading from the claude child's stdout inside the TURN_TIMEOUT-bounded loop failed — the pipe errored (child died, descriptor closed). The timeout wrapper exists so a stuck CLI cannot block forever; this error is the read failing, not the timeout firing.

Source

Thrown at src/openhuman/inference/provider/claude_code/driver.rs:439

            if n == 0 {
                break;
            }
            acc.push_str(&String::from_utf8_lossy(&tmp[..n]));
            if acc.len() > 16_384 {
                acc.truncate(16_384);
            }
        }
        acc
    });

    // Wrap the streaming + wait in a timeout so a stuck CLI doesn't
    // block this task forever (PLAN §8).
    let timed = tokio::time::timeout(TURN_TIMEOUT, async {
        loop {
            let n = stdout
                .read(&mut buf)
                .await
                .map_err(|e| anyhow::anyhow!("read stdout: {e}"))?;
            if n == 0 {
                break;
            }
            for ev in parser.feed_bytes(&buf[..n]) {
                for delta in mapper.handle(ev) {
                    if let Some(tx) = ctx.stream {
                        let _ = tx.send(delta).await;
                    }
                }
            }
        }
        for ev in parser.end() {
            for delta in mapper.handle(ev) {
                if let Some(tx) = ctx.stream {
                    let _ = tx.send(delta).await;
                }
            }
        }

View on GitHub (pinned to 7491200858)

Solutions

  1. Check stderr captured alongside for the child's failure cause
  2. Retry the turn; abrupt child exits are often transient
  3. Update the claude CLI if crashes reproduce
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/inference/provider/claude_code/driver.rs:439 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/33e203ef1d4451c0. Report an issue: GitHub.