zeroclaw-labs/zeroclaw · error

last_draft_edit lock

Error message

last_draft_edit lock

What it means

Error "last_draft_edit lock" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-channels/src/slack.rs:751

    fn legacy_progress_event(text: &str) -> Option<ProgressEvent> {
        let line = text.trim().lines().last()?.trim();
        match line {
            line if line.starts_with('\u{1f914}') => Some(ProgressEvent::WaitingOnModel),
            line if line.starts_with('\u{23f3}') => Some(ProgressEvent::RunningTool),
            line if line.starts_with('\u{1f4ac}') => Some(ProgressEvent::Planning),
            line if line.starts_with('\u{2705}')
                || line.starts_with('\u{274c}')
                || line.starts_with('\u{270f}') =>
            {
                Some(ProgressEvent::Planning)
            }
            _ => None,
        }
    }

    fn progress_rate_limited(&self, message_id: &str) -> bool {
        let last_edits = self.last_draft_edit.lock().expect("last_draft_edit lock");
        last_edits.get(message_id).is_some_and(|last_time| {
            let elapsed_ms = u64::try_from(last_time.elapsed().as_millis()).unwrap_or(u64::MAX);
            elapsed_ms < self.draft_update_interval_ms
        })
    }

    fn record_progress_update(&self, message_id: &str) {
        self.last_draft_edit
            .lock()
            .expect("last_draft_edit lock")
            .insert(message_id.to_string(), Instant::now());
    }

    /// Hand `message_id` the current generation for `target`, displacing any
    /// older draft. Called when a draft is created for an Assistant thread.
    ///
    /// Claiming also repairs a target whose previous clear failed: the retained
    /// generation is replaced, and this turn's own terminal path clears the

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Restart the Slack channel process; a poisoned lock indicates a previous panic while holding it.
  2. Report a bug with the preceding panic backtrace so the underlying poisoning cause can be fixed.

When it happens

Trigger: Thrown at crates/zeroclaw-channels/src/slack.rs:751 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/e03b2b50b5144750. Report an issue: GitHub.