{"record":{"id":"cb93e8a1d5c806e9","repo":"zed-industries/zed","slug":"context-server-command-not-available-prior-to-v0","errorCode":null,"errorMessage":"`context_server_command` not available prior to v0.2.0","messagePattern":"`context_server_command` not available prior to v0\\.2\\.0","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/extension_host/src/wasm_host/wit.rs","lineNumber":954,"sourceCode":"                    .await\n            }\n            Extension::V0_4_0(ext) => {\n                ext.call_context_server_command(store, &context_server_id, project)\n                    .await\n            }\n            Extension::V0_3_0(ext) => {\n                ext.call_context_server_command(store, &context_server_id, project)\n                    .await\n            }\n            Extension::V0_2_0(ext) => Ok(ext\n                .call_context_server_command(store, &context_server_id, project)\n                .await?\n                .map(Into::into)),\n            Extension::V0_0_1(_)\n            | Extension::V0_0_4(_)\n            | Extension::V0_0_6(_)\n            | Extension::V0_1_0(_) => {\n                anyhow::bail!(\"`context_server_command` not available prior to v0.2.0\");\n            }\n        }\n    }\n\n    pub async fn call_context_server_configuration(\n        &self,\n        store: &mut Store<WasmState>,\n        context_server_id: Arc<str>,\n        project: Resource<ExtensionProject>,\n    ) -> Result<Result<Option<ContextServerConfiguration>, String>> {\n        match self {\n            Extension::V0_8_0(ext) => {\n                ext.call_context_server_configuration(store, &context_server_id, project)\n                    .await\n            }\n            Extension::V0_6_0(ext) => {\n                ext.call_context_server_configuration(store, &context_server_id, project)\n                    .await","sourceCodeStart":936,"sourceCodeEnd":972,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/extension_host/src/wasm_host/wit.rs#L936-L972","documentation":"The Extension enum dispatch in call_context_server_command requires the v0.2.0 or newer WIT interface. Context-server command support was added at v0.2.0, so an extension compiled against v0.0.1 through v0.1.0 hits the bail arm instead of a missing export.","triggerScenarios":"Zed resolves a context server command from an extension whose wasm declares zed:api-version < 0.2.0, reaching the V0_0_1/V0_0_4/V0_0_6/V0_1_0 arm of call_context_server_command.","commonSituations":"Using a stale extension release after adding context servers to its manifest; testing a local build pinned to an old zed_extension_api; an MCP/context-server feature enabled against an extension built before that API existed.","solutions":["Bump zed_extension_api in the extension's Cargo.toml to >= 0.2.0 and rebuild (`cargo build --release`).","Reinstall/republish the extension so the new wasm is loaded.","If a third party owns it, update to their latest release or open an issue."],"exampleFix":"# before (extension Cargo.toml)\n[dependencies]\nzed_extension_api = \"0.1.0\"\n\n# after\n[dependencies]\nzed_extension_api = \"0.2.0\"","handlingStrategy":"validation","validationCode":"let api_version = extension_host::parse_wasm_extension_version(extension_id, &wasm_bytes)?;\nif api_version < semver::Version::new(0, 2, 0) {\n    // extension cannot serve context server commands; skip it\n    return Ok(());\n}","typeGuard":"fn supports_context_server_command(ext: &Extension) -> bool {\n    !matches!(\n        ext,\n        Extension::V0_0_1(_)\n            | Extension::V0_0_4(_)\n            | Extension::V0_0_6(_)\n            | Extension::V0_1_0(_)\n    )\n}","tryCatchPattern":null,"preventionTips":["Bump zed_extension_api when adopting context-server features and rebuild before publishing.","Check the parsed api-version before dispatching versioned entry points.","Remove stale installed extension versions after upgrading."],"tags":["wasm","extension","api-version","context-server"],"backgroundTag":"api-version-unsupported","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}