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

Failed to render subagent system prompt: {}

Error message

Failed to render subagent system prompt: {}

What it means

Error "Failed to render subagent system prompt: {}" thrown in aaif-goose/goose.

Source

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

        .filter(super::reply_parts::is_tool_visible_to_model)
        .collect();
    render_template(
        "subagent_system.md",
        &SubagentPromptContext {
            max_turns: task_config
                .max_turns
                .expect("TaskConfig always sets max_turns"),
            subagent_id: session_id.to_string(),
            task_instructions: system_instructions,
            tool_count: tools.len(),
            available_tools: tools
                .iter()
                .map(|t| t.name.to_string())
                .collect::<Vec<_>>()
                .join(", "),
        },
    )
    .map_err(|e| anyhow!("Failed to render subagent system prompt: {}", e))
}

async fn get_final_output(agent: &Agent, has_response_schema: bool) -> Option<String> {
    if has_response_schema {
        agent
            .final_output_tool
            .lock()
            .await
            .as_ref()
            .and_then(|tool| tool.final_output.clone())
    } else {
        None
    }
}

#[expect(deprecated)]
pub fn create_tool_notification(
    content: &MessageContent,

View on GitHub (pinned to 3810898a74)

When it happens

Trigger: Thrown at crates/goose/src/agents/subagent_handler.rs:269 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/6a7154ab84e59ff5. Report an issue: GitHub.