Repository: vscode
Issue: Tasks using command variables don't run in split terminals
Labels: bug,tasks,confirmed

Type: <b>Bug</b>

Using command variables as the command for tasks that are meant to be grouped in split terminals are instead not grouped together. The minimal `tasks.json` provided below is meant for my Dev Container setup, but this issue occurs with other command variables as well.

```
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "presentation": {
        "echo": false,
        "reveal": "always",
        "focus": false,
        "panel": "dedicated",
        "showReuseMessage": false,
        "clear": false
    },
    "tasks": [
        {
            "label": "Open Terminals",
            "dependsOn": [
                "Local",
                "Remote",
            ],
            "group": {
                "kind": "none",
                "isDefault": true
            },
            "runOptions": {
                "runOn": "default",
                "instanceLimit": 1
            },
            "problemMatcher": []
        },
        {
            "label": "Remote",
            "icon": {
                "id": "terminal-bash"
            },
            "type": "process",
            "command": "${command:workbench.action.terminal.new}",
            "isBackground": true,
            "problemMatcher": [],
            "presentation": {
                "group": "terminal-group"
            }
        },
        {
            "label": "Local",
            "icon": {
                "id": "terminal"
            },
            "type": "process",
            "command": "${command:workbench.action.terminal.newLocal}",
            "isBackground": true,
            "problemMatcher": [],
            "presentation": {
                "group": "terminal-group"
            }
        }
    ]
}
``` 

VS Code version: Code 1.87.2 (Universal) (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:21:31.043Z)
OS version: Darwin x64 23.4.0
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|3, 4, 3|
|Memory (System)|16.00GB (1.90GB free)|
|Process Argv|--disable-extensions --crash-reporter-id 698663ca-bebe-4c27-95a6-d68a8560bdbf|
|Screen Reader|no|
|VM|0%|
</details>Extensions disabled<details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30992800
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
d6fi2104:30959263
cppperfnew:30979542
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonaic:30996667
dsvsc021:30996838

```

</details>

<!-- generated by issue reporter -->