zeroclaw-labs/zeroclaw · error · anyhow::Error

Run {run_id} re-draft failed (previous draft kept): {}

Error message

Run {run_id} re-draft failed (previous draft kept): {}

What it means

Error "Run {run_id} re-draft failed (previous draft kept): {}" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-runtime/src/sop/engine.rs:2922

            sop_location: sop.location.clone(),
        };
        let result = self.capabilities.execute_step(ctx, &step, piped);
        self.metrics.record_capability_executed(&sop.name);

        let output = match result {
            Ok(r) if r.success => match self.validate_step_output(&pred_step, &r.output) {
                Ok(()) => r.output,
                Err(reason) => {
                    self.release_claim_on_park(run_id);
                    bail!(
                        "Run {run_id} revised draft failed step {pred_number}'s output \
                         schema (previous draft kept): {reason}"
                    );
                }
            },
            Ok(r) => {
                self.release_claim_on_park(run_id);
                bail!(
                    "Run {run_id} re-draft failed (previous draft kept): {}",
                    r.error
                        .unwrap_or_else(|| "capability returned failure".to_string())
                );
            }
            Err(e) => {
                self.release_claim_on_park(run_id);
                bail!("Run {run_id} re-draft failed (previous draft kept): {e}");
            }
        };

        {
            let run = self
                .active_runs
                .get_mut(run_id)
                .ok_or_else(|| anyhow::Error::msg(format!("Active run not found: {run_id}")))?;
            if let Some(recorded) = run
                .step_results

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Check the re-draft failure detail; retry the revision or resolve with the kept previous draft.

When it happens

Trigger: Thrown at crates/zeroclaw-runtime/src/sop/engine.rs:2922 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/45e21e607d4c550f. Report an issue: GitHub.