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
The find builtin with -type f doesn't properly enumerate files within VFS (virtual filesystem) directories. When files are mounted in the VFS, find may not discover them during recursive directory traversal.
Reproduction
# Given VFS has files:# /data/file1.txt# /data/file2.txt# /data/subdir/file3.txt
find /data -type f
# Expected:# /data/file1.txt# /data/file2.txt# /data/subdir/file3.txt# Actual: may return empty or incomplete results
Root Cause
In crates/bashkit/src/builtins/ls.rs at line 446-465, find_recursive uses ctx.fs.read_dir(path) to list directory entries. The issue may be in how the VFS read_dir implementation handles directories that were implicitly created (parent directories of mounted files) vs. explicitly created directories.
When files are mounted via the eval task's files map, intermediate directories may not have proper directory entries in the VFS, causing read_dir to return incomplete results or errors.
// line 455-465let entries = ctx.fs.read_dir(path).await?;letmut sorted_entries = entries;
sorted_entries.sort_by(|a, b| a.name.cmp(&b.name));for entry in sorted_entries {let child_path = path.join(&entry.name);// ...}
Impact
Medium — Affects any script using find to discover files in the VFS. Models work around it by using ls or hardcoding paths, but find is the standard tool for file discovery. Found in Opus and Sonnet eval runs.
Description
The
findbuiltin with-type fdoesn't properly enumerate files within VFS (virtual filesystem) directories. When files are mounted in the VFS,findmay not discover them during recursive directory traversal.Reproduction
Root Cause
In
crates/bashkit/src/builtins/ls.rsat line 446-465,find_recursiveusesctx.fs.read_dir(path)to list directory entries. The issue may be in how the VFSread_dirimplementation handles directories that were implicitly created (parent directories of mounted files) vs. explicitly created directories.When files are mounted via the eval task's
filesmap, intermediate directories may not have proper directory entries in the VFS, causingread_dirto return incomplete results or errors.Impact
Medium — Affects any script using
findto discover files in the VFS. Models work around it by usinglsor hardcoding paths, butfindis the standard tool for file discovery. Found in Opus and Sonnet eval runs.Related
find -execnot implemented)crates/bashkit/src/builtins/ls.rs:410-465—find_recursiveimplementationcrates/bashkit/src/fs/memory.rs— InMemoryFsread_dirimplementationFound In
Eval run 2026-02-25 (Opus and Sonnet models).