[BUG] Scripts requires approval when run with tilde (~) path but not with absolute path
Resolved 💬 6 comments Opened Aug 21, 2025 by phatmandrake Closed Feb 3, 2026
Environment
- Platform: Claude Code CLI
- Claude CLI version: 1.0.83 (Claude Code)
- Operating System: macOS (Darwin 24.6.0)
- Terminal: Apple_Terminal
Bug Description
Bash commands that execute _scripts_ with tilde (~) paths require approval despite the path being in the approved tools list, while other bash commands with tilde work without approval.
Steps to Reproduce
- Add a script's absolute path to approved tools: Bash(/Users/username/my-workspace/shared/tools/*)
- Run the script with absolute path: /Users/username/my-workspace/shared/tools/my-script.sh - works without approval
- Run the same script with tilde: ~/my-workspace/shared/tools/my-script.sh - triggers approval request
- Run other commands with tilde like echo ~ or ls ~ - work without approval
Expected Behavior
Scripts executed with tilde paths should be approved if their path is in the approved tools list, since they reference the same file.
Actual Behavior
- Script execution with tilde path triggers approval request
- Same script with absolute path runs without approval
- Other bash commands using tilde (like echo ~ or ls ~) work without approval
- Bash correctly expands the tilde (confirmed via echo ~), but approval system treats the paths as different
Additional Context
Current workaround is to use full absolute paths instead of tilde notation for scripts.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗