fix: follow symlinks in sandbox find commands (#448)
## Summary
- Add `-L` flag to `find` in `buildLsCommand`, `buildFindCommand`, and
`buildGrepCommand` so that symlinks are followed
- Fixes #447
## Problem
`BaseSandbox` helper functions use `find` without `-L`, which means
symbolic links are not dereferenced. On Modal (and potentially other
providers), volumes are mounted as symlinks, so the `ls`, `glob`, and
`grep` sandbox tools all return empty results when pointed at symlinked
paths.
## Fix
The `-L` flag tells `find` to follow symbolic links. This is a one-line
change in each of the three helper functions:
```diff
- find ${quotedPath} -maxdepth 1 ...
+ find -L ${quotedPath} -maxdepth 1 ...
```
This matches user expectations — filesystem exploration tools should
transparently follow symlinks, just like `ls` and `find -L` do in a
normal shell.
## Test plan
- [ ] Verify `ls` tool returns files when the target path is a symlink
- [ ] Verify `glob` tool traverses symlinked directories
- [ ] Verify `grep` tool searches inside symlinked directories
- [ ] Confirm no regression on non-symlinked paths (behavior is
identical when no symlinks are present)
---------
Co-authored-by: Itay Cohen <itaycohen@Itays-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> I
ItayCoCo committed
3657941ea36b21b9b512c1eb68a250ae79124383
Parent: 2994444
Committed by GitHub <noreply@github.com>
on 4/14/2026, 10:36:01 PM