{"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/89f33cbef296a2b287f323d42de54c871fa69c77/cli/lsp/tsc.rs#L1586-L1622","documentation":"Every TypeScript-powered LSP request is shipped over a channel to a dedicated tsc worker thread (cli/lsp/tsc.rs:1589-1605). A failed send means the receiving thread no longer exists: it panicked, crashed, or was shut down. Once this fires, all tsc-backed features (completions, hover, diagnostics, refactorings) fail until the language server restarts; the preceding panic is logged above this error.","triggerScenarios":"The tsc thread panics while executing a request (often a tsc-side 'Debug Failure' exception or unreachable code in the pinned compiler); a shutdown race when a window/workspace closes mid-request; the server process is OOM-killed or the thread's runtime aborts.","commonSituations":"Opening a pathological file that trips a tsc bug; long sessions where an earlier request poisoned the thread; deno lsp behind Neovim/Emacs/VS Code after a crash; version skew after a Deno upgrade mid-session.","solutions":["Restart the language server (VS Code: 'Deno: Restart Language Server'; Neovim: :LspRestart) and retry the edit that failed","Update Deno - tsc-thread panics get patched and the pinned tsc moves with releases","Inspect the LSP log for the panic immediately preceding this error to identify the triggering file/request","Report the panic backtrace to denoland/deno; include the minimal file that triggers it"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// LSP client wrapper: on tsc-thread death, restart the server once, then retry\nasync function withTscRetry(client, restart, send) {\n  try {\n    return await send();\n  } catch (err) {\n    if (/failed to send request to tsc thread/i.test(String(err))) {\n      await restart(); // e.g. :LspRestart / 'Deno: Restart Language Server'\n      return await send();\n    }\n    throw err;\n  }\n}","preventionTips":["Keep Deno and the editor extension updated - tsc-thread panics are patched upstream","Capture LSP logs so the panic preceding this error is available for a bug report","Restart the language server after Deno version upgrades instead of reusing a long-lived session"],"tags":["lsp","tsc","threading","crash","editor-integration"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}