{"record":{"id":"22128650b238bd9b","repo":"zed-industries/zed","slug":"the-host-v-and-guest-v-are-using-incompati","errorCode":null,"errorMessage":"The host (v{}) and guest (v{}) are using incompatible versions of Zed. The peer with the older version must update to collaborate.","messagePattern":"The host \\(v(.+?)\\) and guest \\(v(.+?)\\) are using incompatible versions of Zed\\. The peer with the older version must update to collaborate\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/collab/src/rpc.rs","lineNumber":1991,"sourceCode":"    tracing::info!(%project_id, \"join project\");\n\n    let db = session.db().await;\n    let project_model = db.get_project(project_id).await?;\n    let host_features: Vec<String> =\n        serde_json::from_str(&project_model.features).unwrap_or_default();\n    let guest_features: HashSet<_> = request.features.iter().collect();\n    let host_features_set: HashSet<_> = host_features.iter().collect();\n    if guest_features != host_features_set {\n        let host_connection_id = project_model.host_connection()?;\n        let mut pool = session.connection_pool().await;\n        let host_version = pool\n            .connection(host_connection_id)\n            .map(|c| c.zed_version.to_string());\n        let guest_version = pool\n            .connection(session.connection_id)\n            .map(|c| c.zed_version.to_string());\n        drop(pool);\n        Err(anyhow!(\n            \"The host (v{}) and guest (v{}) are using incompatible versions of Zed. The peer with the older version must update to collaborate.\",\n            host_version.as_deref().unwrap_or(\"unknown\"),\n            guest_version.as_deref().unwrap_or(\"unknown\"),\n        ))?;\n    }\n\n    let (project, replica_id) = &mut *db\n        .join_project(\n            project_id,\n            session.connection_id,\n            session.user_id(),\n            request.committer_name.clone(),\n            request.committer_email.clone(),\n        )\n        .await?;\n    drop(db);\n\n    tracing::info!(%project_id, \"join remote project\");","sourceCodeStart":1973,"sourceCodeEnd":2009,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/collab/src/rpc.rs#L1973-L2009","documentation":"Thrown by the join_project handler when the feature set the guest reports in JoinProject differs from the host's registered feature set (compared as HashSets). The message interpolates both peers' zed versions from the connection pool when available ('unknown' otherwise). Feature-set equality is the protocol-compatibility proxy: mismatched features mean the collaboration protocol versions cannot talk.","triggerScenarios":"Guest on an older Zed joins a project hosted by a newer Zed (or vice versa) where the collab feature list changed; nightly/stable mix; one peer's client failed to advertise its features in the connection preamble.","commonSituations":"One collaborator auto-updated while the other is on a pinned/old install; stable and preview channels collaborating; enterprise installs lagging behind; missing zed_version/features during connection registration producing 'unknown'.","solutions":["Update Zed on the peer reported as older (or both) so the feature sets match, then re-share and re-join","Re-establish the connection (reconnect both clients) so fresh version/features are registered before retrying the join","If operating a fleet, pin peers to the same release to avoid mid-session drift"],"exampleFix":"// before\nlet joined = guest_client.join_project(project_id, my_features.clone()).await?;\n\n// after (pre-check versions, fail fast with a clear message)\nif let Some(host_version) = host_advertised_version {\n    if host_version != my_version {\n        return Err(anyhow!(\n            \"collab requires the same Zed version (host v{host_version}, you v{my_version}); please update\"\n        ));\n    }\n}\nlet joined = guest_client.join_project(project_id, my_features.clone()).await?;","handlingStrategy":"validation","validationCode":"// Compare advertised versions before attempting the join.\nif let Some(host_version) = host_advertised_version {\n    if host_version != my_zed_version {\n        return Err(anyhow!(\n            \"collab requires matching Zed versions (host v{host_version}, you v{my_zed_version})\"\n        ));\n    }\n}\nclient.join_project(project_id, features).await?;","typeGuard":"fn features_compatible(guest: &HashSet<String>, host: &HashSet<String>) -> bool {\n    guest == host\n}","tryCatchPattern":"if let Err(err) = client.join_project(project_id, features).await {\n    if err.to_string().contains(\"incompatible versions\") {\n        self.ui.prompt_update(&err.to_string());\n        return Ok(()); // block retry until the client updates\n    }\n    return Err(err);\n}","preventionTips":["Keep collaborators on the same Zed release; auto-update both peers","Compare versions/features at connection time, before opening a share","Show the embedded version strings from the error to the user so they know which peer must update"],"tags":["versioning","compatibility","collab","join-project","rpc"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}