Skip to content

gradio skills add fails on Windows without symlink privilege (WinError 1314) #13801

Closed

Description

@iam-kira

Describe the bug

_create_symlink() in gradio/cli/commands/skills.py calls Path.symlink_to() with no guard:

_remove_existing(link_path, force)
link_path.symlink_to(os.path.relpath(central_skill_path, agent_skills_dir))
Windows refuses symlink creation unless the process is elevated or Developer Mode is enabled, so gradio skills add raises:

OSError: [WinError 1314] A required privilege is not held by the client
There are no platform guards anywhere in that module.

Why it's worse than a plain crash
The failure happens after the skill has been installed to the central location and printed a success line, so the command leaves a half-finished state: the central install exists, the agent-visible link does not. Re-running hits _remove_existing, which requires --force.

Why CI doesn't catch it
Gradio's workflows run Windows, but the runner can create symlinks, so this path succeeds there and fails only for ordinary users.

Suggested fix (implemented and verified)
Fall back to copying the skill directory when the symlink cannot be created. Skills are plain files — unlike an executable, a copy behaves identically — and the central install remains the source of truth, so a later gradio skills add --force refreshes it.

Verified on Windows: the fallback produces a readable skill directory at the agent path where the original raised.

Patch: patches/gradio/0001-fix-cli-make-gradio-skills-add-work-without-symlink-.patch

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

_remove_existing(link_path, force)
link_path.symlink_to(os.path.relpath(central_skill_path, agent_skills_dir))

Screenshot

No response

Logs

System Info

Environment
Windows-11-10.0.26200-SP0
Python 3.13.15

Severity

I can work around it

Activity

  1. libaojiang commented on Aug 30, 2026

    @libaojiang

    I can reproduce this on a standard Windows account without symlink privilege. I will add a focused fallback that copies the centrally installed skill only when symlink creation is denied, preserve the existing symlink path everywhere else, and add regression coverage for both paths. I will keep the change scoped to gradio skills add and link the PR here.

  2. libaojiang commented on Aug 30, 2026

    @libaojiang

    Correction after cloning and reading the current CONTRIBUTING.md: Gradio has paused accepting pull requests from outside the maintainer team. I will respect that policy and will not open a PR. Sorry for the premature claim; the Windows reproduction above remains valid for the maintainers.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions