Hmbown/CodeWhale · error · std::io::Error

hook helper did not finish within its timeout

Error message

hook helper did not finish within its timeout

What it means

Timeout guard in wait_for_helper_status (Windows/test path): the hook helper child process did not exit within the allotted timeout, so the helper is killed and reaped and a TimedOut io::Error is returned instead of waiting indefinitely.

Source

Thrown at crates/tui/src/hooks/executor.rs:1114

    if status.success() {
        Ok(())
    } else {
        Err(std::io::Error::other(format!(
            "taskkill exited with {status}"
        )))
    }
}

#[cfg(any(windows, test))]
fn wait_for_helper_status(
    child: &mut Child,
    timeout: Duration,
) -> std::io::Result<std::process::ExitStatus> {
    match child.wait_timeout(timeout)? {
        Some(status) => Ok(status),
        None => {
            let _ = kill_and_reap_immediate_child(child, HOOK_REAP_TIMEOUT);
            Err(std::io::Error::new(
                std::io::ErrorKind::TimedOut,
                "hook helper did not finish within its timeout",
            ))
        }
    }
}

fn kill_and_reap_immediate_child(child: &mut Child, timeout: Duration) -> bool {
    let _ = child.kill();
    matches!(child.wait_timeout(timeout), Ok(Some(_)))
}

/// Spawn a contained hook child.
///
/// Errors returned here are deliberately free of the hook command, the
/// resolved interpreter path, and the OS message: the caller turns them into a
/// user-visible "hook could not answer" receipt, and on Windows a raw spawn
/// error echoes the whole command line back. The detail is logged instead.

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Fix the hook helper to finish promptly or to honor cancellation.
  2. Increase the hook timeout configuration if the helper legitimately needs longer.
  3. Investigate the helper for deadlocks or blocking I/O (e.g. waiting on stdin or a lock).
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/tui/src/hooks/executor.rs:1114 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/b87ac38c13f3b230. Report an issue: GitHub.