GitHub Copilot inline suggestions fail when parent directory name contains a space on Windows
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
# GitHub Copilot inline suggestions fail when parent directory name contains a space on Windows
## Description
GitHub Copilot ghost-text/inline completions stop working when the active file is inside a directory whose name contains a space.
The issue is reproducible with a minimal Python file in a clean directory.
Removing the space from the directory name immediately restores inline suggestions.
## Steps to reproduce
Create these two directories:
```text
D:\copilot-space-test\
├── TEST\
│ └── test.py
│
└── TEST TEST\
└── test.py
```
Both `test.py` files contain exactly:
```python
# calculate the factorial of a number
```
Open `D:\copilot-space-test` in VS Code.
### Test 1 — directory without a space
Open:
```text
D:\copilot-space-test\TEST\test.py
```
Press Enter after the comment and start typing:
```python
def
```
Copilot provides an inline/ghost-text completion as expected.
### Test 2 — directory containing a space
Open the identical file:
```text
D:\copilot-space-test\TEST TEST\test.py
```
Press Enter after the comment and type:
```python
def
```
No inline suggestion is provided.
The Copilot status menu reports:
```text
No inline suggestion available
```
### Test 3 — rename the directory
Rename:
```text
TEST TEST
```
to something without a space, for example:
```text
TEST-TEST
```
Open the same `test.py` again.
Inline suggestions immediately start working.
## Reproduction commands
The test environment can be created in PowerShell with:
```powershell
New-Item -ItemType Directory -Force "D:\copilot-space-test\TEST" | Out-Null
New-Item -ItemType Directory -Force "D:\copilot-space-test\TEST TEST" | Out-Null
'# calculate the factorial of a number' | Set-Content "D:\copilot-space-test\TEST\test.py"
Copy-Item "D:\copilot-space-test\TEST\test.py" "D:\copilot-space-test\TEST TEST\test.py"
code "D:\copilot-space-test"
```
## Expected behavior
Copilot inline suggestions should work in both directories.
## Actual behavior
```text
D:\copilot-space-test\TEST\test.py
→ inline suggestions work
D:\copilot-space-test\TEST TEST\test.py
→ no inline suggestions
```
The only relevant difference is the space in the parent directory name.
## Additional information
- The issue is not specific to Python. I originally encountered it with `.tex` files as well.
- It occurs in a clean test directory outside OneDrive.
- I have reproduced it with multiple directory names containing spaces.
- Copilot Chat and Next Edit Suggestions continue to work.
- This appears to be a regression: inline suggestions previously worked in my existing directories containing spaces.
## Environment
- VS Code: 1.135.0
- OS: Windows 11 x64 (`Windows_NT x64 10.0.26200`)
- GitHub Copilot: Pro
Contributor guide
Assessment
This issue has not been assessed yet.