aaif-goose/goose · error

Failed to list recipes: {}

Error message

Failed to list recipes: {}

What it means

`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.

Source

Thrown at crates/goose-cli/src/commands/recipe.rs:106

            }
        },
        Err(err) => {
            writeln!(
                out,
                "{} Failed to encode recipe: {}",
                style("✗").red().bold(),
                err
            )?;
            Err(err)
        }
    }
}

pub fn handle_list(format: &str, verbose: bool) -> Result<()> {
    let recipes = match list_available_recipes() {
        Ok(recipes) => recipes,
        Err(e) => {
            return Err(anyhow::anyhow!("Failed to list recipes: {}", e));
        }
    };

    match format {
        "json" => {
            println!("{}", serde_json::to_string(&recipes)?);
        }
        _ => {
            if recipes.is_empty() {
                println!("No recipes found");
                return Ok(());
            } else {
                println!("Available recipes:");
                for recipe in recipes {
                    let source_info = match recipe.source {
                        RecipeSource::Local => format!("local: {}", recipe.path),
                        RecipeSource::GitHub => format!("github: {}", recipe.path),
                    };

View on GitHub (pinned to 3810898a74)

Solutions

  1. Read the embedded error text — it names the failing path/operation
  2. Fix ownership/permissions on recipe directories (e.g. `chown -R "$USER" ~/.config/goose/recipes`)
  3. Repair or remove the malformed recipe file identified by the error
  4. Retry the listing after the fix
Defensive patterns

Strategy: validation

Validate before calling

# Pre-flight recipe dirs before invoking list
for d in "$HOME/.config/goose/recipes"; do
  [ -r "$d" ] || echo "unreadable recipe dir: $d"
done

Prevention

When it happens

Trigger: 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.

Common situations: ~/.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.

Related errors


AI-assisted analysis of aaif-goose/goose@3810898a74 (2026-08-16). Data as JSON: /api/errors/4cb9b6a27118093e. Report an issue: GitHub.