{"record":{"id":"8d8f628aa654740b","repo":"zed-industries/zed","slug":"unknown-agent-id-id-call-list-agents-and-mod","errorCode":null,"errorMessage":"Unknown agent id {id:?}. Call `list_agents_and_models` to see the agents available for `create_thread`.","messagePattern":"Unknown agent id (.+?)\\. Call `list_agents_and_models` to see the agents available for `create_thread`\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/agent_panel.rs","lineNumber":4738,"sourceCode":"            let agent_choice = match request.agent_id.as_deref() {\n                None => None,\n                Some(id) if id == agent::ZED_AGENT_ID.as_ref() => Some(Agent::NativeAgent),\n                Some(id) => {\n                    // Reject unknown agent ids up front so the model gets a\n                    // structured error pointing at `list_agents_and_models`,\n                    // rather than a thread that silently fails to launch in\n                    // the user's sidebar.\n                    let known = panel\n                        .read_with(cx, |panel, cx| {\n                            let store = panel.project.read(cx).agent_server_store().clone();\n                            store\n                                .read(cx)\n                                .external_agents()\n                                .any(|known_id| known_id.0.as_ref() == id)\n                        })\n                        .unwrap_or(false);\n                    if !known {\n                        return Err(anyhow!(\n                            \"Unknown agent id {id:?}. Call `list_agents_and_models` \\\n                             to see the agents available for `create_thread`.\"\n                        ));\n                    }\n                    Some(Agent::Custom {\n                        id: project::AgentId(id.to_string().into()),\n                    })\n                }\n            };\n\n            let initial_content = AgentInitialContent::ContentBlock {\n                blocks: vec![acp::ContentBlock::Text(acp::TextContent::new(\n                    request.prompt.clone(),\n                ))],\n                auto_submit: true,\n            };\n\n            let title: SharedString = request.title.clone();","sourceCodeStart":4720,"sourceCodeEnd":4756,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/agent_ui/src/agent_panel.rs#L4720-L4756","documentation":"Error \"Unknown agent id {id:?}. Call `list_agents_and_models` to see the agents available for `create_thread`.\" thrown in zed-industries/zed.","triggerScenarios":"Thrown at crates/agent_ui/src/agent_panel.rs:4738 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}