{"record":{"id":"bd0199071e717f39","repo":"aaif-goose/goose","slug":"prompt-not-found","errorCode":null,"errorMessage":"Prompt '{}' not found","messagePattern":"Prompt '(.+?)' not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/goose/src/agents/agent.rs","lineNumber":3713,"sourceCode":"        if let Some(extension) = prompts\n            .iter()\n            .find(|(_, prompt_list)| prompt_list.iter().any(|p| p.name == name))\n            .map(|(extension, _)| extension)\n        {\n            return self\n                .extension_manager\n                .get_prompt(\n                    session_id,\n                    extension,\n                    name,\n                    arguments,\n                    CancellationToken::default(),\n                )\n                .await\n                .map_err(|e| anyhow!(\"Failed to get prompt: {}\", e));\n        }\n\n        Err(anyhow!(\"Prompt '{}' not found\", name))\n    }\n\n    pub async fn get_plan_prompt(&self, session_id: &str) -> Result<String> {\n        let tools = self\n            .extension_manager\n            .get_prefixed_tools(session_id, None)\n            .await?;\n        let tools_info = tools\n            .into_iter()\n            .map(|tool| {\n                ToolInfo::new(\n                    &tool.name,\n                    tool.description\n                        .as_ref()\n                        .map(|d| d.as_ref())\n                        .unwrap_or_default(),\n                    get_parameter_names(&tool),\n                    None,","sourceCodeStart":3695,"sourceCodeEnd":3731,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose/src/agents/agent.rs#L3695-L3731","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["List available prompts first (the /prompts command or list_prompts) and use an exact name","Enable the extension that provides the prompt via 'goose configure'","Check spelling and case — matching is exact on prompt.name"],"exampleFix":"// before\nagent.get_prompt(session_id, \"codeReview\", json!({})).await?; // Err: Prompt 'codeReview' not found\n\n// after\nagent.get_prompt(session_id, \"code_review\", json!({})).await?; // exact name from /prompts","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"// Rust — narrow on the prompt actually existing before fetching it\nasync fn prompt_exists(agent: &Agent, session_id: &str, name: &str) -> bool {\n    agent.extension_manager\n        .list_prompts(session_id, CancellationToken::default())\n        .await\n        .map(|ps| ps.iter().any(|(_, list)| list.iter().any(|p| p.name == name)))\n        .unwrap_or(false)\n}","tryCatchPattern":"// Rust — treat not-found as an empty result rather than an error\nmatch agent.get_prompt(session_id, name, args).await {\n    Ok(result) => Some(result),\n    Err(e) if e.to_string().contains(\"not found\") => None,\n    Err(e) => return Err(e),\n}","preventionTips":["Always list prompts (/prompts) before referencing a name","Remember prompts live on enabled extensions — enabling/disabling changes the catalogue","Match prompt names exactly (case-sensitive)"],"tags":["prompts","not-found","extensions"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}