github / github/copilot-cli

Search stuck and never finishes

Open
#4,448 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:tools
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the bug

I created a md to work around the issue, and it has the description

cat ~/.copilot/instructions/search-tool-workaround.instructions.md

Search / grep tool workaround

In this environment the built-in grep tool (and code-search tooling built on
it) can stall for minutes on the "Search" spinner, even though the underlying
ripgrep work completes in milliseconds. This is a tool-invocation-layer issue,
not a real search cost:

  • Single-file ripgrep: ~2 ms
  • Whole 70 GB / ~825k-file working tree: ~3.8 s

So the multi-minute "Search" hangs are NOT caused by ripgrep or repo size.

Guidance

  • Prefer plain grep/rg and view/cat/sed via the bash tool for
    searching file contents and reading files. These return in milliseconds.
  • Avoid the built-in grep tool here until the responsiveness bug is fixed.
  • Always scope searches to a specific path/file when possible
    (e.g. grep -nE 'pattern' path/to/file).
Affected version

GitHub Copilot CLI 1.0.79

Steps to reproduce the behavior

everytime it needs to Search

Search "something" ....

which stuck forever

Expected behavior

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the hang in GitHub Copilot CLI 1.0.79 using the built-in Search/grep tool, then compare it with the bash-based grep or rg commands described in ~/.copilot/instructions/search-tool-workaround.instructions.md. Trace the Search invocation layer rather than ripgrep performance. Done means searches complete instead of remaining on the Search spinner.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.