zed-industries/zed · error
Login command failed with exit code
Error message
Login command failed with exit code: {:?} What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/agent_ui/src/conversation_view.rs:2154 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20).
Data as JSON: /api/errors/ff27173a9da14a63.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent_ui/src/conversation_view.rs:2161
store.node_runtime().map(|node_runtime| {
cx.background_spawn(async move { node_runtime.binary_path().await })
})
})
});
if let Some(resolve_task) = resolved_node_runtime {
if let Ok(node_path) = resolve_task.await {
task.command = Some(node_path.to_string_lossy().to_string());
}
}
}
}
task.shell = task::Shell::WithArguments {
program: task.command.take().expect("login command should be set"),
args: std::mem::take(&mut task.args),
title_override: None,
};
let terminal = terminal_panel
.update_in(cx, |terminal_panel, window, cx| {
terminal_panel.spawn_task(&task, window, cx)
})?
.await?;
let success_patterns = match method.0.as_ref() {
"claude-login" | GEMINI_TERMINAL_AUTH_METHOD_ID => vec![
"Login successful".to_string(),
"Type your message".to_string(),
],
_ => Vec::new(),
};
if success_patterns.is_empty() {
// No success patterns specified: wait for the process to exit and check exit code
let exit_status = terminal
.read_with(cx, |terminal, cx| terminal.wait_for_completed_task(cx))?
.await;View on GitHub (pinned to 916fc2b8cb)