{"record":{"id":"49685dc134e38064","repo":"aaif-goose/goose","slug":"on-failure-command-failed-command-exited-wit","errorCode":null,"errorMessage":"On_failure command failed: command '{}' exited with status {}, stderr: {}","messagePattern":"On_failure command failed: command '(.+?)' exited with status (.+?), stderr: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/goose/src/agents/retry.rs","lineNumber":312,"sourceCode":"                );\n                warn!(\"{}\", error_msg);\n                return Err(anyhow::anyhow!(error_msg));\n            } else {\n                warn!(\"On_failure command execution error: {}\", e);\n                return Err(e);\n            }\n        }\n    };\n\n    if !output.status.success() {\n        let error_msg = format!(\n            \"On_failure command failed: command '{}' exited with status {}, stderr: {}\",\n            command,\n            output.status,\n            String::from_utf8_lossy(&output.stderr)\n        );\n        warn!(\"{}\", error_msg);\n        return Err(anyhow::anyhow!(error_msg));\n    } else {\n        info!(\"On_failure command completed successfully: {}\", command);\n    }\n\n    Ok(())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use crate::agents::types::SuccessCheck;\n\n    fn create_test_retry_config() -> RetryConfig {\n        RetryConfig {\n            max_retries: 3,\n            checks: vec![],\n            on_failure: None,\n            timeout_seconds: Some(60),","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose/src/agents/retry.rs#L294-L330","documentation":"Error \"On_failure command failed: command '{}' exited with status {}, stderr: {}\" thrown in aaif-goose/goose.","triggerScenarios":"Thrown at crates/goose/src/agents/retry.rs:312 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}