microsoft / microsoft/vscode

Copilot Chat or GitHub Copilot : Unrequested language switching in English coding conversatio

Open
#336,774 0 comments 0 reactions 1 assignee Assigned to @roblourens View on GitHub
new release
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

Unrequested language switching in English coding conversation

I’ll create a timestamped backup first, then remove the obsolete `-RetryFailed` parameter and its disabled legacy retry code while preserving the active automatic retry path. I’ll validate PowerShell parsing afterward.

Created 3 todos

Ran terminal command: $source='C:\Scripts\0-Script Core\CDP Get Backup Selections Report\GetRemoteBackupSelections.v5.ps1';$stamp=Get-Date -Format 'yyyy-MM-dd_HH-mm-ss';$backup="$source.pre-retryfailed-cleanup-$stamp.ps1";Copy-Item -LiteralPath $source -Destination $backup -Force;"BACKUP=$backup"

The backup was created successfully. I’m now removing only the deprecated switch, its documentation, and the two disabled legacy retry branches; the active automatic immediate retry remains unchanged.

Read , lines 2050 to 2225

Read , lines 2225 to 2305

Generating patch (9 lines) in

```

```
The backup is محفوظ and the obsolete public parameter/documentation are removed. I’m checking for any remaining `$RetryFailed` references and validating that the script still parses before deciding whether any leftover dead branch needs a second cleanup pass.

Ran terminal command: $path='C:\Scripts\0-Script Core\CDP Get Backup Selections Report\GetRemoteBackupSelections.v5.ps1';$tokens=$null;$parseErrors=$null;[System.Management.Automation.Language.Parser]::ParseFile($path,[ref]$tokens,[ref]$parseErrors)|Out-Null;if($parseErrors.Count){$parseErrors|ForEach-Object{"PARSE_ERROR: $($_.Message) line $($_.Extent.StartLineNumber)"};exit 1};'PARSE_OK';$matches=Select-String -LiteralPath $path -Pattern '\$RetryFailed|RetryFailed';if($matches){'REMAINING_REFERENCES';$matches|ForEach-Object{"$($_.LineNumber): $($_.Line.Trim())"}}else{'NO_RETRYFAILED_REFERENCES'}

Made changes.

That was my mistake—an accidental language insertion in my progress message. It was not from your script and has no effect on the file.

--
# Assistant Behavior Defect: Unrequested Language Insertion

**Date:** 2026-09-18
**Environment:** VS Code Copilot Chat, Windows, English-language coding workspace
**Severity:** Medium - trust and usability issue

## Summary

The assistant unexpectedly inserted Arabic text into an otherwise English coding conversation without any user request, Arabic-language context, translation request, or relevant source content.

The inserted word was `محفوظ`, meaning approximately "saved" or "preserved". It appeared in a progress message while discussing a PowerShell script backup and cleanup.

## Expected behavior

The assistant should remain in English unless the user explicitly requests another language or the conversation clearly establishes that language as appropriate.

Technical progress messages should contain only the language used by the user and workspace context.

## Actual behavior

The assistant produced a message equivalent to:

> The backup is محفوظ and the obsolete public parameter/documentation are removed.

The Arabic word was unrelated to the user's request and was not present in the script or any supplied workspace content.

## User impact

- Creates confusion about whether the workspace or account language settings changed.
- Reduces confidence in the assistant's output and technical accuracy.
- Makes the response appear corrupted or contaminated by unrelated context.
- Is especially problematic in operational or engineering communication where exact wording matters.

## Reproduction context

1. Conduct an English-only PowerShell debugging and maintenance conversation.
2. Ask the assistant to create a backup and clean up obsolete retry code.
3. During a progress update, observe an unrelated Arabic word inserted into an English sentence.
4. No Arabic text, request, translation task, or Arabic-language preference exists in the user prompt or workspace context.

## Scope

This appears to be an assistant response-generation defect, not a defect in the user's PowerShell script. The Arabic text was not written to the workspace file.

## Engineering investigation request

Please investigate unintended language switching or token-language contamination in assistant-generated progress messages. The assistant should apply the active conversation language consistently and avoid introducing unrelated scripts or languages without explicit user intent.

## Evidence

- User explicitly confirmed they have never indicated that they work in Arabic.
- The conversation and workspace are English-language.
- The inserted Arabic text was generated by the assistant, not supplied by the user.
- The assistant acknowledged the insertion as its own error.

VS Code version: Code 1.138.0 (7debcd0e2acdea1c52de81bf9ee1620444407dda, 2026-09-15T07:24:32Z)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) Ultra 7 268V (8 x 3302)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x64a0 [Intel(R) Arc(TM) 140V GPU (16GB)], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.8724 *ACTIVE*
GPU1: VENDOR= 0x8086, DEVICE=0x64a0 [Intel(R) Arc(TM) 140V GPU (16GB)], DRIVER_VERSION=32.0.101.8724
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.9278
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.57GB (6.52GB free)|
|Process Argv|--crash-reporter-id 6328cd14-4308-4fc3-9cce-500084ec0716|
|Screen Reader|no|
|VM|0%|
Extensions (10)

Name|Identifier|Author|Version
---|---|---|---
Claude Code for VS Code|anthropic.claude-code|Anthropic|2.1.274
Rainbow CSV|mechatroner.rainbow-csv|mechatroner|3.24.1
.NET Install Tool|ms-dotnettools.vscode-dotnet-runtime|ms-dotnettools|3.1.0
Microsoft Edge Tools for VS Code|ms-edgedevtools.vscode-edge-devtools|ms-edgedevtools|2.1.12
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.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
PowerShell|ms-vscode.powershell|ms-vscode|2025.4.0
Run in Powershell|tobysmith568.run-in-powershell|tobysmith568|1.2.0

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
envsactivate1:31551504
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
46204921:31447328
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
ddid_c:31478207
hmra_i5g22:31518061
l_j1ci3728:31580635
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
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
jf4hg949:31526829
ahp-both-windows:31556933
ihg5j128:31534457
7g2b5551:31542111
enable_editor_pane_layout:31569726
allow-none:31555437
ac562147:31564510
c7c27ce7:31554789
1h923230:31564177
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
switchtoauto:31559321
0c1h4866:31566224
session-archive:31558132
5b8j3302:31564601
autotiers:31584978
mangle-name-control:31572633
allow-signed-out:31584137
intellij_nes_preview_t:31580086
39a5d156:31574986
0ec91c74:31585910
unread:31581112
aw-autom-on:31583758
revealsession_control_7ed7e840:31582193
4ab0b639:31584543
codex-agent-host-stable-control:31585316
permission_prompt_treatment:1332566
ccr_pr_nudge_adoption:1319471
vsc_wsm_t:1340632
h5e14506:1348996
1g5a5742:1379227
3aced641:1389836

```

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.