github / github/copilot-cli

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

Aperta
#4,710 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area:sessions area:tools
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il comportamento di una sessione inattiva e analizza l’attività di copilot-file-search insieme ai file per processo in ~/.copilot/logs/. Verifica se la scansione si ripete e se i log crescono senza limiti. Il lavoro è completato quando le sessioni inattive arrestano o limitano l’indicizzazione, i cicli di scansione terminano e i log diagnostici hanno un limite o vengono ruotati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
linux
Ambito
cli, observability, performance
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.