Change:
}); }); }; <del> let globTasksDetected = false; // First check for globs before checking for the default tasks of the task group const absoluteURI = EditorResourceAccessor.getOriginalUri(this._editorService.activeEditor); if (absoluteURI) { const workspaceFolder = this._contextService.getWorkspaceFolder(absoluteURI); if (workspaceFolder) { const configuredTasks = this._getConfiguration(workspaceFolder)?.config?.tasks; if (configuredTasks) { globTasksDetected = configuredTasks.filter(task => task.group && typeof task.group !== 'string' && typeof task.group.isDefault === 'string').length > 0; // This will activate extensions, so only do so if necessary #185960 if (globTasksDetected) { // Fallback to absolute path of the file if it is not in a workspace or relative path cannot be found const relativePath = workspaceFolder?.uri ? (resources.relativePath(workspaceFolder.uri, absoluteURI) ?? absoluteURI.path) : absoluteURI.path; groupTasks = await this._findWorkspaceTasks((task) => { const currentTaskGroup = task.configurationProperties.group; if (currentTaskGroup && typeof currentTaskGroup !== 'string' && typeof currentTaskGroup.isDefault === 'string') { return (currentTaskGroup._id === taskGroup._id && glob.match(currentTaskGroup.isDefault, relativePath)); } return false; }); } } } } </del> <ins> let groupTasks: (Task | ConfiguringTask)[] = []; const { globGroupTasks, globTasksDetected } = await this._getGlobTasks(taskGroup._id); groupTasks = [...globGroupTasks]; </ins> if (!globTasksDetected && groupTasks.length === 0) { groupTasks = await this._findWorkspaceTasksInGroup(taskGroup, true); }

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --This was raised before in but closed for not providing enough detail. I'll try to do better. Possibly historically related, but I really don't know: . This buggy behaviour was raised to my attention on Stack Overflow in <!-- Test using the latest Insiders build to see if your issue has already been fixed: --I have tested on Insiders with no non-builtin extensions installed, and on top of that with extensions disabled: <!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes. I also tested with a default profile. <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.81.1, 1.82.0-insider OS Version: Ubuntu 22.04.2. The Stack Overflow user seems to be on windows judging by the backslash path separators, and was Windows and WSL. Steps to Reproduce: a new workspace folder. put anything. Ex. "hello world!" put anything. Ex. "hello world!" and run in the command palette, and observe that it shows the task (unexpected). and run in the command palette, and observe that it shows the task (expected). swap the order the task definitions in and run in the command palette, and observe that it shows the task (expected). and run in the command palette, and observe that it shows the task (unexpected).
maybe related to this change
I can reproduce, doesn't work at all. To that I would add that it isn't documented in
Marking as feature so it gets tested/verified and because this never worked before
Thanks! Do you want me to file a reminder to document this useful feature or is it unnecessary?
that's unnecessary, but it would be great if you'd verify the fix when it's released in insider's. When that happens, you'll see the label applied.