Skip to content

"[warning] Working directory resolves to different path" due to case-sensitive comparison #26050

Description

@hunterhogan

We have written the needed data into your clipboard because it was too large to send. Please paste.

Type: Bug

Behaviour

In many or all Workspaces with an NT path, the Python extension emits

<date> <time> [warning] Working directory resolves to different path: c:\<correct>\<path> -> C:\<correct>\<path>. Checking for symlinks in parent directories.
  • The only difference is that the first drive letter is always lowercase and the second drive letter is always uppercase.
  • If the mismatch causes other problems, I am not aware of the connection.
Stream-of-consciousness conjecture

When the testing panel is open, every (or almost every) keystroke in the editor causes the Python extension to rescan for tests (pytest configured), so the test tree disappears for a few seconds, then repopulates. To me, it is annoying; however, I have always assumed the system was working as intended, so I never opened an Issue.

But as I wrote, "If the mismatch causes other problems, I am not aware of the connection," it occurred to me that there is a remote chance the constant refresh is due to the path mismatch. Pure conjecture, no evidence:

  1. Because the paths don't match, the extension saves a null value in the "Working-directory-resolves" variable.
  2. In a different process, a subroutine monitors for changes that necessitate a test rescan.
  3. The subroutine relies, in part, on the "Working-directory-resolves" variable (perhaps to hash file contents or get last-modified data).
  4. The null value in the "Working-directory-resolves" variable prevents the subroutine from operating efficiently,
    1. so on every file save
    2. (Ah-ha! I have autosave-on-inactivity enabled),
    3. the subroutine uses its fallback process, which is to
    4. rescan every file in the workspace.

Steps to reproduce:

  1. Configure the test panel options????
  2. Have a problem in the test panel.
  3. Click on the test panel link to open the output panel.
  4. See the warning that doesn't help you resolve the real problem, such as pytest not being installed.

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2026-07-20 14:35:41.508 [info] [test-by-project] Cleaned up 1 test items for workspace: c:\clones\python-soundfile
2026-07-20 14:35:41.508 [info] [test-by-project] Discovering projects for workspace: c:\clones\python-soundfile
2026-07-20 14:35:41.508 [info] [test-by-project] Found 1 total Python projects from API
2026-07-20 14:35:41.509 [info] [test-by-project] Filtered to 1 projects in workspace
2026-07-20 14:35:41.509 [info] [test-by-project] Creating adapter for: python-soundfile at file:///c%3A/clones/python-soundfile
2026-07-20 14:35:41.509 [info] [test-by-project] Registered 1 project(s) for c:\clones\python-soundfile
2026-07-20 14:35:41.510 [info] [test-by-project] Starting discovery for 1 project(s) in workspace
2026-07-20 14:35:41.510 [info] [test-by-project] Discovering tests for project: python-soundfile (Python 3.14)
2026-07-20 14:35:41.510 [warning] Working directory resolves to different path: c:\clones\python-soundfile -> C:\clones\python-soundfile. Checking for symlinks in parent directories.
2026-07-20 14:35:41.511 [info] arg: --rootdir already exists in args, not adding.
2026-07-20 14:35:41.511 [info] Environment variables set for pytest discovery: PYTHONPATH=c:\Users\hunte\.vscode-insiders\extensions\ms-python.python-2026.5.2026070801-win32-x64\python_files, TEST_RUN_PIPE=\\.\pipe\python-test-discovery-ed54e608dab12aeea168
2026-07-20 14:35:41.511 [info] Using environment extension for pytest discovery in workspace c:\clones\python-soundfile
2026-07-20 14:35:41.518 [info] Started pytest discovery subprocess (environment extension) for workspace c:\clones\python-soundfile
2026-07-20 14:35:41.594 [error] c:\clones\python-soundfile\.venv\Scripts\python.exe: No module named pytest

2026-07-20 14:35:41.602 [error] pytest discovery failed with exit code 1 and signal null for workspace c:\clones\python-soundfile. Creating error payload.
2026-07-20 14:35:41.603 [error] pytest test discovery error for workspace:  c:\clones\python-soundfile 
  
 The python test process was terminated before it could exit on its own, the process errored with: Code: 1, Signal: null for workspace c:\clones\python-soundfile
2026-07-20 14:35:41.603 [info] Pytest discovery completed for workspace c:\clones\python-soundfile
2026-07-20 14:35:41.603 [info] [test-by-project] Project python-soundfile (Python 3.14) discovery completed
2026-07-20 14:35:41.603 [info] [test-by-project] Discovery complete: 1/1 projects completed


More TS info

  • the problem has existed for a long time.
  • I don't remember if it has always existed or if there was a starting date.
  • C: is just a plain NTFS drive
  • The problem certainly happens in both of my main directories, c:\apps and c:\clones, and maybe others.
  • The directories are not symlinks.
  • Each workspace is a subdirectory, and no workspace is itself a symlink.
  • I have not put effort into troubleshooting; I'm just doing a brain dump of relevant facts.
C:\>psinfo -d

PsInfo v1.79 - Local and remote system information viewer
Copyright (C) 2001-2023 Mark Russinovich
Sysinternals - www.sysinternals.com

System information for \\DUDA:
Uptime:                    2 days 20 hours 58 minutes 29 seconds
Kernel version:            Windows 10 Pro, Multiprocessor Free
Product type:              Professional
Product version:           6.3
Service pack:              0
Kernel build number:       26200
Registered organization:
Registered owner:          nunya
IE version:                9.0000
System root:               C:\WINDOWS
Processors:                16
Processor speed:           1.8 GHz
Processor type:            AMD Ryzen 7 5700U with Radeon Graphics
Physical memory:           13214 MB
Video driver:              AMD Radeon(TM) Graphics
Volume Type       Format     Label                      Size       Free   Free
    C: Fixed      NTFS                             929.56 GB  295.05 GB  31.7%
    G: Fixed      FAT32      Google Drive           15.00 GB   13.84 GB  92.3%

C:\>dir /ad
...
05/07/2024  02:08 PM    <DIR>          $AV_AVG
05/06/2024  11:12 PM    <DIR>          $RECYCLE.BIN
06/10/2026  05:51 AM    <DIR>          AMD
06/30/2026  11:59 AM    <DIR>          apps
07/12/2026  04:14 PM    <DIR>          clones
06/05/2021  06:47 AM    <DIR>          Config.Msi
...

C:\>dir /al
 Volume in drive C has no label.
 Volume Serial Number is EE8F-7C8C

 Directory of C:\

05/07/2024  10:50 AM    <JUNCTION>     Documents and Settings [C:\Users]
               0 File(s)              0 bytes
               1 Dir(s)  316,805,861,376 bytes free

C:\>dir \apps \clones /al /b
File Not Found
File Not Found

Extension version: 2026.5.2026070801
VS Code version: Code - Insiders 1.130.0-insider (e586b8ac6e718785ed7271c162794c04f8d85648, 2026-07-20T04:43:17Z)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info
Item Value
CPUs AMD Ryzen 7 5700U with Radeon Graphics (16 x 1797)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x1002, DEVICE=0x164c [AMD Radeon(TM) Graphics], DRIVER_VENDOR=AMD, DRIVER_VERSION=31.0.21925.1001 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8875
Machine model name:
Machine model version:
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
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 12.90GB (1.88GB free)
Process Argv
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions