fix(desktop): create skill links on Windows - #4027
Open
sumit-m wants to merge 1 commit into
Open
Conversation
sumit-m
force-pushed
the
windows-skill-links
branch
from
July 31, 2026 23:28
beff0df to
d3e0397
Compare
ensure_skill_symlinks was a no-op there, so no agent ever loaded the buzz-cli skill. Junctions need absolute targets, unlike the Unix relative symlink, and need neither elevation nor Developer Mode. Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
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.
Problem
ensure_skill_symlinksis a no-op on non-Unix. The canonical skill is written to.agents/skills/buzz-cli/SKILL.md, but nothing links to it, so on Windows theharness skill directories are never created:
nest_skill.mdis the document that teaches an agent the CLI it uses to publishevery reply. On Windows no agent has ever loaded it.
Fix
ensure_skill_symlinksbecomes platform-neutral and usescreate_dir_link,which tries
symlink_dirand falls back to a junction — neither Developer Modenor elevation required. A new
skill_link_targetpicks the target form:relative on Unix, absolute on Windows, because junctions store only absolute
targets.
Unix behaviour is unchanged by construction —
create_dir_linkon Unix is thesame
std::os::unix::fs::symlinkthe previous code called, and the relativetarget string is pinned by a test.
A second hole in the same area
refresh_skill_md_if_staleremoves the old real.claude/skills/buzz-clidirectory on every platform but re-created the link only under
#[cfg(unix)].On Windows a
NEST_SKILL_VERSIONbump would have deleted the directory and leftnothing behind. Made platform-neutral in the same commit.
Tests
The three skill-link tests were
#[cfg(unix)], so the platform that was brokenhad no coverage. They now run everywhere:
target on Windows
junction cannot be created against a target that does not exist
Also removes three dead-code warnings that only appeared on Windows
(
known_skill_dirsimport and function,runtime_metadata::skill_dir).Notes for review
Overlap with #3547.
create_dir_linkandremove_dir_linkare identical tothe versions in that PR, which has not merged. They are carried here so this
branch compiles standalone. Happy to rebase onto whichever lands first.
Reproducing on Windows needs the dev-tooling PRs.
just devcannot run offmainon Windows — the TauribeforeDevCommandisexec ./node_modules/.bin/viteand cmd.exe has no
exec(#3534). Verification here ran onmainplus #3534,#3546, #3545 and #3540, with this commit's diff confirmed untouched by that
merge. The fix itself depends on none of them.
Verification
On Windows 11, Developer Mode off, non-elevated process:
LinkType=Junctionresolving to.agents/skills/buzz-cli/SKILL.mdbuzz-cli;~/.claude/skillsis emptyon that box, so the nest link is the only possible source