copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

CLI enters infinite text scanning loop with large context

Open niksacdev opened this issue 3 months ago • 3 comments

Describe the bug

Problem: The GitHub Copilot CLI enters an infinite text scanning loop when working in directories with large context. The terminal becomes unresponsive and continues scanning indefinitely without producing results or allowing user interruption.

copilot --version = 0.0.346 Commit: 74e4d22

Environment:

  • OS: Linux (Debian GNU/Linux 12 bookworm in dev container)
  • Shell: zsh
  • Context size: Large monorepo with multiple applications and extensive documentation

Steps to Reproduce:

  1. Ask copilot to update documentation or create large code changes
  2. copilot starts working and then after some time CLI begins scanning context
  3. Scanning continues indefinitely without timeout
  4. Unable to interrupt or cancel gracefully

SEE IMAGES for behavior (GITHUB does not let me add video to show auto scrolling effect during the loop but the text is just scanning the entire terminal)

Actual Behavior:

  • Infinite scanning loop
  • No timeout mechanism
  • Terminal becomes unresponsive
  • No way to limit context scope

Workaround: Only way is to close terminal and start a new session

Image Image Image

Affected version

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

niksacdev avatar Oct 21 '25 14:10 niksacdev

Also mentioned in https://github.com/github/copilot-cli/issues/451

Something we have heard multiple reports of and intent on prioritizing.

EvanBoyle avatar Nov 12 '25 01:11 EvanBoyle

Can confirm:

I'll help you clean up naming in your codebase. Let me first explore the project structure to understand what needs to be cleaned up.

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory tests
   └ 31 files found

 ✔ List directory dut
   └ 17 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ Read config.py
   └ 170 lines read

 ✔ Read conftest.py
   └ 26 lines read

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ● Let me explore the key directories and files to understand the naming patterns:

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ Read config.py
   └ 170 lines read

 ✔ Read conftest.py
   └ 26 lines read

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ● Let me look at the main Python files to identify naming issues:

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ Read config.py
   └ 170 lines read

 ✔ Read conftest.py
   └ 26 lines read

 ✔ List directory .
   └ 34 files found

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ● Let me explore the project to understand the naming issues:

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ✔ List directory .
   └ 34 files found

 ✔ Read README.md
   └ 22 lines read

 ✔ Glob "**/*.py"
   └ 6957 files found

 ● Operation cancelled by user```

tom-rtx avatar Nov 24 '25 07:11 tom-rtx

For me, a workaround was to move my venv outside the working directory.

tom-rtx avatar Nov 24 '25 07:11 tom-rtx