{"record":{"id":"4cb9b6a27118093e","repo":"aaif-goose/goose","slug":"failed-to-list-recipes","errorCode":null,"errorMessage":"Failed to list recipes: {}","messagePattern":"Failed to list recipes: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/goose-cli/src/commands/recipe.rs","lineNumber":106,"sourceCode":"            }\n        },\n        Err(err) => {\n            writeln!(\n                out,\n                \"{} Failed to encode recipe: {}\",\n                style(\"✗\").red().bold(),\n                err\n            )?;\n            Err(err)\n        }\n    }\n}\n\npub fn handle_list(format: &str, verbose: bool) -> Result<()> {\n    let recipes = match list_available_recipes() {\n        Ok(recipes) => recipes,\n        Err(e) => {\n            return Err(anyhow::anyhow!(\"Failed to list recipes: {}\", e));\n        }\n    };\n\n    match format {\n        \"json\" => {\n            println!(\"{}\", serde_json::to_string(&recipes)?);\n        }\n        _ => {\n            if recipes.is_empty() {\n                println!(\"No recipes found\");\n                return Ok(());\n            } else {\n                println!(\"Available recipes:\");\n                for recipe in recipes {\n                    let source_info = match recipe.source {\n                        RecipeSource::Local => format!(\"local: {}\", recipe.path),\n                        RecipeSource::GitHub => format!(\"github: {}\", recipe.path),\n                    };","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose-cli/src/commands/recipe.rs#L88-L124","documentation":"`goose recipe list` discovers recipes across its search paths via list_available_recipes(). Any I/O or parse failure encountered while scanning — unreadable directory, permission error, malformed recipe file — bubbles up and is wrapped with this message.","triggerScenarios":"Running `goose recipe list` when a recipe directory in the search path is unreadable (permissions/ownership), a recipe file fails to parse during discovery, or filesystem errors (broken symlinks, vanished paths) occur mid-scan.","commonSituations":"~/.config/goose/recipes containing root-owned files after running goose under sudo; partially written or corrupted recipe files; cloud-synced recipe dirs with transient I/O errors.","solutions":["Read the embedded error text — it names the failing path/operation","Fix ownership/permissions on recipe directories (e.g. `chown -R \"$USER\" ~/.config/goose/recipes`)","Repair or remove the malformed recipe file identified by the error","Retry the listing after the fix"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Pre-flight recipe dirs before invoking list\nfor d in \"$HOME/.config/goose/recipes\"; do\n  [ -r \"$d\" ] || echo \"unreadable recipe dir: $d\"\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never edit recipe directories as root","Keep recipes in version control to detect corruption early","Validate new recipe files before dropping them into the search path"],"tags":["recipe","filesystem","permissions","cli"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}