uv build cache directories leak into session PATH, shadowing system Python
Summary
Claude Code prepends transient uv build/archive cache directories to $PATH during a session,
even when the parent shell environment does not include them. This causes a temporary uv-managedpython3 to shadow /usr/bin/python3, breaking skills and tools that depend on system Python
packages.
Observed behavior
The session PATH begins with entries like:
/home/user/.cache/uv/builds-v0/.tmpQXLxhU/bin
/home/user/.cache/uv/archive-v0/YR6c3jAxk9j-042S_d6HS/bin
These directories are not present in the parent shell's PATH. The temp directory names change
between checks within the same session, confirming they are dynamically created.
The python3 in these directories lacks packages installed in the system Python (e.g., requests),
causing ModuleNotFoundError when skills invoke python3 scripts.
Expected behavior
Claude Code should not leak internal uv build environments into the session PATH, or at minimum
should not prepend them ahead of /usr/bin.
Likely cause
A plugin that uses uv during setup (possibly pyright-lsp) appears to modify PATH as a side
effect of its build process, and the modified PATH persists into the session environment.
Environment
- Claude Code CLI on Linux (Arch)
- Python 3.14.4 via uv temp dir vs system Python 3.x at /usr/bin/python3
- pyright-lsp plugin installed
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗