{"record":{"id":"495e3df57d1912ef","repo":"zeroclaw-labs/zeroclaw","slug":"run-run-id-is-pending-at-gated-step-wait-for","errorCode":null,"errorMessage":"Run {run_id} is pending at gated step {}; wait for pending approval/checkpoint capacity and resolve the gate before advancing with sop_advance","messagePattern":"Run (.+?) is pending at gated step (.+?); wait for pending approval/checkpoint capacity and resolve the gate before advancing with sop_advance","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/sop/engine.rs","lineNumber":1860,"sourceCode":"\n        if self\n            .active_runs\n            .get(run_id)\n            .is_some_and(|run| run.status == SopRunStatus::Pending)\n            && pending_step_blocks_direct_advance(&sop, &current_step)\n        {\n            ::zeroclaw_log::record!(\n                WARN,\n                ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                    .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                    .with_attrs(::serde_json::json!({\n                        \"run_id\": run_id,\n                        \"step\": current_step.number,\n                        \"step_kind\": current_step.kind.to_string(),\n                    })),\n                \"SOP engine: advance_step rejected - pending run is blocked at a human gate\"\n            );\n            bail!(\n                \"Run {run_id} is pending at gated step {}; wait for pending approval/checkpoint \\\n                 capacity and resolve the gate before advancing with sop_advance\",\n                current_step.number\n            );\n        }\n\n        // Deterministic runs are driven through the dedicated piping path so the\n        // same `sop_advance` tool advances every execution mode.\n        if sop.execution_mode == SopExecutionMode::Deterministic {\n            if result.status == SopStepStatus::Failed {\n                self.record_step_result(run_id, result.clone())?;\n                return self.route_recorded_step(\n                    run_id,\n                    &sop,\n                    &current_step,\n                    SopStepStatus::Failed,\n                    true,\n                    Some(retry_input_value(","sourceCodeStart":1842,"sourceCodeEnd":1878,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/sop/engine.rs#L1842-L1878","documentation":"Error \"Run {run_id} is pending at gated step {}; wait for pending approval/checkpoint capacity and resolve the gate before advancing with sop_advance\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-runtime/src/sop/engine.rs:1860 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for pending approval/checkpoint capacity and resolve the gate before advancing with sop_advance."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}