{"record":{"id":"9e942334be707857","repo":"zed-industries/zed","slug":"login-command-terminated-without-exit-status","errorCode":null,"errorMessage":"Login command terminated without exit status","messagePattern":"Login command terminated without exit status","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/conversation_view.rs","lineNumber":2165,"sourceCode":"                    });\n\n                    if let Some(resolve_task) = resolved_node_runtime {\n                        if let Ok(node_path) = resolve_task.await {\n                            task.command = Some(node_path.to_string_lossy().to_string());\n                        }\n                    }\n                }\n            }\n            task.shell = task::Shell::WithArguments {\n                program: task.command.take().expect(\"login command should be set\"),\n                args: std::mem::take(&mut task.args),\n                title_override: None,\n            };\n\n            let terminal = terminal_panel\n                .update_in(cx, |terminal_panel, window, cx| {\n                    terminal_panel.spawn_task(&task, window, cx)\n                })?\n                .await?;\n\n            let success_patterns = match method.0.as_ref() {\n                \"claude-login\" | GEMINI_TERMINAL_AUTH_METHOD_ID => vec![\n                    \"Login successful\".to_string(),\n                    \"Type your message\".to_string(),\n                ],\n                _ => Vec::new(),\n            };\n            if success_patterns.is_empty() {\n                // No success patterns specified: wait for the process to exit and check exit code\n                let exit_status = terminal\n                    .read_with(cx, |terminal, cx| terminal.wait_for_completed_task(cx))?\n                    .await;\n\n                match exit_status {\n                    Some(status) if status.success() => Ok(()),\n                    Some(status) => Err(anyhow!(","sourceCodeStart":2147,"sourceCodeEnd":2183,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent_ui/src/conversation_view.rs#L2147-L2183","documentation":"Raised in the external-agent login flow when no success patterns are configured for the auth method, so the code falls back to waiting for the login task's exit status — and the terminal task terminated without reporting any exit status. The offending condition is a terminal task that ended abnormally (e.g. killed or the terminal was closed), leaving neither a success pattern nor an exit code to check.","triggerScenarios":"Thrown at crates/agent_ui/src/conversation_view.rs:2158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the login command and keep the terminal open until it exits","Check for signals or resource limits that killed the login process","Complete the login manually in an external terminal if the in-editor task keeps dying"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}