Skip to content

/graphify . on large directories causes infinite compact/restart loop — drains all tokens #266

Closed

Description

@xaiksan1

Running /graphify . (or /graphify without path) in a directory containing node_modules/, large lockfiles, or generated assets triggers an infinite loop:

  1. Graphify tente de traiter tous les fichiers récursivement (incluant node_modules)
  2. Le context window explose → Claude Code force un compact/restart automatique
  3. La session redémarre → graphify relance → compact → restart → loop
  4. 4-5 cycles = zéro tokens restants

Reproduction: cd dans tout projet Node.js/Bun avec node_modules, lancer /graphify .

Impact: Utilisateurs sur plans payants peuvent perdre tous leurs tokens overnight sans s'en apercevoir.

Fix suggéré:

  • Respecter .gitignore par défaut
  • Exclure node_modules/, .git/, dist/, target/, *.lock automatiquement
  • Ajouter un warning si le répertoire dépasse N fichiers : "Found 50,000+ files. Add --include ou spécifiez un sous-dossier"
  • Limiter la profondeur de scan par défaut

Version: 0.4.2

Activity

  1. added a commit that references this issue on Apr 12, 2026
  2. safishamsi commented on Apr 12, 2026

    @safishamsi
    Member

    Fixed in v0.4.4. Added a _SKIP_FILES set to detect.py that skips package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock, poetry.lock, Gemfile.lock, composer.lock, go.sum, and go.work.sum during file discovery. Note: node_modules/ was already excluded via _SKIP_DIRS — if you were seeing it processed, make sure you're on 0.4.4.

  3. added a commit that references this issue on Apr 13, 2026
  4. added a commit that references this issue on Apr 23, 2026
  5. added a commit that references this issue on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions