aaif-goose/goose · error · anyhow::Error

Failed to set provider on sub agent: {}

Error message

Failed to set provider on sub agent: {}

What it means

Error "Failed to set provider on sub agent: {}" thrown in aaif-goose/goose.

Source

Thrown at crates/goose/src/agents/subagent_handler.rs:149

            ..
        } = params;

        let system_instructions = recipe.instructions.clone().unwrap_or_default();
        let user_task = recipe
            .prompt
            .clone()
            .unwrap_or_else(|| "Begin.".to_string());

        let agent = Arc::new(Agent::with_config(config));

        agent
            .update_provider(
                task_config.provider.clone(),
                task_config.model_config.clone(),
                &session_id,
            )
            .await
            .map_err(|e| anyhow!("Failed to set provider on sub agent: {}", e))?;

        for extension in &task_config.extensions {
            if let Err(e) = agent.add_extension(extension.clone(), &session_id).await {
                debug!(
                    "Failed to add extension '{}' to subagent: {}",
                    extension.name(),
                    e
                );
            }
        }

        let has_response_schema = recipe.response.is_some();
        agent
            .apply_recipe_components(recipe.response.clone(), true)
            .await;

        let subagent_prompt =
            build_subagent_prompt(&agent, &task_config, &session_id, system_instructions).await?;

View on GitHub (pinned to 3810898a74)

When it happens

Trigger: Thrown at crates/goose/src/agents/subagent_handler.rs:149 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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