Hmbown/CodeWhale · error

{e}

Error message

{e}

What it means

Error "{e}" thrown in Hmbown/CodeWhale.

Source

Thrown at crates/core/src/engine/mod.rs:74

/// Handle to communicate with the core engine via the `Op`-in /
/// `EventMsg`-out channels. The TUI's `EngineHandle` and the headless
/// `exec` both hold this type; `handle.steer`, `cancel`, `approve_tool_call`
/// etc are the same code path in both modes so `crates/execpolicy` stays
/// the authority identically.
#[derive(Clone)]
pub struct EngineHandle {
    pub tx_op: mpsc::Sender<OpEnvelope>,
    pub rx_event: Arc<tokio::sync::RwLock<mpsc::Receiver<EventMsg>>>,
    cancel_token: Arc<StdMutex<tokio_util::sync::CancellationToken>>,
}

impl EngineHandle {
    pub async fn send(&self, op: OpEnvelope) -> anyhow::Result<()> {
        self.tx_op
            .send(op)
            .await
            .map_err(|e| anyhow::anyhow!("{e}"))?;
        Ok(())
    }

    pub fn cancel(&self) {
        self.cancel_with_reason(CancelReason::User);
    }

    pub fn cancel_with_reason(&self, _reason: CancelReason) {
        if let Ok(token) = self.cancel_token.lock() {
            token.cancel();
        }
    }

    pub async fn steer(
        &self,
        thread_id: ThreadId,
        content: impl Into<String>,
    ) -> anyhow::Result<()> {

View on GitHub (pinned to 8880682c63)

When it happens

Trigger: Thrown at crates/core/src/engine/mod.rs:74 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/b62115f92761726e. Report an issue: GitHub.