Feature Request: whitelist paths to prevent `ERROR: cd to`

Resolved 💬 2 comments Opened Jun 4, 2025 by adriangalilea Closed Jun 23, 2025

Noticing more strict guardrails, and that's great.

⏺ Bash(cd /tmp && pwd)
  ⎿  Error: ERROR: cd to '/tmp' was blocked. For security, Claude Code may only change
     directories to child directories of the original working directory (/Users/adrian)
     for this session.

But I would like to whitelist certain paths such as /tmp because the only option I see is to claude --dangerously-skip-permissions or tell Claude to never use /tmp but neither is good enough, and /tmp is definitely the right folder for temporary files to prevent littering home.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗