{"record":{"id":"b62115f92761726e","repo":"Hmbown/CodeWhale","slug":"e","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/core/src/engine/mod.rs","lineNumber":74,"sourceCode":"\n/// Handle to communicate with the core engine via the `Op`-in /\n/// `EventMsg`-out channels. The TUI's `EngineHandle` and the headless\n/// `exec` both hold this type; `handle.steer`, `cancel`, `approve_tool_call`\n/// etc are the same code path in both modes so `crates/execpolicy` stays\n/// the authority identically.\n#[derive(Clone)]\npub struct EngineHandle {\n    pub tx_op: mpsc::Sender<OpEnvelope>,\n    pub rx_event: Arc<tokio::sync::RwLock<mpsc::Receiver<EventMsg>>>,\n    cancel_token: Arc<StdMutex<tokio_util::sync::CancellationToken>>,\n}\n\nimpl EngineHandle {\n    pub async fn send(&self, op: OpEnvelope) -> anyhow::Result<()> {\n        self.tx_op\n            .send(op)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"{e}\"))?;\n        Ok(())\n    }\n\n    pub fn cancel(&self) {\n        self.cancel_with_reason(CancelReason::User);\n    }\n\n    pub fn cancel_with_reason(&self, _reason: CancelReason) {\n        if let Ok(token) = self.cancel_token.lock() {\n            token.cancel();\n        }\n    }\n\n    pub async fn steer(\n        &self,\n        thread_id: ThreadId,\n        content: impl Into<String>,\n    ) -> anyhow::Result<()> {","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/core/src/engine/mod.rs#L56-L92","documentation":"Error \"{e}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/core/src/engine/mod.rs:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}