Hmbown/CodeWhale · error
Failed to steer turn: {error}
Error message
Failed to steer turn: {error} What it means
Wrapper error from steer_turn: the inner {error} is one of the bail! guards on the active-thread state (no active turn on the thread, turn_id mismatch, or interrupt already requested) or a failure sending/applying the steer operation to the engine. The message itself only labels the operation; the cause string identifies which precondition failed.
Source
Thrown at crates/tui/src/runtime_threads.rs:6252
let Some(active_turn) = active_thread.active_turn.as_mut() else {
bail!("No active turn on thread {thread_id}");
};
if active_turn.turn_id != turn_id {
bail!("Turn {turn_id} is not active on thread {thread_id}");
}
if active_turn.interrupt_requested {
bail!("Turn {turn_id} is stopping and cannot be steered");
}
active_thread.engine.clone()
};
touch_lru(&mut active.lru, thread_id);
engine
};
let permit = engine
.reserve_steer()
.await
.map_err(|error| anyhow!("Failed to steer turn: {error}"))?;
let now = Utc::now();
let item = TurnItemRecord {
schema_version: CURRENT_RUNTIME_SCHEMA_VERSION,
id: format!("item_{}", &Uuid::new_v4().to_string()[..8]),
turn_id: turn_id.to_string(),
kind: TurnItemKind::UserMessage,
status: TurnItemLifecycleStatus::Completed,
summary: summarize_text(&prompt, SUMMARY_LIMIT),
detail: Some(prompt.clone()),
metadata: None,
artifact_refs: Vec::new(),
started_at: Some(now),
ended_at: Some(now),
};
let receipt_rx = {
let mut active = self.active.lock().await;
let Some(active_thread) = active.engines.get(thread_id) else {View on GitHub (pinned to 0c42157ee5)
Solutions
- Read the inner error: 'No active turn', 'not active on thread', or 'stopping and cannot be steered' each mean the steer raced with turn completion or interruption — wait for the turn to finish or restart it
- Confirm the turn_id passed matches the turn currently running on that thread
- If the engine op failed, check engine logs and retry the steer once the turn state is consistent
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/tui/src/runtime_threads.rs:6252 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/364a3f0f8ea5d1eb.
Report an issue: GitHub.