aaif-goose/goose · error
Failed to get prompt: {}
Error message
Failed to get prompt: {} What it means
Thrown when the prompt was located on an extension but ExtensionManager::get_prompt failed executing it. The '{}' is the underlying error: arguments not matching the prompt's input schema, the extension erroring while rendering the prompt, or a cancellation/timeout during the call. Discovery succeeded; execution failed.
Source
Thrown at crates/goose/src/agents/agent.rs:3710
.await
.map_err(|e| anyhow!("Failed to list prompts: {}", e))?;
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())View on GitHub (pinned to 3810898a74)
Solutions
- Check the embedded '{}' — schema mismatch errors usually name the expected argument
- Inspect the prompt's argument schema (prompts/list describes it) and pass exactly those fields/types
- Restart or fix the extension if it crashed mid-call
- Retry once — timeouts can be transient under load
Defensive patterns
Strategy: try-catch
Validate before calling
// Rust — validate arguments against the prompt's declared schema before calling
let prompts = agent.extension_manager
.list_prompts(session_id, CancellationToken::default()).await?;
let schema = prompts.iter().flat_map(|(_, ps)| ps.iter())
.find(|p| p.name == name)
.and_then(|p| p.arguments.clone().map(|a| serde_json::to_value(a).ok()).flatten());
// ensure every required argument key in `schema` is present in `arguments` Try / catch
// Rust — distinguish execution failure from not-found
match agent.get_prompt(session_id, name, args).await {
Ok(r) => Ok(r),
Err(e) if e.to_string().contains("Failed to get prompt") => {
// extension-level failure: restart/disable the extension, then retry once
Err(e)
}
Err(e) => Err(e),
} Prevention
- Pass exactly the arguments the prompt declares; do not invent extra fields
- Pin extension versions so prompt schemas do not drift
- Handle extension restarts gracefully in long-running sessions
When it happens
Trigger: Calling get_prompt with an arguments Value whose fields/types do not match the prompt's declared schema, or the extension process failing (crash, timeout, internal error) while producing the prompt.
Common situations: Passing extra/missing arguments to a parameterized prompt; schema drift after the extension updated its prompt definition; extension runtime bugs; long-running prompt generation hitting the timeout.
Related errors
- Failed to list prompts: {}
- Unsupported extension type for ACP: ${config.type}
- Prompt '{}' not found
- Resource '${fallbackUri}' returned no contents
- Failed to start extension: {}
AI-assisted analysis of aaif-goose/goose@3810898a74 (2026-08-16).
Data as JSON: /api/errors/14f9889608dca21f.
Report an issue: GitHub.