{"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":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/agent_panel.rs","lineNumber":4765,"sourceCode":") {\n    let Some(selected) = parse_provider_slash_model(model_id) else {\n        log::warn!(\n            \"create_thread: could not parse model override {model_id:?}; expected `provider/model-id`\"\n        );\n        return;\n    };\n    let configured = LanguageModelRegistry::global(cx)\n        .update(cx, |registry, cx| registry.select_model(&selected, cx));\n    let Some(configured) = configured else {\n        log::warn!(\n            \"create_thread: no model registered for {model_id:?}; using thread's default model\"\n        );\n        return;\n    };\n    thread.update(cx, |thread, cx| {\n        thread.set_model(configured.model, cx);\n    });\n}\n\nfn parse_provider_slash_model(input: &str) -> Option<language_model::SelectedModel> {\n    let (provider, model) = input.split_once('/')?;\n    if provider.is_empty() || model.is_empty() {\n        return None;\n    }\n    Some(language_model::SelectedModel {\n        provider: language_model::LanguageModelProviderId::from(provider.to_string()),\n        model: language_model::LanguageModelId::from(model.to_string()),\n    })\n}\n\n/// Bridges agent-side `SiblingThreadHost` calls to `AgentPanel`. Constructed\n/// and installed on a `NativeAgent` by the agent panel when a native-agent\n/// thread is created.\npub(crate) struct AgentPanelSiblingHost {\n    panel: WeakEntity<AgentPanel>,\n    window: gpui::AnyWindowHandle,","sourceCodeStart":4747,"sourceCodeEnd":4783,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent_ui/src/agent_panel.rs#L4747-L4783","documentation":"create_thread with an explicit agent_id that isn't the native agent id and isn't in the panel's known agents; rejected up front so the model gets a structured error pointing at list_agents_and_models.","triggerScenarios":"Thrown at crates/agent_ui/src/agent_panel.rs:4738 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call list_agents_and_models to enumerate valid agent ids","Use the exact agent id returned by list_agents_and_models","Omit agent_id to use the default agent when creating the thread"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}