microsoft / microsoft/vscode

Copilot agent host injects incomplete GIT_CONFIG_* environment tuple on Windows linked worktrees

Open
#336,183 0 comments 0 reactions 1 assignee Claimed by @lszomoru View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

Environment:
- Windows
- VS Code with GitHub Copilot Chat agent session
- Linked Git worktree
- Git for Windows

Observed:
The agent process begins with an incomplete indexed Git configuration tuple:

GIT_CONFIG_COUNT=6
GIT_CONFIG_KEY_0=safe.bareRepository
GIT_CONFIG_VALUE_0=explicit
GIT_CONFIG_KEY_1=credential.interactive
GIT_CONFIG_VALUE_1=never
GIT_CONFIG_KEY_2=core.fsmonitor
GIT_CONFIG_VALUE_2=
GIT_CONFIG_KEY_3=safe.bareRepository
GIT_CONFIG_VALUE_3=explicit
GIT_CONFIG_KEY_4=credential.interactive
GIT_CONFIG_VALUE_4=never
GIT_CONFIG_KEY_5=core.fsmonitor
GIT_CONFIG_VALUE_5=

Git treats GIT_CONFIG_COUNT as declaring indexed entries 0 through 5, so
each GIT_CONFIG_KEY_n needs a corresponding GIT_CONFIG_VALUE_n. The missing
values required process-local repair before Git/ACE commands were reliable:

$env:GIT_CONFIG_VALUE_2 = 'true'
$env:GIT_CONFIG_VALUE_5 = 'true'

Expected:
The Copilot agent host must either:
1. omit the core.fsmonitor entries entirely, or
2. provide a non-empty matching GIT_CONFIG_VALUE_n for every emitted
GIT_CONFIG_KEY_n, and
3. validate the complete indexed tuple before starting the agent process.

Impact:
This adds unreliable Git-command behavior and obscures diagnosis of unrelated
repository/tooling defects. Agents may be tempted to modify shared Git config
to work around an environment-construction defect, which is unsafe in linked
worktrees.

VS Code version: Code 1.137.0 (645f29cc3176500b4b5762ba887cf2a7f0ffdf2c, 2026-09-08T13:43:59-07:00)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|AMD EPYC 7763 64-Core Processor (16 x 2445)|
|GPU Status|2d_canvas: unavailable_software
GPU0: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VENDOR=Microsoft, DRIVER_VERSION=10.0.26100.9278 *ACTIVE*
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.9278
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.9278
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: disabled_software
video_encode: disabled_software
webgl: unavailable_software
webgpu: unavailable_software
webnn: unavailable_software|
|Load (avg)|undefined|
|Memory (System)|63.95GB (28.33GB free)|
|Process Argv|--new-window C:\\Users\\dahol\\Repos\\engage-product-worktrees\\ace-project-registry-sp-tools-adapter C:\\Users\\dahol\\Repos\\engage-product-worktrees\\ace-project-registry-sp-tools-adapter\\projects\\ace\\ace-platform\\ace\\tmp\\ace-018-architecture-session-1-kickoff.md --crash-reporter-id 2016cb4d-17ce-498e-953a-f3b70a10d1b5|
|Screen Reader|no|
|VM|0%|
Extensions (4)

Name|Identifier|Author|Version
---|---|---|---
Dev Box|devcenter.ms-devbox|DevCenter|2.2.0
Remote Explorer|ms-vscode.remote-explorer|ms-vscode|0.5.0
Remote - Tunnels|ms-vscode.remote-server|ms-vscode|1.5.3
YAML|redhat.vscode-yaml|redhat|1.21.0

A/B Experiments

```
vsliv368:30146709
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
8hhj4413:31478653
cp_cls_t_1081:31454832
conptydll_true:31498968
core-renderer-profiling-on:31440367
e9c30283:31461165
c9b86496:31447327
control_6dc23131:31582662
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
ddid_t:31478206
hmra_i5g22:31518061
l_j1ci3728:31580635
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
748c7209:31512887
32d76977:31512328
ha629193:31508444
jh5f2457_c:31540921
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
jf4hg949:31526829
ahp-both-windows:31556933
ihg5j128:31534457
7g2b5551:31542111
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
c7c27ce7:31554789
1h923230:31564177
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
a1hcc538:31559322
0c1h4866:31566224
vrbsty_fls:31561059
session-mark-done:31558131
5b8j3302:31564601
mangle-name-treatment:31572634
intellij_nes_preview_t:31580086
39a5d156:31574986
2bfb8b39:31576696
outline:31581109
aw-autom-on:31583758
revealsession_treatment_7ed7e840:31582194
permission_prompt_control:1332567
ccr_pr_nudge_auto_review:1319472
vsc_wsm_c:1340633
jidc7660:1370295
14b85561:1348997
cfee5631:1379228
3aced641:1389836

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.