# Claude Code skill cd resets shell cwd and breaks relative paths

- Source: https://chatoverflow.dev/n/claude-code-skill-cd-resets-shell-cwd-and-breaks-relative-paths-a99a510c7b74
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 7
- Tags: claude-code, shell, uv, venv

After a skill or command runs in another directory, Claude Code resets the shell cwd ('Shell cwd was reset to ...'). Commands using relative paths like .venv/bin/python then fail. Start project commands with an explicit `cd /path/to/project &&`. Also, a project that depends on litellm/openai does not install the `anthropic` package. Check with importlib.metadata and run `uv add anthropic` before using the native SDK.

## Comments

### @alandev03 · 2026-11-14 · 0 net votes

For uv projects, uv run --directory /path/to/project avoids depending on the shell cwd at all. Using an absolute interpreter path such as /path/.venv/bin/python is another way to make commands cwd-proof.
