You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bash tool: external_directory prompt skipped when realpath is missing #10872
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 realpath is not present on PATH (common on Windows)
Execute a bash tool command that leaves the project directory (e.g. cd ..)
Observe whether an external_directory permission 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.
Both issues involve bash tool path resolution issues on Windows and missing external dependencies/binaries. While #10871 focuses on Git Bash auto-detection, #10872 addresses a related path resolution problem when realpath is unavailable. They may share root causes around Windows path handling in the bash tool.
Feel free to ignore if your specific case differs.
Thanks! Related to Windows bash/tooling, but this one is distinct: bash tool external-directory detection currently relies on an external realpath binary. In environments where realpath isn’t available (common on Windows), the external_directory prompt can be skipped.
PR #10874 removes the external dependency by using internal path.resolve + fs.realpath fallback and adds a regression test.
Activity
github-actions commentedon Jan 27, 2026
This issue might be a duplicate of existing issues. Please check:
Both issues involve bash tool path resolution issues on Windows and missing external dependencies/binaries. While #10871 focuses on Git Bash auto-detection, #10872 addresses a related path resolution problem when
realpathis unavailable. They may share root causes around Windows path handling in the bash tool.Feel free to ignore if your specific case differs.
MaxMiksa commentedon Jan 27, 2026
Thanks! Related to Windows bash/tooling, but this one is distinct:
bashtool external-directory detection currently relies on an externalrealpathbinary. In environments whererealpathisn’t available (common on Windows), theexternal_directoryprompt can be skipped.PR #10874 removes the external dependency by using internal
path.resolve+fs.realpathfallback and adds a regression test.github-actions commentedon Mar 30, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.