-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
Description
The bash tool tries to detect when a command targets paths outside the project directory to request external_directory permission. Current path resolution relies on an external realpath binary, which is not reliably available on Windows / some environments, so the external directory prompt can be skipped.
Plugins
N/A
OpenCode version
dev (local checkout @ 213c0e18a, package packages/opencode v1.1.36)
Steps to reproduce
- Run in an environment where
realpathis not present on PATH (common on Windows) - Execute a
bashtool command that leaves the project directory (e.g.cd ..) - Observe whether an
external_directorypermission request is issued
Operating System
Windows 11
Terminal
Windows Terminal
Expected
Even without realpath, Opencode should still resolve candidate target paths (e.g. via path.resolve) and request external_directory permission when leaving Instance.directory.
Actual
Path resolution fails silently when realpath is missing, resulting in no external_directory permission request for commands like cd .. / file operations targeting outside directories.