{"record":{"id":"988f6a8b1ce22ce6","repo":"Hmbown/CodeWhale","slug":"turn-turn-id-is-stopping-and-cannot-be-steered","errorCode":null,"errorMessage":"Turn {turn_id} is stopping and cannot be steered","messagePattern":"Turn (.+?) is stopping and cannot be steered","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/runtime_threads.rs","lineNumber":6241,"sourceCode":"        let prompt = req.prompt.trim().to_string();\n        if prompt.is_empty() {\n            bail!(\"prompt is required\");\n        }\n\n        let engine = {\n            let mut active = self.active.lock().await;\n            let engine = {\n                let Some(active_thread) = active.engines.get_mut(thread_id) else {\n                    bail!(\"Thread is not loaded\");\n                };\n                let Some(active_turn) = active_thread.active_turn.as_mut() else {\n                    bail!(\"No active turn on thread {thread_id}\");\n                };\n                if active_turn.turn_id != turn_id {\n                    bail!(\"Turn {turn_id} is not active on thread {thread_id}\");\n                }\n                if active_turn.interrupt_requested {\n                    bail!(\"Turn {turn_id} is stopping and cannot be steered\");\n                }\n                active_thread.engine.clone()\n            };\n            touch_lru(&mut active.lru, thread_id);\n            engine\n        };\n\n        let permit = engine\n            .reserve_steer()\n            .await\n            .map_err(|error| anyhow!(\"Failed to steer turn: {error}\"))?;\n\n        let now = Utc::now();\n        let item = TurnItemRecord {\n            schema_version: CURRENT_RUNTIME_SCHEMA_VERSION,\n            id: format!(\"item_{}\", &Uuid::new_v4().to_string()[..8]),\n            turn_id: turn_id.to_string(),\n            kind: TurnItemKind::UserMessage,","sourceCodeStart":6223,"sourceCodeEnd":6259,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/runtime_threads.rs#L6223-L6259","documentation":"Steering guard in the steer path: the target turn is in the stopping state (an interrupt was already requested). Additional steering messages to a turn that is winding down would race the shutdown, so the request is rejected — steer an active turn or wait for the stop to complete.","triggerScenarios":"Thrown at crates/tui/src/runtime_threads.rs:6241 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the stop to complete","Then start a new turn with the follow-up prompt"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}