{"record":{"id":"7f9c8b3b9ba61336","repo":"zed-industries/zed","slug":"missing-start-or-end-position-in-remote-project-pr","errorCode":null,"errorMessage":"Missing start or end position in remote project PrepareRenameResponse","messagePattern":"Missing start or end position in remote project PrepareRenameResponse","errorType":"error_code","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/project/src/lsp_command.rs","lineNumber":1122,"sourceCode":"    ) -> Result<PrepareRenameResponse> {\n        if message.can_rename {\n            buffer\n                .update(&mut cx, |buffer, _| {\n                    buffer.wait_for_version(deserialize_version(&message.version))\n                })\n                .await?;\n            if let (Some(start), Some(end)) = (\n                message.start.and_then(deserialize_anchor),\n                message.end.and_then(deserialize_anchor),\n            ) {\n                Ok(PrepareRenameResponse::Success {\n                    range: start..end,\n                    language_server_id: message\n                        .language_server_id\n                        .map(LanguageServerId::from_proto),\n                })\n            } else {\n                anyhow::bail!(\n                    \"Missing start or end position in remote project PrepareRenameResponse\"\n                );\n            }\n        } else if message.only_unprepared_rename_supported {\n            Ok(PrepareRenameResponse::OnlyUnpreparedRenameSupported)\n        } else {\n            Ok(PrepareRenameResponse::InvalidPosition)\n        }\n    }\n\n    fn buffer_id_from_proto(message: &proto::PrepareRename) -> Result<BufferId> {\n        BufferId::new(message.buffer_id)\n    }\n}\n\n#[async_trait(?Send)]\nimpl LspCommand for PerformRename {\n    type Response = ProjectTransaction;","sourceCodeStart":1104,"sourceCodeEnd":1140,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/lsp_command.rs#L1104-L1140","documentation":"A remote-project deserialization guard: the collaborating client returned a PrepareRenameResponse message with can_rename set, but the start and/or end anchor field was missing (or could not be deserialized into a buffer anchor). Because a rename range cannot be constructed without both endpoints, the response is rejected with this error instead of producing an invalid empty or default range.","triggerScenarios":"Thrown at crates/project/src/lsp_command.rs:1122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the remote peer always serializes both start and end anchors when reporting a successful rename capability","Treat the response as not renameable (no rename) when either position is absent rather than surfacing an internal error to the user","Check the wire message construction in the remote RPC layer for dropped anchor fields"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-09-05T10:33:00.413Z","contentChangedAt":"2026-09-05T10:33:00.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}