{"record":{"id":"40c17550b92b737c","repo":"aaif-goose/goose","slug":"on-failure-command-timed-out-after","errorCode":null,"errorMessage":"On_failure command timed out after {:?}: {}","messagePattern":"On_failure command timed out after (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/goose/src/agents/retry.rs","lineNumber":296,"sourceCode":"pub async fn execute_on_failure_command_with_timeout(\n    command: &str,\n    timeout: Duration,\n) -> Result<()> {\n    info!(\n        \"Executing on_failure command with timeout {:?}: {}\",\n        timeout, command\n    );\n\n    let output = match execute_shell_command(command, timeout).await {\n        Ok(output) => output,\n        Err(e) => {\n            if e.to_string().contains(\"timed out\") {\n                let error_msg = format!(\n                    \"On_failure command timed out after {:?}: {}\",\n                    timeout, command\n                );\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);","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose/src/agents/retry.rs#L278-L314","documentation":"Error \"On_failure command timed out after {:?}: {}\" thrown in aaif-goose/goose.","triggerScenarios":"Thrown at crates/goose/src/agents/retry.rs:296 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"}