{"record":{"id":"c8cbbe7618d6c29b","repo":"microsoft/vscode","slug":"unable-to-find-node-pty-binaries-checked-candi","errorCode":null,"errorMessage":"Unable to find node-pty binaries. Checked: ${candidatePaths.join(', ')}","messagePattern":"Unable to find node-pty binaries\\. Checked: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/copilotcli/node/nodePtyShim.ts","lineNumber":78,"sourceCode":"\t// (`node_modules.asar.unpacked`).\n\tconst candidatePaths = APP_NODE_MODULES_ROOTS.flatMap(root => {\n\t\tconst nodePtyRoot = path.join(vscodeAppRoot, root, 'node-pty');\n\t\treturn [\n\t\t\tpath.join(nodePtyRoot, 'build', 'Release'),\n\t\t\tpath.join(nodePtyRoot, 'prebuilds', process.platform + '-' + process.arch),\n\t\t];\n\t});\n\n\tfor (const candidatePath of candidatePaths) {\n\t\tif (await isDirectory(candidatePath)) {\n\t\t\tif (candidatePath !== candidatePaths[0]) {\n\t\t\t\tlogService.info(`Using node-pty prebuilds from ${candidatePath}`);\n\t\t\t}\n\t\t\treturn candidatePath;\n\t\t}\n\t}\n\n\tthrow new Error(`Unable to find node-pty binaries. Checked: ${candidatePaths.join(', ')}`);\n}\n\nexport async function copyNodePtyFiles(extensionPath: string, sourceNodePtyPath: string, logService: ILogService): Promise<void> {\n\tconst nodePtyDir = path.join(extensionPath, 'node_modules', '@github', 'copilot', 'sdk', 'prebuilds', process.platform + '-' + process.arch);\n\tlogService.info(`Creating node-pty shim: source=${sourceNodePtyPath}, dest=${nodePtyDir}`);\n\n\ttry {\n\t\tawait fs.mkdir(nodePtyDir, { recursive: true });\n\t\tconst entries = await fs.readdir(sourceNodePtyPath);\n\t\tconst uniqueEntries = [...new Set(entries)];\n\t\tlogService.info(`Found ${uniqueEntries.length} entries to copy${uniqueEntries.length !== entries.length ? ` (${entries.length - uniqueEntries.length} duplicates ignored)` : ''}: ${uniqueEntries.join(', ')}`);\n\n\t\tawait copyNodePtyWithRetries(sourceNodePtyPath, nodePtyDir, uniqueEntries, logService);\n\t} catch (error) {\n\t\tlogService.error(`Failed to create node-pty shim (source dir: ${sourceNodePtyPath}, extension dir: ${nodePtyDir})`, error);\n\t\tthrow error;\n\t}\n}","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/copilotcli/node/nodePtyShim.ts#L60-L96","documentation":"Error \"Unable to find node-pty binaries. Checked: ${candidatePaths.join(', ')}\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/copilotcli/node/nodePtyShim.ts:78 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}