Repository: vscode
Issue: TaskProvider not working when Remoting via SSH
Labels: bug,tasks,remote

Type: <b>Bug</b>

I'm using Remote - SSH to connect to my workstation. When connected like this, task providing by custom TaskProvider seems to not work.

Reproduction steps:
* connect to remote workstation using the Remote - SSH extension
* clone the vscode samples repository https://github.com/microsoft/vscode-extension-samples
* open the sample task-provider-sample
* build and run the extension according to its README.md
* in the newly opened instance of vscode with the sample installed, run `Tasks: Run Task`
* select task category `custombuildscript` provided by the sample

Expected result:
In the dropdown there will be the 6 hardcoded tasks provided by the sample provider

Actual result:
The dropdown is empty, containing message `No custombuildscript tasks found. Go back`

When I log into the workstation locally, open the same workspace and follow the exact same steps, the tasks are displayed as expected.

Vscode version used for remote connection (tasks do not show up here): 
Version: 1.79.2
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:59:55.818Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 4.4.0-142-generic

Vscode version installed locally (tasks do show up here):
Version: 1.79.2
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:59:55.818Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 4.19.0-18-amd64

VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:59:55.818Z)
OS version: Linux x64 4.4.0-142-generic
Modes:
Remote OS version: Linux x64 4.19.0-18-amd64

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2946)|
|GPU Status|2d_canvas: unavailable_software<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: disabled_software<br>multiple_raster_threads: enabled_on<br>opengl: disabled_off<br>rasterization: disabled_software<br>raw_draw: disabled_off_ok<br>video_decode: disabled_software<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: unavailable_software<br>webgl2: unavailable_software<br>webgpu: disabled_off|
|Load (avg)|0, 1, 1|
|Memory (System)|15.53GB (7.04GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|xubuntu|
|XDG_CURRENT_DESKTOP|XFCE|
|XDG_SESSION_DESKTOP|xubuntu|
|XDG_SESSION_TYPE|x11|

|Item|Value|
|---|---|
|Remote|SSH: 10.14.0.36|
|OS|Linux x64 4.19.0-18-amd64|
|CPUs|AMD Ryzen 7 2700 Eight-Core Processor (16 x 1638)|
|Memory (System)|31.43GB (12.78GB free)|
|VM|0%|
</details><details><summary>Extensions (6)</summary>

Extension|Author (truncated)|Version
---|---|---
tsl-problem-matcher|amo|0.6.2
remote-ssh|ms-|0.102.0
remote-ssh-edit|ms-|0.86.0
remote-explorer|ms-|0.4.0
vscode-ruby|win|0.28.0
vscode-eslint|dba|2.4.2


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30773603
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30610679
282f8724:30602487
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
a9j8j154:30646983
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
24365598:30736109
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
hideindicator:30766889
pythongtdpath:30769146
i26e3531:30769768
gsof1:30774496
dh2dc718:30770000
pythonidxpt:30772539
pythondjangotscf:30772537
pythonnoceb:30773526
e537b577:30772215

```

</details>

<!-- generated by issue reporter -->