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

Run {run_id} revised draft failed step {pred_number}'s outpu

Error message

Run {run_id} revised draft failed step {pred_number}'s output schema (previous draft kept): {reason}

What it means

Error "Run {run_id} revised draft failed step {pred_number}'s output schema (previous draft kept): {reason}" thrown in zeroclaw-labs/zeroclaw.

Source

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

        // The re-draft is real work: hold an exec slot for its duration (the run
        // released its slot when it parked).
        self.reacquire_claim_on_resume(run_id)?;
        let ctx = super::capability::CapabilityContext {
            run_id: run_id.to_string(),
            sop_name: sop.name.clone(),
            step_number: pred_number,
            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}");
            }
        };

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Fix the schema violation reported in the reason and request another revision, or approve/edit the previous draft.

When it happens

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