Hmbown/CodeWhale · error · anyhow::Error

turn interrupted

Error message

turn interrupted

What it means

Sentinel default for a turn that terminated with TurnTerminalStatus::Interrupted before completion but whose terminal event carried no explanatory error string. The turn was cut short mid-execution (e.g. by an interrupt signal) rather than failing a step, and the runtime supplied no further detail.

Source

Thrown at crates/app-server/src/lib.rs:1248

        match status {
            TurnTerminalStatus::Completed => Ok(json!({
                "thread_id": thread_id,
                "status": "accepted",
                "thread": Value::Null,
                "threads": [],
                "model": Value::Null,
                "model_provider": Value::Null,
                "cwd": Value::Null,
                "approval_policy": Value::Null,
                "sandbox": Value::Null,
                "events": [],
                "data": { "turn_id": turn_id },
            })),
            TurnTerminalStatus::Failed => Err(anyhow!(
                "{}",
                error.unwrap_or_else(|| "turn failed".to_string())
            )),
            TurnTerminalStatus::Interrupted => Err(anyhow!(
                "{}",
                error.unwrap_or_else(|| "turn interrupted".to_string())
            )),
            TurnTerminalStatus::Canceled => Err(anyhow!(
                "{}",
                error.unwrap_or_else(|| "turn canceled".to_string())
            )),
        }
    }

    async fn stream_turn_events<W: AsyncWrite + Unpin>(
        &self,
        thread_id: &str,
        turn_id: &str,
        response_id: &str,
        writer: &mut W,
        since_seq: u64,
    ) -> Result<(u64, TurnTerminalStatus, Option<String>)> {

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Re-issue the turn if the interruption was unintended
  2. Check whether a client or supervisor issued a cancel/interrupt for the session
  3. Review runtime logs to identify what interrupted the turn
  4. Retry after the interrupt source is removed
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/app-server/src/lib.rs:1248 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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