Hmbown/CodeWhale · error

errors.join("; ")

Error message

errors.join("; ")

What it means

Rollback/cleanup aggregation during turn-start unwinding: several store removals failed and the individual errors are collected and joined with '; ' so no cleanup failure is swallowed when reporting the aborted turn.

Solutions

  1. Treat the joined error list as a diagnostic of which cleanup steps failed; remove the listed thread/turn/item/binding remnants manually if the store is inconsistent.
  2. Retry the operation once the named storage failures are resolved.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/tui/src/runtime_threads.rs:9196 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/1f02f87353ce4932. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/runtime_threads.rs:9196

        if let Some(item_id) = item_id
            && let Err(err) = self.store.remove_item(item_id)
        {
            errors.push(format!("remove item: {err}"));
        }
        if let Err(err) = self.store.remove_turn(turn_id) {
            errors.push(format!("remove turn: {err}"));
        }
        if let Some(operation_key_fingerprint) = operation_key_fingerprint
            && let Err(err) = self
                .store
                .remove_turn_operation_binding(operation_key_fingerprint)
        {
            errors.push(format!("remove turn operation binding: {err}"));
        }
        if errors.is_empty() {
            Ok(())
        } else {
            bail!(errors.join("; "))
        }
    }

    async fn emit_claimed_turn_started(
        &self,
        turn: &TurnRecord,
        user_item: Option<&TurnItemRecord>,
        kind: ClaimedTurnKind,
    ) {
        let start_payload = match kind {
            ClaimedTurnKind::Message => json!({ "turn": turn.clone() }),
            ClaimedTurnKind::Compaction => {
                json!({ "turn": turn.clone(), "manual_compaction": true })
            }
        };
        if let Err(err) = self
            .emit_event(
                &turn.thread_id,

View on GitHub (pinned to 73e0f67d83)