github / github/copilot-cli

Runaway copilot-file-search thread consumes CPU and unbounded disk while session is idle

Open
#4,710 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Version: GitHub Copilot CLI 1.0.83-3 on Ubuntu 24.04

Summary

While a copilot --yolo session reports its status as idle, an internal copilot-file-search thread can continue running indefinitely, pinning a CPU core and writing an unbounded per-process diagnostic log under ~/.copilot/logs/ until the disk fills to 100%.

Observed behavior

  • The session's foreground process stays alive and its reported status is idle, but the process is not actually idle at the OS level.
  • The internal copilot-file-search thread crawls/indexes the working directory at ~50% CPU and does not stop on its own.
  • The per-process diagnostic log in ~/.copilot/logs/ grows continuously — observed rates around 8 MiB per 10 seconds — with no apparent size cap or rotation. Individual logs reached 6–22 GB before intervention.
  • On large or deeply nested directory trees, the crawler appears to get stuck (repeated traversal, symlink-loop-like behavior) rather than completing and going quiet.

Impact

  • Root filesystem exhaustion (reached 100% used in the worst case), which affects the whole machine, not just the session.
  • Sustained CPU consumption for an ostensibly idle session.

Reproduced

Seen multiple times in a 24h span, all with the identical signature: idle status + active copilot-file-search thread + a continuously growing diagnostic log under ~/.copilot/logs/. Killing the process is the only thing that stops it; the log then has to be deleted manually to reclaim space.

Expected behavior

  • File-search/indexing should terminate (or throttle) when the session is idle.
  • The crawler should detect and break traversal loops instead of looping indefinitely.
  • Diagnostic logs should be size-capped or rotated so a single session cannot exhaust the disk.

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 idle-session behavior and inspect the copilot-file-search activity alongside per-process files under ~/.copilot/logs/. Trace whether traversal repeats and whether logging grows without bounds. Done means idle sessions stop or throttle indexing, traversal loops terminate, and diagnostic logs are capped or rotated.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
cli, observability, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.