vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Issue with GitHub Copilot in VS Code when using Git Bash on Windows

Open iwangbowen opened this issue 7 months ago • 1 comments

Type: Bug

Issue with GitHub Copilot in VS Code when using Git Bash on Windows

When using GitHub Copilot's agent mode in Windows with Git Bash, there's a consistent path format issue. The agent initially uses Windows path format (backslashes) when executing commands involving file paths, which causes errors in Git Bash. Only after failing does it switch to Git Bash compatible paths (forward slashes).

Could this be fixed by either:

  1. Making the agent recognize Git Bash environment automatically
  2. Adding configuration options to set preferred path format
  3. Using special prompt instructions to inform the agent about the correct path format to use

VS Code version: Code - Insiders 1.101.0-insider (496ebc4723371f29c9ffa0319dcccb2d7bee7ee0, 2025-05-21T05:04:29.987Z) OS version: Windows_NT x64 10.0.26100 Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i5-1340P (16 x 2189)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.64GB (31.12GB free)
Process Argv --crash-reporter-id 3df60e69-6e36-46e5-9b3d-020ce9a3ab01
Screen Reader no
VM 0%
Extensions (147)
Extension Author (truncated) Version
better-comments aar 3.0.2
codesnap adp 1.3.4
markdown-mermaid bie 1.28.0
vs-code-bpmn-io bpm 0.22.1
vscode-tailwindcss bra 0.14.18
ruff cha 2025.22.0
npm-intellisense chr 1.4.5
path-intellisense chr 2.10.0
vscode-markdownlint Dav 0.59.0
vscode-eslint dba 3.0.13
dbcode dbc 1.13.11
FreeMarker dco 0.0.9
dingtalk-toolkit Din 0.2.11
docker doc 0.6.0
gitlens eam 2025.5.2105
EditorConfig Edi 0.17.2
vscode-demo-time eli 1.3.0
magick-image-reader ely 0.5.0
prettier-vscode esb 11.0.0
shell-format fox 7.2.5
codespaces Git 1.17.3
copilot Git 1.322.1576
copilot-chat Git 0.28.2025052101
remotehub Git 0.65.2024112101
vscode-github-actions git 0.27.1
vscode-pull-request-github Git 0.111.2025052104
gc-excelviewer Gra 4.2.63
output-colorizer IBM 0.1.2
icon-fonts idl 2.5.4
svg joc 1.5.4
vscode-gutter-preview kis 0.32.2
vscode-leetcode Lee 0.18.4
i18n-ally lok 2.13.1
marp-vscode mar 3.2.0
rainbow-csv mec 3.19.0
template-string-converter meg 0.6.1
git-graph mhu 1.30.0
dotenv mik 1.0.1
ecdc mit 1.8.0
vscode-filesize mkx 3.2.2
vscode-duplicate mrm 1.2.1
vscode-containers ms- 2.0.1
csharp ms- 2.78.15
dotnet-interactive-vscode ms- 1.0.6264021
vscode-dotnet-pack ms- 1.0.13
vscode-dotnet-runtime ms- 2.3.3
vscode-pgsql ms- 1.4.1
playwright ms- 1.1.14
autopep8 ms- 2025.3.11051009
black-formatter ms- 2025.2.0
debugpy ms- 2025.9.2025052001
flake8 ms- 2025.3.11051009
gather ms- 2025.4.0
isort ms- 2025.1.11191009
mypy-type-checker ms- 2025.3.11071011
pylint ms- 2025.3.10971010
python ms- 2025.7.2025052102
vscode-pylance ms- 2025.5.100
vscode-python-envs ms- 0.3.11391010
datawrangler ms- 1.22.0
jupyter ms- 2025.5.2025052103
jupyter-hub ms- 2024.10.1002831100
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.1.2025012901
python-ds-extension-pack ms- 0.0.1
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-powertoys ms- 0.1.1
vscode-jupyter-slideshow ms- 0.1.6
remote-containers ms- 0.414.0
remote-ssh ms- 0.121.2025050915
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.99.0
remote-wsl-recommender ms- 0.0.20
vscode-remote-extensionpack ms- 0.26.0
cmake-tools ms- 1.21.27
copilot-mermaid-diagram ms- 0.0.2025052101
cpptools ms- 1.25.3
cpptools-extension-pack ms- 1.3.1
extension-test-runner ms- 0.0.12
hexeditor ms- 1.11.1
live-server ms- 0.5.2025051902
powershell ms- 2025.3.0
remote-explorer ms- 0.6.2025051209
remote-repositories ms- 0.43.2024112101
remote-server ms- 1.5.2
vscode-copilot-data-analysis ms- 0.2.2
vscode-github-issue-notebooks ms- 0.0.130
vscode-serial-monitor ms- 0.13.250520001
vscode-speech ms- 0.14.0
vscode-speech-language-pack-zh-cn ms- 0.5.1
vscode-typescript-next ms- 5.9.20250514
vscode-websearchforcopilot ms- 0.1.2025052101
vsliveshare ms- 1.0.5948
windows-ai-studio ms- 0.14.0
typescript-explorer mxs 0.4.2
neo4j-for-vscode neo 1.11.0
angular-console nrw 18.49.3
indent-rainbow ode 8.3.1
vscode-versionlens pfl 1.22.2
material-icon-theme PKi 5.23.0
postman-for-vscode Pos 1.12.0
vscode-css-peek pra 4.4.3
inline-html pus 0.3.10
geo-data-viewer Ran 2.6.0
tmlanguage-syntax-highlighter Red 2.7.2
java red 1.42.0
vscode-commons red 0.0.6
vscode-community-server-connector red 0.26.19
vscode-rsp-ui red 0.24.11
vscode-xml red 0.29.2025051008
vscode-yaml red 1.18.0
redis-for-vscode Red 1.2.0
omegasheets-vscode rep 0.2.0
LiveServer rit 5.7.9
docxreader Sha 1.1.3
sonarlint-vscode Son 4.22.0
code-spell-checker str 4.1.0
code-spell-checker-cspell-bundled-dictionaries str 2.0.0
vscode-stylelint sty 1.5.0
shellcheck tim 0.37.7
vscode-decompiler tin 0.1.0
pdf tom 1.2.2
luna-paint Tyr 0.16.0
errorlens use 3.26.0
intellicode-api-usage-examples Vis 0.2.9
vscodeintellicode Vis 1.3.2
vscodeintellicode-completions Vis 2.0.1
explorer vit 1.18.1
vscode-css-compatibility viv 1.0.2
vscode-boot-dev-pack vmw 0.2.2
vscode-spring-boot vmw 1.62.0
migrate-java-to-azure vsc 0.3.2025052001
vscode-app-mod-pack vsc 0.2.0
vscode-java-debug vsc 0.58.2025042405
vscode-java-dependency vsc 0.24.1
vscode-java-pack vsc 0.29.2024091906
vscode-java-test vsc 0.43.1
vscode-java-upgrade vsc 0.14.0
vscode-maven vsc 0.44.2024072906
vscode-spring-initializr vsc 0.11.2025051201
volar Vue 2.2.10
vscode-wakatime Wak 25.0.3
quokka-vscode Wal 1.0.722
vscode-import-cost wix 3.3.0
pretty-ts-errors Yoa 0.6.1
markdown-all-in-one yzh 3.6.3
material-theme zhu 3.19.0

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551:31249597
vscod805cf:30301675
c4g48928:30535728
a9j8j154:30646983
962ge761:30841072
dsvsc014:30777825
dsvsc015:30821418
h48ei257:31000450
pythontbext0:30879054
cppperfnew:30980852
dwnewjupyter:31046869
pythonrstrctxt:31093868
nativeloc1:31118317
e80f6927:31120813
dwcopilot:31158714
c3hdf307:31184662
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
g012b348:31231168
pythoneinst12:31251391
bgtreat:31252123
c7cif404:31309980
pythonpulldiag:31287486
6gi0g917:31259950
61ibe868:31282443
996jf627:31264550
pythonrdcb7:31268811
usemplatestapi:31297334
8ge78292:31309974
747dc170:31275146
pythonfullctx:31296836
6518g693:31302842
pylancecolor:31288664
generatesymbolt:31280541
convertfstringf:31280702
gendocf:31280703
pylancequickfixt:31311477
18994427:31312178
923gi514:31310909
j97ad248:31306657
a2ijf515:31307742
convertlamdaf:31311570

iwangbowen avatar May 21 '25 12:05 iwangbowen

Image

iwangbowen avatar May 21 '25 12:05 iwangbowen

This is working for me on windows, git bash

Image

meganrogge avatar Jun 03 '25 16:06 meganrogge

I've noticed some kind of related bug using container mode in vscode. When in agent mode, Github Copilot will read and process a given file (on a Ubuntu container), but the updated file will get a path using backslash(as Windows does) instead of slash(as Linux does).

Ueland avatar Jun 11 '25 11:06 Ueland

Hey @Tyriar @meganrogge, this issue might need further attention.

@iwangbowen, you can help us out by closing this issue if the problem no longer exists, or adding more information.

Hey @Tyriar @meganrogge, this issue might need further attention.

@iwangbowen, you can help us out by closing this issue if the problem no longer exists, or adding more information.

The issue still exists. When executing commands in agent mode, path format problems still occur from time to time. However, the agent can usually correct the path format in subsequent executions based on the error messages.

iwangbowen avatar Aug 30 '25 13:08 iwangbowen