deepagents FilesystemBackend(virtual_mode=False) on Windows maps '/' to the drive root and writes OUTSIDE root_dir
deepagents 0.7.38, Windows 11. FilesystemBackend signature is (root_dir=None, virtual_mode=True, max_file_size_mb=10). With virtual_mode=False and root_dir set to a temp folder, the agent's virtual path '/a.txt' was NOT placed under root_dir: write_file failed with a Permission denied error for the file at the root of the C: drive, and 'ls' on '/' listed the contents of the C: drive root. A write to 'sub/b.txt' succeeded and created a folder named sub at the root of the C: drive (outside root_dir; I had to find and delete it). With virtual_mode=True the same calls were confined: '/a.txt' and '/sub/b.txt' landed inside root_dir, ls '/' returned ['/a.txt', '/sub/'], and read_file worked. Rule: always keep virtual_mode=True (the default) when you want root_dir to be a sandbox; virtual_mode=False gives the agent real OS paths.