Skip to content

Chat context auto adds env file after unchecking it #338100

Description

Type: Bug

  • have the env file open in the editor
  • open chat
  • deselect env file from chat context
  • send message
  • check chat history for env file reference

"You’re right. I shouldn’t have made it sound like you chose to attach it. The .env was included in the context I received and labeled as the active file; I didn’t attach or upload it, and I can’t tell why VS Code included it. I’m sorry.

I also can’t tell from here who can access this chat or how it’s retained, so I shouldn’t have implied the credentials were publicly exposed. The only thing I know is that they appeared in the context sent to me."

"You’re right. You explicitly unchecked it, and it still got sent in the context I received. That’s a failure of the interface, not something you did wrong. I’m sorry I made the situation worse by calling it “attached” as if you’d chosen to include it.

I can’t remove it from this chat or change the interface behavior, but I won’t refer to or use that file again."

VS Code version: Code 1.139.0 (Universal) (2242ebb, 2026-09-22T15:13:34Z)
OS version: Darwin arm64 25.4.0
Modes:

System Info
Item Value
CPUs Apple M2 (8 x 2400)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M2, Version 26.4.1 (Build 25E253))], DRIVER_VENDOR=Apple, DRIVER_VERSION=26.4.1 ACTIVE
Machine model name: Mac
Machine model version: 14.15
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: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 12, 5, 4
Memory (System) 16.00GB (0.24GB free)
Process Argv --crash-reporter-id af3f3a41-c401-4c87-aa95-9f5d7abd65d4 --crash-reporter-id af3f3a41-c401-4c87-aa95-9f5d7abd65d4
Screen Reader no
VM 0%
Extensions (39)
Name Identifier Author Version
JavaScript Snippet Pack akamud.vscode-javascript-snippet-pack akamud 0.1.6
Claude Code for VS Code anthropic.claude-code Anthropic 2.1.282
Astro astro-build.astro-vscode astro-build 2.16.20
Tailwind CSS IntelliSense bradlc.vscode-tailwindcss bradlc 0.16.0
markdownlint davidanson.vscode-markdownlint DavidAnson 0.62.1
ESLint dbaeumer.vscode-eslint dbaeumer 3.0.34
EJS language support digitalbrainstem.javascript-ejs-support DigitalBrainstem 1.3.3
ES7+ React/Redux/React-Native snippets dsznajder.es7-react-js-snippets dsznajder 4.4.3
GitLens — Git supercharged eamodio.gitlens eamodio 19.2.0
Prettier - Code formatter esbenp.prettier-vscode esbenp 12.4.0
GitHub Actions github.vscode-github-actions github 0.32.3
GitHub Pull Requests github.vscode-pull-request-github GitHub 0.166.1
Live Sass Compiler glenn2223.live-sass glenn2223 6.1.5
Spreadsheet Viewer grapecity.gc-excelviewer GrapeCity 4.2.66
GraphQL: Syntax Highlighting graphql.vscode-graphql-syntax GraphQL 1.3.13
HTMLHint htmlhint.vscode-htmlhint HTMLHint 1.16.0
Lorem Whatever jobe451.lorem-whatever jobe451 1.0.2
Shopify Liquid Template Snippets killalau.vscode-liquid-snippets killalau 2.0.3
Rainbow CSV mechatroner.rainbow-csv mechatroner 3.24.1
Babel JavaScript mgmcdermott.vscode-language-babel mgmcdermott 0.0.40
Prettify JSON mohsen1.prettify-json mohsen1 0.0.3
Autoprefixer mrmlnc.vscode-autoprefixer mrmlnc 3.0.1
Container Tools ms-azuretools.vscode-containers ms-azuretools 2.5.2
Python Debugger ms-python.debugpy ms-python 2026.6.0
Python ms-python.python ms-python 2026.4.0
Pylance ms-python.vscode-pylance ms-python 2026.4.1
Python Environments ms-python.vscode-python-envs ms-python 1.38.0
Dev Containers ms-vscode-remote.remote-containers ms-vscode-remote 0.469.0
indent-rainbow oderwat.indent-rainbow oderwat 8.3.1
Prisma prisma.prisma Prisma 31.12.10
Live Server ritwickdey.liveserver ritwickdey 5.7.10
Shopify Liquid shopify.theme-check-vscode Shopify 3.11.10
HTML Boilerplate sidthesloth.html5-boilerplate sidthesloth 1.1.1
Code Spell Checker streetsidesoftware.code-spell-checker streetsidesoftware 4.9.3
Even Better TOML tamasfe.even-better-toml tamasfe 0.21.2
Formatting Toggle tombonnike.vscode-status-bar-format-toggle tombonnike 3.2.0
vscode-pdf tomoki1207.pdf tomoki1207 1.2.2
Pretty TypeScript Errors yoavbls.pretty-ts-errors YoavBls 0.8.7
Markdown All in One yzhang.markdown-all-in-one yzhang 3.6.3
A/B Experiments
vsliv368cf:30146710
pythonvspyt551:31249599
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
editstats-enabled:31346257
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
839jf696:31457053
ddidt:31399633
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31572277
c3h7c220:31478652
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
c9b86496:31447327
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
23c7c724:31520045
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
jh5f2457_c:31540921
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
ahp-both-windows:31556933
ihg5j128:31534457
9gg7f176:31542112
sandbox-ui-on-2:31543161
nes-ex-cf-euporie-03:31542868
enable_editor_pane_layout:31569726
allow-none:31555437
ac562147:31564510
c7c27ce7:31554789
1h923230:31564177
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
0c1h4866:31566224
session-mark-done:31558131
5b8j3302:31564601
autotiers:31584978
mangle-name-control:31572633
allow-signed-out:31584137
b17abb00-cfec-4134-90da-ee5e32ce4426:31589248
intellij_nes_preview_t:31580086
39a5d156:31574986
2bfb8b39:31585911
unread:31581112
links-treatment:31587702
aw-autom-on:31583758
revealsession_treatment_7ed7e840:31582194
usage_tips_endabled_0911:31587631
4ab0b639:31584543
codex-agent-host-stable-control:31588614
54hd3363:31588611
66c8a39e-e7a5-4b4c-a3c0-41b161c795c4:31586113
sessioninlinediffenabled_enabled:31587635
b169b0b1-b17e-475c-9032-91b9b24dde97:31589214
ca19f5eb-b04f-4f52-8e6b-9f6927d4e0dc:31589210
deb27201-791d-4a8f-886b-37cdfe18a3df:31589213
c421e94a-2965-4255-b6e3-fc416a37e073:31589304
permission_prompt_control:1332567
ccr_pr_nudge_adoption:1319471
vsc_wsm_c:1340633
ce50c479:1417073
cfee5631:1379228
3aced641:1389836

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions