Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- 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/No <!-- 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.71.0 OS Version: Windows 10 Steps to Reproduce: Configure keybindings with non-existant tasks, for example: configure some tasks in the workspace. press F7 and the tasks are filtered with the text , not showing the actual available tasks. This issue exists since has been . I have shortkeys for some tasks I execute quite often, but some workspaces don't have those tasks, but have other tasks. Now, when I press F7, I need to empty all the text before I can select the desired task. Either this behaviour needs to be reverted to the pre-1.70 behaviour (possibly with an option to the user), or shortkeys per workspace needs to be implemented, but this is very annoying.
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.71.0. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding!
I am using version 1.71.0, but the issue was introduced in version 1.70.0
the behavior of filtering with whatever task you've provided is by design, but yes you're right that when there are no results found matching that term, the input should be cleared and show all tasks

Discussion:
private _runTaskCommand(arg?: any): void { const identifier = this._getTaskIdentifier(arg); const type = arg && typeof arg !== 'string' && 'type' in arg ? arg.type : undefined; <del> const task = arg && typeof arg !== 'string' && 'task' in arg ? arg.task : arg === 'string' ? arg : undefined; </del> <ins> let task = arg && typeof arg !== 'string' && 'task' in arg ? arg.task : arg === 'string' ? arg : undefined; </ins> if (identifier) { this._getGroupedTasks({ task, type }).then(async (grouped) => { const resolver = this._createResolver(grouped); <ins> const tasks = grouped.all(); </ins> const folderURIs: (URI | string)[] = this._contextService.getWorkspace().folders.map(folder => folder.uri); if (this._contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) { folderURIs.push(this._contextService.getWorkspace().configuration!);

} // match by label if (!!task) { <del> const taskToRun = grouped.all().find(g => g._label === task); </del> <ins> const taskToRun = tasks.find(g => g._label === task); </ins> if (taskToRun) { this.run(taskToRun).then(undefined, () => { }); return; } } <ins> if (task && !tasks.some(g => g._label.includes(task))) { task = undefined; } </ins> // if task is defined, will be used as a filter <del> this._doRunTaskCommand(grouped.all(), type, task); </del> <ins> this._doRunTaskCommand(tasks, type, task); </ins> }); } this._doRunTaskCommand();