{"record":{"id":"fa9d6f60daa8ea04","repo":"denoland/deno","slug":"failed-to-send-request-to-tsc-thread","errorCode":null,"errorMessage":"failed to send request to tsc thread","messagePattern":"failed to send request to tsc thread","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/lsp/tsc.rs","lineNumber":1604,"sourceCode":"    let (tx, mut rx) = oneshot::channel::<Result<String, AnyError>>();\n    let change = self.pending_change.lock().take();\n\n    if self\n      .sender\n      .send((\n        req,\n        compiler_options_key.clone(),\n        scope.cloned(),\n        notebook_uri.cloned(),\n        snapshot,\n        tx,\n        token.clone(),\n        change,\n        Some(context),\n      ))\n      .is_err()\n    {\n      return Err(anyhow!(\"failed to send request to tsc thread\"));\n    }\n    tokio::select! {\n      value = &mut rx => {\n        let value = value??;\n        let _span = super::logging::lsp_tracing_info_span!(\"Tsc response deserialization\");\n        let r = Ok(serde_json::from_str(&value)?);\n        self.performance.measure(mark);\n        r\n      }\n      _ = token.cancelled() => {\n        Err(anyhow!(\"request cancelled\"))\n      }\n    }\n  }\n}\n\nfn get_tag_documentation(\n  tag: &JsDocTagInfo,","sourceCodeStart":1586,"sourceCodeEnd":1622,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/lsp/tsc.rs#L1586-L1622","documentation":"Thrown by Deno's language server when it cannot deliver a request to the dedicated TypeScript compiler (tsc) worker thread. The send fails only when the channel to that thread is closed, i.e. the tsc thread has shut down or panicked. Without it, no TypeScript intelligence (hover, completions, quick info) can be served for the request.","triggerScenarios":"Any LSP request that needs TypeScript (hover, completion, definition, diagnostics) issued after the tsc worker thread has died, panicked, or the LSP is shutting down and the thread's receiver was dropped.","commonSituations":"The tsc thread crashed on a pathological or very large project (OOM kill, panic during serialization), or the editor sent requests while the language server was restarting. Typically every TS feature then fails until the language server restarts.","solutions":["Restart the Deno language server (VS Code: 'Deno: Restart Language Server') and reload the window","Update the deno CLI and the Deno editor extension — tsc-thread panics are fixed regularly","If it recurs, run the LSP with logging (DENO_LOG=debug deno lsp) and look for a panic or OOM from the tsc thread; reduce workspace size or report the panic with the log"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"In an LSP client or wrapper, catch this error, mark TypeScript features as temporarily unavailable for that request, and trigger a language-server restart instead of retrying per request.","preventionTips":["Keep deno and the editor extension updated","Watch the tsc thread for panics in very large workspaces and reduce scope if needed","Restart the language server when TS features fail wholesale rather than hammering it with retries"],"tags":["lsp","typescript","threading","editor-integration"],"backgroundTag":"worker-thread-crashed","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}