Skip to content

Fix Windows agent harness links in postinstall#304392

Merged
benibenj merged 2 commits intomainfrom
copilot/fix-postinstall-claude-links-windows-2
Mar 24, 2026
Merged

Fix Windows agent harness links in postinstall#304392
benibenj merged 2 commits intomainfrom
copilot/fix-postinstall-claude-links-windows-2

Conversation

@benibenj
Copy link
Contributor

Postinstall was creating a plain file symlink for .claude/CLAUDE.md, which can fail on Windows with EPERM unless Developer Mode or elevated privileges are available. This keeps the existing link behavior where supported, uses a junction for the directory link on Windows, and falls back to a hard link for the file when symlink creation is denied.

CC @TylerLeonhardt

Copilot AI review requested due to automatic review settings March 24, 2026 08:17
@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the build/npm/postinstall.ts script to make the .claude/ agent harness links more reliable on Windows, avoiding EPERM failures when symlink creation isn’t permitted.

Changes:

  • Added ensureAgentHarnessLink helper to create links with platform-appropriate behavior.
  • On Windows, creates a junction for the .claude/skills directory link.
  • On Windows, falls back to a hard link for .claude/CLAUDE.md when file symlink creation is denied.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@benibenj benibenj enabled auto-merge (squash) March 24, 2026 08:27
@benibenj benibenj merged commit bb77888 into main Mar 24, 2026
19 checks passed
@benibenj benibenj deleted the copilot/fix-postinstall-claude-links-windows-2 branch March 24, 2026 08:57
@TylerLeonhardt
Copy link
Member

Thanks for fixing this 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants