Problem
The sidecar's host stat responses carry an explicit directory flag: HostStat.is_directory in crates/native-sidecar/src/filesystem.rs, serialized as isDirectory in HostStat::to_value(). The bridge's Dirent already uses an explicit boolean. But the bridge's Stats class (packages/build-tools/bridge-src/builtins/fs.ts) still derives isDirectory() / isFile() / isSymbolicLink() purely from the mode bits.
On some network filesystems (we run workloads on Amazon EFS), mode bits observed through stale NFS attribute caches can be inconsistent — on 0.1.x we saw regular files intermittently reporting the directory bit, which made the Claude CLI's Edit tool fail with EISDIR. We patched the old JS bridge to prefer the handler's explicit boolean over the mode bits.
Suggested fix
Plumb the host's is_directory (and is_symbolic_link) into the Stats class and prefer them over mode-bit inference, falling back to mode bits when the hint is absent. This makes isDirectory() consistent with what the VFS actually resolved, independent of mode-bit quirks of the underlying filesystem.
(We have not yet reproduced the EFS symptom on the new Rust VFS path — filing this as hardening based on the code shape; happy to add repro data once our EFS validation runs.)
Problem
The sidecar's host stat responses carry an explicit directory flag:
HostStat.is_directoryincrates/native-sidecar/src/filesystem.rs, serialized asisDirectoryinHostStat::to_value(). The bridge'sDirentalready uses an explicit boolean. But the bridge'sStatsclass (packages/build-tools/bridge-src/builtins/fs.ts) still derivesisDirectory()/isFile()/isSymbolicLink()purely from themodebits.On some network filesystems (we run workloads on Amazon EFS), mode bits observed through stale NFS attribute caches can be inconsistent — on 0.1.x we saw regular files intermittently reporting the directory bit, which made the Claude CLI's Edit tool fail with
EISDIR. We patched the old JS bridge to prefer the handler's explicit boolean over the mode bits.Suggested fix
Plumb the host's
is_directory(andis_symbolic_link) into theStatsclass and prefer them over mode-bit inference, falling back to mode bits when the hint is absent. This makesisDirectory()consistent with what the VFS actually resolved, independent of mode-bit quirks of the underlying filesystem.(We have not yet reproduced the EFS symptom on the new Rust VFS path — filing this as hardening based on the code shape; happy to add repro data once our EFS validation runs.)