[BUG] cannot run cd commands with zoxide installed
Resolved 💬 4 comments Opened Jun 8, 2025 by saravanabalagi Closed Jul 9, 2025
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: <!-- specify --> Claude Max
- Claude CLI version: <!-- output of
claude --version--> 1.0.17 (Claude Code) - Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> macOS 15.5
- Terminal: <!-- e.g. iTerm2, Terminal App --> Terminal App / vscode
Bug Description
<!-- A clear and concise description of the bug -->
⏺ Bash(cd somedir && uv run -m mymodule)
⎿ Error: cd:1: command not found: __zoxide_z
Steps to Reproduce
- install zoxide
- start zoxide using
eval "$(zoxide init --cmd cd zsh)"in.zshrc - run
claudeand make it run anycdcommand
Expected Behavior
<!-- What you expected to happen -->
cd commands should get executed successfully
Actual Behavior
<!-- What actually happened -->
- cd commands fails with
command not found: __zoxide_z - claude then resorts to using workarounds including
bash -c 'cmd'oruv run --directory somedirwhich succeeds
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗