{"record":{"id":"ff27173a9da14a63","repo":"zed-industries/zed","slug":"login-command-failed-with-exit-code","errorCode":null,"errorMessage":"Login command failed with exit code: {:?}","messagePattern":"Login command failed with exit code: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/conversation_view.rs","lineNumber":2161,"sourceCode":"                            store.node_runtime().map(|node_runtime| {\n                                cx.background_spawn(async move { node_runtime.binary_path().await })\n                            })\n                        })\n                    });\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;","sourceCodeStart":2143,"sourceCodeEnd":2179,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent_ui/src/conversation_view.rs#L2143-L2179","documentation":"For auth methods without success patterns, the login terminal task was awaited and its process exited with a non-OK (or unexpected) exit code, reported here since output-based success detection is unavailable.","triggerScenarios":"Thrown at crates/agent_ui/src/conversation_view.rs:2154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the login command in a terminal and follow its prompts manually","Check the agent's credentials or auth config for the underlying failure","Inspect the terminal output for the login command's error details"],"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"}