{"record":{"id":"5eb88a55c165f76b","repo":"zed-industries/zed","slug":"cannot-create-worktree-remote-connection-is-not-a","errorCode":null,"errorMessage":"Cannot create worktree: remote connection is not active","messagePattern":"Cannot create worktree: remote connection is not active","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/git_ui_core/src/worktree_service.rs","lineNumber":814,"sourceCode":"            toast_workspace,\n            \"worktree create\",\n            anyhow!(\"No git repositories found in the project\"),\n            cx,\n        );\n        return Task::ready(Err(anyhow!(\"No git repositories found in the project\")));\n    }\n\n    if remote_connection_options.is_some() {\n        let is_disconnected = project\n            .read(cx)\n            .remote_client()\n            .is_some_and(|client| client.read(cx).is_disconnected());\n        if is_disconnected {\n            let toast_workspace = cx.entity();\n            show_error_toast(\n                toast_workspace,\n                \"worktree create\",\n                anyhow!(\"Cannot create worktree: remote connection is not active\"),\n                cx,\n            );\n            return Task::ready(Err(anyhow!(\n                \"Cannot create worktree: remote connection is not active\"\n            )));\n        }\n    }\n\n    let worktree_name = action.worktree_name.clone();\n    let branch_target = action.branch_target.clone();\n    let fetch_askpass_delegates = if remote_branch_fetch_mode.should_fetch() {\n        remote_branch_to_fetch(&branch_target)\n            .map(|(remote_name, _branch_name)| {\n                git_repos\n                    .iter()\n                    .map(|_| {\n                        create_worktree_askpass_delegate(\n                            workspace_handle.clone(),","sourceCodeStart":796,"sourceCodeEnd":832,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/git_ui_core/src/worktree_service.rs#L796-L832","documentation":"Guard in create_worktree_workspace_inner: the project uses a remote connection but the client reports is_disconnected, so creating a worktree on the remote host would fail; the operation is refused until reconnection.","triggerScenarios":"Thrown at crates/git_ui_core/src/worktree_service.rs:814 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reconnect to the remote server (Remote > Reconnect) and retry worktree creation","Verify SSH/container connectivity to the remote host","Restart the remote server process if it remains disconnected","Work on the project locally if the remote connection cannot be restored"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}