zed-industries/zed · error
reload task exited
Error message
reload task exited
What it means
A channel-lifetime guard in ExtensionHost::reload: reload requests are funneled through a persistent reload channel owned by a background task created in new(), and unbounded_send().expect('reload task exited') fires only when that receiver no longer exists — the reload task panicked or the ExtensionHost's worker loop terminated, leaving every future reload request undeliverable. It is not triggered by any user input or extension content.
Solutions
- Handle the SendError: log it and emit an Event signaling the extension host is broken instead of panicking
- Restart the reload task (recreate the channel and worker) when the receiver is found dead
- Monitor the reload task and surface its failure so callers stop enqueueing reloads onto a dead channel
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/extension_host/src/extension_host.rs:486 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/30189382b23585dc.
Report an issue: GitHub.
Appendix: source
Thrown at crates/extension_host/src/extension_host.rs:486
// parallel tasks.
this.tasks.push(cx.spawn(async move |this, cx| {
async move {
load_initial_extensions.await;
let mut index_changed = false;
let mut debounce_timer = cx.background_spawn(futures::future::pending()).fuse();
loop {
select_biased! {
_ = debounce_timer => {
if index_changed {
let index = this
.update(cx, |this, cx| this.rebuild_extension_index(cx))?
.await;
this.update(cx, |this, cx| this.extensions_updated(index, cx))?
.await;
index_changed = false;
}
}
extension_id = reload_rx.next() => {
let Some(extension_id) = extension_id else { break; };
this.update(cx, |this, _cx| {
this.modified_extensions.extend(extension_id);
})?;
index_changed = true;
debounce_timer = cx.background_executor().timer(RELOAD_DEBOUNCE_DURATION).fuse()
}
}
}
anyhow::Ok(())
}
.map(drop)
.await;
}));
View on GitHub (pinned to 9d272b0363)