{"record":{"id":"a089a13d776c10cb","repo":"zeroclaw-labs/zeroclaw","slug":"run-run-id-checkpoint-input-is-not-a-json-object","errorCode":null,"errorMessage":"Run {run_id} checkpoint input is not a JSON object; cannot amend field '{field}'","messagePattern":"Run (.+?) checkpoint input is not a JSON object; cannot amend field '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/sop/engine.rs","lineNumber":2743,"sourceCode":"        // Same step-1 mapping as `step_input_value`; `.last()` alone starved an\n        // intake-gate pipeline (checkpoint BEFORE the first work step) of its\n        // trigger payload.\n        let run = self\n            .active_runs\n            .get_mut(run_id)\n            .ok_or_else(|| anyhow::Error::msg(format!(\"Active run not found: {run_id}\")))?;\n        let mut piped = step_input_value(run, run.current_step);\n        // Operator amendment: replace the declared editable field BEFORE any run\n        // mutation, so a non-amendable input (pre-flighted by\n        // `can_amend_checkpoint`, so defensive here) leaves the run parked.\n        if let Some((field, text)) = amend {\n            match piped.as_object_mut() {\n                Some(map) => {\n                    map.insert(field, serde_json::Value::String(text));\n                }\n                None => {\n                    self.release_claim_on_park(run_id);\n                    bail!(\n                        \"Run {run_id} checkpoint input is not a JSON object; \\\n                         cannot amend field '{field}'\"\n                    );\n                }\n            }\n        }\n        let run = self\n            .active_runs\n            .get_mut(run_id)\n            .ok_or_else(|| anyhow::Error::msg(format!(\"Active run not found: {run_id}\")))?;\n        let prior_waiting_since = run.waiting_since.clone();\n        run.status = SopRunStatus::Running;\n        run.waiting_since = None;\n        match self.advance_deterministic_step(run_id, piped, None) {\n            Ok(action) => Ok(action),\n            Err(e) => {\n                // Defensive: the pre-flight above validated the same lookups under\n                // this lock, so this is unreachable in practice. If the advance","sourceCodeStart":2725,"sourceCodeEnd":2761,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/sop/engine.rs#L2725-L2761","documentation":"Error \"Run {run_id} checkpoint input is not a JSON object; cannot amend field '{field}'\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-runtime/src/sop/engine.rs:2743 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Amend only when the checkpoint input is a JSON object containing the named field."],"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"}