Skip to content

Search stuck and never finishes #4448

Description

@jshihpason

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions