Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#339241·VS Code

Copilot Chat: Agent loops when reading a ~500-line file

Author: kh4fCreated Oct 2, 2026Updated Oct 2, 2026

After recent VS Code Insiders updates, some models can get stuck in an infinite loop when reading a moderately sized file.

Image Image

Repro

  1. Clone https://github.com/kh4f/flexplorer
  2. Open it in VS Code and attach src/core/dnd-engine.ts to the chat.
  3. Select deepseek-v4.1-flash or glm-5.3-flash in agent mode.
  4. Send: On mobile devices, make dragging start only after a 1-second long press on the drag handle

Expected

The agent should be able to read a 497-line / 17.8 KB file, either in one call (via "forceReadLargeFiles": true) or by reading appropriate ranges/chunks.

Actual

The agent gets confused and keeps re-reading the same file indefinitely.

Logs

Model Chat Debug Logs (.copilotmd) Exported Chat (.json)
DeepSeek V4.1 Flash deepseek-v4.1-flash.copilotmd deepseek-v4.1-flash.json
GLM 5.3 Flash glm-5.3-flash.copilotmd glm-5.3-flash.json

Environment

...

Initial Environment (bug discovered):

Version: 1.141.0-insider (user setup)
Commit: ec2e580674cdb512aa9b2a9596ab35d8a9590f1e
Date: 2026-10-01T04:00:54Z
Electron: 43.7.3
ElectronBuildId: 15386805
Chromium: 150.0.7871.250
Node.js: 24.21.0
V8: 15.0.245.31-electron.0
@github/copilot: 1.0.90
@github/copilot-sdk: 1.0.16
OS: Windows_NT x64 10.0.26200

Updated Environment (the issue persists):

Version: 1.141.0-insider (user setup)
Commit: de892dd1f9971e3a7d8c758a8788d86854047605
Date: 2026-10-02T04:07:15Z
Electron: 43.7.3
ElectronBuildId: 15386805
Chromium: 150.0.7871.250
Node.js: 24.21.0
V8: 15.0.245.31-electron.0
@github/copilot: 1.0.92-0
@github/copilot-sdk: 1.0.17-preview.0
OS: Windows_NT x64 10.0.26200

Source: microsoft/vscode

View original on GitHubView discussion on GitHub