microsoft / microsoft/vscode

GitHub Copilot inline suggestions consistently fail in Jupyter notebooks

Open
#334,262 0 comments 0 reactions 1 assignee Claimed by @federicobrancasi View on GitHub
stale triage-needed
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

### GitHub Copilot inline suggestions consistently fail in Jupyter notebooks

GitHub Copilot inline suggestions work normally in `.py` Python files but fail in `.ipynb` Jupyter notebook code cells.

This occurs consistently across multiple VS Code/Copilot versions and in completely isolated VS Code environments.

#### Reproduction

1. Open a Python `.ipynb` notebook in VS Code.
2. Select a working Python kernel.
3. Enter code that would normally trigger a Copilot inline suggestion.
4. No ghost-text suggestion appears.
5. Equivalent code in a `.py` file produces suggestions normally.

#### Troubleshooting performed

Reproduced on:

* VS Code 1.136 / Copilot Chat 0.64
* VS Code 1.135 / Copilot Chat 0.63
* VS Code 1.134 / Copilot Chat 0.62

Also reproduced with:

* Fresh `--user-data-dir`
* Fresh `--extensions-dir`
* Only Python, Jupyter and GitHub Copilot installed
* Notebook copied outside the original Git repository/workspace
* Cleared Copilot and VS Code workspace state

Python IntelliSense/Pylance continues to work correctly.

Copilot authentication and network requests also succeed.

#### Relevant logs

In some runs:

`DocumentMissingInHistoryContext`

In other runs the NES request reaches the Copilot service successfully, but the model returns an empty completion:

`choice {"delta":{"content":""},"finish_reason":"stop"}`

followed by:

`no edit, reason: noSuggestions`

There is also repeatedly:

`Failed to create database. Falling back to in-memory db: Error: unable to open database file`

However, Copilot continues successfully authenticating and making requests after this error.

The issue appears specific to Copilot inline suggestions / NES in Jupyter notebook cells.

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.