Skip to content

Notebook Generate ignores extension-contributed chatInstructions #320210

@meanderix

Description

@meanderix

Type: Bug

Description

The notebook cell "Generate" action does not include applicable extension-contributed chatInstructions in the prompt sent to the selected language model.

This creates inconsistent behavior between regular Chat and notebook Generate.
It particularly affects extensions that provide custom notebook types or languages for which the model requires language-specific guidance.

Steps to reproduce

  1. Create a VS Code extension that contributes:
    • a custom language
    • a custom notebook type whose code cells use that language
    • a chatInstructions resource applicable when notebookType or
      editorLangId matches
  2. Open a notebook using that notebook type.
  3. Add or select a code cell.
  4. Invoke the notebook cell "Generate" action.
  5. Inspect the generated model request using "Show Chat Debug View" or a local
    model endpoint.

Expected behavior

The generated request includes the applicable contributed instructions, just as other contextual Chat requests do.

Actual behavior

The contributed instruction file is absent.

Notebook Generate includes generic notebook context and may include agent instructions such as AGENTS.md, but it does not resolve applicable chatInstructions.

Impact

Custom language and notebook extensions cannot reliably supply the syntax, semantics, and conventions needed to generate valid cells.

The available workaround is to add an entry to:

github.copilot.chat.codeGeneration.instructions

That setting is deprecated, requires modifying user or workspace settings, and does not provide a suitable extension integration mechanism.

Suggested resolution

Either:

  1. Resolve and include applicable contextual chatInstructions when building notebook Generate prompts, or
  2. Expose a supported extension API/contribution point for notebook generation instructions.

Environment

VS Code version: Code 1.123.0 (6a44c35, 2026-06-03T11:29:03+02:00)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 6.6.114.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x3e9b [Intel(R) UHD Graphics 630], DRIVER_VENDOR=Intel, DRIVER_VERSION=27.20.100.9664 ACTIVE
GPU1: VENDOR= 0x10de, DEVICE=0x1c8c [NVIDIA GeForce GTX 1050 Ti with Max-Q Design], DRIVER_VERSION=31.0.15.2879
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.22621.2506
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) 31.74GB (14.10GB free)
Process Argv --folder-uri=vscode-remote://wsl+Ubuntu24.04/projects/mantra --remote=wsl+Ubuntu24.04 --crash-reporter-id 53be4572-77b5-4d22-b592-69085f85887f
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu24.04
OS Linux x64 6.6.114.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 0)
Memory (System) 15.62GB (12.82GB free)
VM 0%
Extensions (14)
Name Identifier Author Version
Pascal alefragnani.pascal alefragnani 10.0.0
Continue - open-source AI code agent continue.continue Continue 1.2.22
GitLens — Git supercharged eamodio.gitlens eamodio 18.0.0
GDB Debugger - Beyond jakubklos.beyond-debug jakubklos 1.10.1
Hex Editor ms-vscode.hexeditor ms-vscode 1.11.1
Codex – OpenAI’s coding agent openai.chatgpt openai 26.5602.40724
Mantra undefined_publisher.mantra-vscode undefined_publisher 0.0.1
OmniPascal - Open Preview wosi.omnipascal Wosi 0.19.0
Numbered Bookmarks alefragnani.numbered-bookmarks alefragnani 9.0.0
Project Manager alefragnani.project-manager alefragnani 13.1.0
VSCode Great Icons emmanuelbeziat.vscode-great-icons emmanuelbeziat 2.1.121
varnish-vcl floone.varnish-vcl floone 0.1.3
Jupyter Keymap ms-toolsai.jupyter-keymap ms-toolsai 1.1.2
WSL ms-vscode-remote.remote-wsl ms-vscode-remote 0.104.3
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsdeactivate2:31505458
editstats-enabled:31346257
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
inlinechat_v2_hd992725:31505030
4je02754:31466945
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31490510
38bie571_auto:31478677
cp_cls_c_1081:31454833
conptydll_true:31498968
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
23c7c724:31520045
ddid_t:31478206
hmra_i5g22:31518061
getcmakediagnosticson:31489824
7df3h592:31512476
pro_large_t:31499376
cp_cls_t_1082:31516087
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_c_632:31524806
b1ei0813:31506238
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
nes-charagree-1:31521370
2cfga817_c:31522397
jh5f2457_c:31515489
api_cot_ctrl:31513533
g4a0e106:31517209
61138546:31518536
d7b18187:31526828

Metadata

Metadata

Assignees

Labels

new releaseIssues found in a recent release of VS Code

Type

No type
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