zed-industries/zed · error
exited before logging in
Error message
exited before logging in
What it means
Emitted in the external-agent login polling loop: the login terminal task exited with a non-success exit status before any configured success pattern (e.g. "Login successful") appeared in the terminal content. The offending condition is the login command failing — wrong credentials, expired link, or CLI misconfiguration — detected via task exit while polling for the success marker.
Solutions
- Re-run the login flow and follow the CLI's prompts or URL flow
- Verify credentials and auth configuration for the agent CLI
- Check the terminal content for the CLI's own error message before exit
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/agent_ui/src/conversation_view.rs:2189 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/79bb2f734845898d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent_ui/src/conversation_view.rs:2196
.read_with(cx, |terminal, cx| terminal.wait_for_completed_task(cx))?
.await;
match exit_status {
Some(status) if status.success() => Ok(()),
Some(status) => Err(anyhow!(
"Login command failed with exit code: {:?}",
status.code()
)),
None => Err(anyhow!("Login command terminated without exit status")),
}
} else {
// Look for specific output patterns to detect successful login
let mut exit_status = terminal
.read_with(cx, |terminal, cx| terminal.wait_for_completed_task(cx))?
.fuse();
let logged_in = cx
.spawn({
let terminal = terminal.clone();
async move |cx| {
loop {
cx.background_executor().timer(Duration::from_secs(1)).await;
let content =
terminal.update(cx, |terminal, _cx| terminal.get_content())?;
if success_patterns
.iter()
.any(|pattern| content.contains(pattern))
{
return anyhow::Ok(());
}
}
}
})
.fuse();
futures::pin_mut!(logged_in);
futures::select_biased! {View on GitHub (pinned to 916fc2b8cb)