zed-industries/zed · error
Cannot send initialize request, task still building
Error message
Cannot send initialize request, task still building
What it means
request_initialize was called while the session state is still Booting — the adapter process/binary has not finished starting, so the initialize request cannot be sent yet. The session pipeline should retry once booting completes.
Source
Thrown at crates/project/src/debugger/session.rs:1275
.update(cx, |session, cx| {
session.respond_to_client(
seq,
success,
RunInTerminal::COMMAND.to_string(),
body,
cx,
)
})?
.await
})
}
pub(super) fn request_initialize(&mut self, cx: &mut Context<Self>) -> Task<Result<()>> {
let adapter_id = self.adapter().to_string();
let request = Initialize { adapter_id };
let SessionState::Running(running) = &self.state else {
return Task::ready(Err(anyhow!(
"Cannot send initialize request, task still building"
)));
};
let mut response = running.request(request.clone());
cx.spawn(async move |this, cx| {
loop {
let capabilities = response.await;
match capabilities {
Err(e) => {
let Ok(Some(reconnect)) = this.update(cx, |this, cx| {
this.as_running()
.and_then(|running| running.reconnect_for_ssh(&mut cx.to_async()))
}) else {
return Err(e);
};
log::info!("Failed to connect to debug adapter: {}, retrying...", e);
reconnect.await?;View on GitHub (pinned to 9d272b0363)
Solutions
- Wait for the boot/build to finish and re-issue the initialize request (the session retries automatically in the normal flow)
- If it never leaves Booting, check the build task and adapter download for failures
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/project/src/debugger/session.rs:1275 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20).
Data as JSON: /api/errors/2bce2f45da025f23.
Report an issue: GitHub.