{"record":{"id":"7ac04f339f002d6c","repo":"zed-industries/zed","slug":"run-slash-command-not-available-prior-to-v0-1-0","errorCode":null,"errorMessage":"`run_slash_command` not available prior to v0.1.0","messagePattern":"`run_slash_command` not available prior to v0\\.1\\.0","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/extension_host/src/wasm_host/wit.rs","lineNumber":914,"sourceCode":"            }\n            Extension::V0_4_0(ext) => {\n                ext.call_run_slash_command(store, command, arguments, resource)\n                    .await\n            }\n            Extension::V0_3_0(ext) => {\n                ext.call_run_slash_command(store, command, arguments, resource)\n                    .await\n            }\n            Extension::V0_2_0(ext) => {\n                ext.call_run_slash_command(store, command, arguments, resource)\n                    .await\n            }\n            Extension::V0_1_0(ext) => {\n                ext.call_run_slash_command(store, command, arguments, resource)\n                    .await\n            }\n            Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => {\n                anyhow::bail!(\"`run_slash_command` not available prior to v0.1.0\");\n            }\n        }\n    }\n\n    pub async fn call_context_server_command(\n        &self,\n        store: &mut Store<WasmState>,\n        context_server_id: Arc<str>,\n        project: Resource<ExtensionProject>,\n    ) -> Result<Result<Command, String>> {\n        match self {\n            Extension::V0_8_0(ext) => {\n                ext.call_context_server_command(store, &context_server_id, project)\n                    .await\n            }\n            Extension::V0_6_0(ext) => {\n                ext.call_context_server_command(store, &context_server_id, project)\n                    .await","sourceCodeStart":896,"sourceCodeEnd":932,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/extension_host/src/wasm_host/wit.rs#L896-L932","documentation":"The host dispatches extension entry points through the versioned Extension enum (one variant per zed:api-version). run_slash_command was introduced in the WIT interface at v0.1.0, so dispatching it against a v0.0.1, v0.0.4, or v0.0.6 extension bails with this message instead of calling a non-existent export.","triggerScenarios":"Zed invokes a slash command declared by an extension compiled against zed_extension_api 0.0.x; the host reaches the match arm for V0_0_1/V0_0_4/V0_0_6 in call_run_slash_command and bails.","commonSituations":"An old extension binary left installed after Zed added a feature that queries all extensions; a slash_commands manifest entry shipped by an extension that was never rebuilt with the newer API; mixed-version extension installs after an editor update.","solutions":["Update the offending extension to a release built with zed_extension_api >= 0.1.0 (rebuild + republish if you own it).","In Cargo.toml of the extension, raise the dependency: zed_extension_api = \"0.1.0\" (or newer), then `cargo build --release`.","If you cannot rebuild, remove the extension's slash_commands entries from its manifest so the host never dispatches the entry point."],"exampleFix":"# before (extension Cargo.toml)\n[dependencies]\nzed_extension_api = \"0.0.6\"\n\n# after\n[dependencies]\nzed_extension_api = \"0.1.0\"","handlingStrategy":"validation","validationCode":"let api_version = extension_host::parse_wasm_extension_version(extension_id, &wasm_bytes)?;\nif api_version < semver::Version::new(0, 1, 0) {\n    // do not dispatch run_slash_command; skip or prompt for an extension update\n    return Ok(());\n}","typeGuard":"fn supports_run_slash_command(ext: &Extension) -> bool {\n    !matches!(\n        ext,\n        Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_)\n    )\n}","tryCatchPattern":null,"preventionTips":["Track the latest zed_extension_api in extension projects (dependabot/renovate).","Gate feature usage on the parsed api-version instead of assuming exports exist.","Publish rebuilt extensions promptly when adopting newer WIT interfaces."],"tags":["wasm","extension","api-version","slash-command"],"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"}