You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
auggie --version hangs (100% CPU) when ~/.claude/skills contains a large skill tree -- discovery runs even for --version #178
auggie 0.36.0 (commit 7c61e5bb), installed via npm install -g @augmentcode/auggie
Windows 11 Home 10.0.26200, Node v24.20.0
Fresh install, not logged in, no ~/.auggie directory
Symptom
Every auggie invocation — including auggie --version — hangs indefinitely with one core saturated (~70% CPU) and produces no output.
Repro
Have a data-dense skill under ~/.claude/skills/: its references/ subtree contains ~40,000 directories and ~36,000 .md files (an EDB indicator dictionary exported as markdown; total entries under ~/.claude/skills: ~79,700).
Run auggie --version → hangs, no output ever.
Control experiment: point both CWD and USERPROFILE at an empty directory → auggie --version returns instantly (0.36.0 (commit 7c61e5bb)).
Diagnosis (via node --inspect + CDP)
Paused the hung process 5 s in and captured the JS stack:
The innermost frames were walking ~/.claude/skills/<data-heavy-skill>/references/.... CPU delta over a 5 s window while hung: ~3,438 ms — busy scanning, not blocked on I/O.
Root causes as I read them from the bundle:
Command/skill discovery runs unconditionally during CLI setup — even --version / --help pay for it before commander can answer.
The walk is fully synchronous (readdirSync + lstatSync per entry), recursive, with no entry cap or depth limit. It only skips entries whose name starts with ..
Every .md in the tree is read and frontmatter-parsed during discovery, so a skill that legitimately ships a large references/ data tree makes startup cost unbounded.
Symlinks/junctions are followed (only "plugin"-source scans skip them). On Windows, legacy compatibility junctions such as AppData\Local\Application Data point at their own parent directory — beyond the volume problem this is a potential infinite-recursion hazard.
Suggestions
Short-circuit --version / --help before any discovery work.
During discovery, parse command/skill candidates only at defined locations (skill root SKILL.md, commands/ directories) rather than every .md anywhere in the tree.
Add an entry/depth cap, or move discovery off the startup critical path (lazy/async, cached).
On Windows, skip entries with hidden/system attributes and avoid following junction cycles.
Activity