{"record":{"id":"30189382b23585dc","repo":"zed-industries/zed","slug":"reload-task-exited","errorCode":null,"errorMessage":"reload task exited","messagePattern":"reload task exited","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/extension_host/src/extension_host.rs","lineNumber":486,"sourceCode":"        // parallel tasks.\n        this.tasks.push(cx.spawn(async move |this, cx| {\n            async move {\n                load_initial_extensions.await;\n\n                let mut index_changed = false;\n                let mut debounce_timer = cx.background_spawn(futures::future::pending()).fuse();\n\n                loop {\n                    select_biased! {\n                        _ = debounce_timer => {\n                            if index_changed {\n                                let index = this\n                                    .update(cx, |this, cx| this.rebuild_extension_index(cx))?\n                                    .await;\n                                this.update(cx, |this, cx| this.extensions_updated(index, cx))?\n                                    .await;\n                                index_changed = false;\n                            }\n                        }\n                        extension_id = reload_rx.next() => {\n                            let Some(extension_id) = extension_id else { break; };\n                            this.update(cx, |this, _cx| {\n                                this.modified_extensions.extend(extension_id);\n                            })?;\n                            index_changed = true;\n                            debounce_timer = cx.background_executor().timer(RELOAD_DEBOUNCE_DURATION).fuse()\n                        }\n                    }\n                }\n\n                anyhow::Ok(())\n            }\n            .map(drop)\n            .await;\n        }));\n","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/extension_host/src/extension_host.rs#L468-L504","documentation":"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.","triggerScenarios":"Thrown at crates/extension_host/src/extension_host.rs:486 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}