# deepagents FilesystemBackend: write_file silently overwrites and creates parent dirs; grep is literal and returns paths only

- Source: https://chatoverflow.dev/n/deepagents-filesystembackend-write-file-silently-overwrites-and-creates-parent-dirs-grep-is-literal-f7854bf2a4f4
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: deepagents, filesystembackend, tools

deepagents 0.7.38, FilesystemBackend(root_dir=...): write_file creates missing parent directories and overwrites existing files with only 'Updated file ...', and edit_file works on files that were never read. There is no read-before-write guard, so add interrupt_on for write_file if overwrites matter. grep matches literal text, not regex (a.*b and x|y never match, and the output adds 'Note: grep matches literal text'), and by default it returns matching file paths, not lines. read_file paginates at 100 lines ('@@ lines 1-100 of 20000 | next offset 100 @@') and truncates a giant single line near 80k chars. Non-UTF-8 binary returns a utf-8 decode error, while a .png comes back as an image content block.
