aaif-goose/goose · warning

Prompt '{}' not found

Error message

Prompt '{}' not found

What it means

Returned by Agent::get_prompt when no enabled extension exposes a prompt with the requested name: the scan over list_prompts found no match. It is a not-found condition — extension communication succeeded, the name simply does not exist in the session's enabled extension set.

Source

Thrown at crates/goose/src/agents/agent.rs:3713

        if let Some(extension) = prompts
            .iter()
            .find(|(_, prompt_list)| prompt_list.iter().any(|p| p.name == name))
            .map(|(extension, _)| extension)
        {
            return self
                .extension_manager
                .get_prompt(
                    session_id,
                    extension,
                    name,
                    arguments,
                    CancellationToken::default(),
                )
                .await
                .map_err(|e| anyhow!("Failed to get prompt: {}", e));
        }

        Err(anyhow!("Prompt '{}' not found", name))
    }

    pub async fn get_plan_prompt(&self, session_id: &str) -> Result<String> {
        let tools = self
            .extension_manager
            .get_prefixed_tools(session_id, None)
            .await?;
        let tools_info = tools
            .into_iter()
            .map(|tool| {
                ToolInfo::new(
                    &tool.name,
                    tool.description
                        .as_ref()
                        .map(|d| d.as_ref())
                        .unwrap_or_default(),
                    get_parameter_names(&tool),
                    None,

View on GitHub (pinned to 3810898a74)

Solutions

  1. List available prompts first (the /prompts command or list_prompts) and use an exact name
  2. Enable the extension that provides the prompt via 'goose configure'
  3. Check spelling and case — matching is exact on prompt.name

Example fix

// before
agent.get_prompt(session_id, "codeReview", json!({})).await?; // Err: Prompt 'codeReview' not found

// after
agent.get_prompt(session_id, "code_review", json!({})).await?; // exact name from /prompts
Defensive patterns

Strategy: type-guard

Type guard

// Rust — narrow on the prompt actually existing before fetching it
async fn prompt_exists(agent: &Agent, session_id: &str, name: &str) -> bool {
    agent.extension_manager
        .list_prompts(session_id, CancellationToken::default())
        .await
        .map(|ps| ps.iter().any(|(_, list)| list.iter().any(|p| p.name == name)))
        .unwrap_or(false)
}

Try / catch

// Rust — treat not-found as an empty result rather than an error
match agent.get_prompt(session_id, name, args).await {
    Ok(result) => Some(result),
    Err(e) if e.to_string().contains("not found") => None,
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling get_prompt with a misspelled or unknown prompt name; the extension that provides the prompt is not enabled for the session; the prompt was renamed in a newer extension version.

Common situations: Users typing /prompt names from memory or docs for another setup; disabling an extension and forgetting its prompts go with it; extension upgrades renaming prompts.

Related errors


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