zed-industries/zed · error · anyhow::Error
Unknown agent id {id:?}. Call `list_agents_and_models` to se
Error message
Unknown agent id {id:?}. Call `list_agents_and_models` to see the agents available for `create_thread`. What it means
Error "Unknown agent id {id:?}. Call `list_agents_and_models` to see the agents available for `create_thread`." thrown in zed-industries/zed.
Source
Thrown at crates/agent_ui/src/agent_panel.rs:4738
let agent_choice = match request.agent_id.as_deref() {
None => None,
Some(id) if id == agent::ZED_AGENT_ID.as_ref() => Some(Agent::NativeAgent),
Some(id) => {
// Reject unknown agent ids up front so the model gets a
// structured error pointing at `list_agents_and_models`,
// rather than a thread that silently fails to launch in
// the user's sidebar.
let known = panel
.read_with(cx, |panel, cx| {
let store = panel.project.read(cx).agent_server_store().clone();
store
.read(cx)
.external_agents()
.any(|known_id| known_id.0.as_ref() == id)
})
.unwrap_or(false);
if !known {
return Err(anyhow!(
"Unknown agent id {id:?}. Call `list_agents_and_models` \
to see the agents available for `create_thread`."
));
}
Some(Agent::Custom {
id: project::AgentId(id.to_string().into()),
})
}
};
let initial_content = AgentInitialContent::ContentBlock {
blocks: vec![acp::ContentBlock::Text(acp::TextContent::new(
request.prompt.clone(),
))],
auto_submit: true,
};
let title: SharedString = request.title.clone();View on GitHub (pinned to bc538def45)
When it happens
Trigger: Thrown at crates/agent_ui/src/agent_panel.rs:4738 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/8d8f628aa654740b.
Report an issue: GitHub.