{"record":{"id":"1aefb32e81a3701c","repo":"microsoft/vscode","slug":"file-normalizeduri-fspath-does-not-exist","errorCode":null,"errorMessage":"File ${normalizedUri.fsPath} does not exist","messagePattern":"File (.+?) does not exist","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/tools/node/toolUtils.ts","lineNumber":326,"sourceCode":"\t}\n\tif (diskSessionResources.isSessionResourceUri(normalizedUri)) {\n\t\treturn false;\n\t}\n\tif (chatDebugFileLogger.isDebugLogUri(normalizedUri)) {\n\t\treturn false;\n\t}\n\tif (sessionTranscriptService.isTranscriptUri(normalizedUri)) {\n\t\treturn false;\n\t}\n\tif (tabsAndEditorsService.tabs.some(tab => isEqual(tab.uri, uri))) {\n\t\treturn false;\n\t}\n\n\t// If the file doesn't exist, throw immediately rather than showing a confusing \"external file\"\n\t// confirmation — the tool should fail with a clear \"file not found\" error instead.\n\tconst fileExists = await fileSystemService.stat(normalizedUri).then(() => true).catch(() => false);\n\tif (!fileExists) {\n\t\tthrow new Error(`File ${normalizedUri.fsPath} does not exist`);\n\t}\n\n\treturn true;\n}\n\nexport function isDirExternalAndNeedsConfirmation(accessor: ServicesAccessor, uri: URI, buildPromptContext?: IBuildPromptContext, options?: { readOnly?: boolean; workingDirectory?: URI }): boolean {\n\tconst workspaceService = accessor.get(IWorkspaceService);\n\tconst customInstructionsService = accessor.get(ICustomInstructionsService);\n\tconst configurationService = accessor.get(IConfigurationService);\n\n\tconst normalizedUri = normalizePath(uri);\n\n\tconst workingDir = new WorkingDirectory(options?.workingDirectory, workspaceService);\n\tif (workingDir.getFolder(normalizedUri)) {\n\t\treturn false;\n\t}\n\tif (options?.readOnly && isUriUnderAdditionalReadAccessPaths(normalizedUri, configurationService)) {\n\t\treturn false;","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/tools/node/toolUtils.ts#L308-L344","documentation":"Error \"File ${normalizedUri.fsPath} does not exist\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/tools/node/toolUtils.ts:326 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"}