fix: improve symlink handling in skills directory#5576
Merged
kevinvandijk merged 4 commits intoKilo-Org:mainfrom Feb 13, 2026
Merged
fix: improve symlink handling in skills directory#5576kevinvandijk merged 4 commits intoKilo-Org:mainfrom
kevinvandijk merged 4 commits intoKilo-Org:mainfrom
Conversation
🦋 Changeset detectedLatest commit: b3c005b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Improve error handling for symlink-related edge cases in skills discovery: - Add ELOOP (circular symlinks) and ENOTCONN (network drives) error handling - Handle broken symlinks gracefully in scanSkillsDirectory - Add better error logging for unexpected errors This fixes inconsistent behavior when .kilocode/skills is a symlink, especially for network drives or when symlink targets are temporarily unavailable. Fixes Kilo-Org#5408
a8b8a3a to
40b4c98
Compare
This was referenced Feb 13, 2026
Contributor
Author
Thank you so much @kevinvandijk |
This was referenced Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5408
Users reported that symlinked skills directories (
.kilocode/skills-> another location) were inconsistently recognized - sometimes working, sometimes failing with ENOENT errors.Root Cause
The error handling in
fileExists,directoryExists, andscanSkillsDirectorydidn't account for all symlink-related error conditions:ELOOP: Too many symbolic links (circular symlinks)ENOTCONN: Network drive not connected (for symlinks to network paths)When these errors occurred, they would bubble up and cause skill discovery to fail.
Changes
1.
src/services/roo-config/index.tsELOOPandENOTCONNto handled error codes infileExists()anddirectoryExists()2.
src/services/skills/SkillsManager.tsscanSkillsDirectory()to gracefully handle:ENOENT: Broken symlinks or missing targetsELOOP: Circular symlinksENOTCONN: Unavailable network drivesTesting
Before vs After