feat(deepagents): allow write_file to overwrite files (#674)
## Summary `write_file` now creates missing files and replaces existing files entirely, removing the previous create-only error path while preserving write permissions and symlink protections. ## Changes ### deepagents filesystem backends - Updated `FilesystemBackend`, `StateBackend`, `StoreBackend`, `BaseSandbox`, and `node-vfs` write behavior to allow full-file replacement on existing paths. - Preserved path safety and symlink protections in filesystem-backed writes. - Removed the sandbox existence precheck so writes rely on the upload/write transport. ### Tool prompts and examples - Aligned the `write_file` tool description and schema text with the Python SDK wording. - Updated sandbox example prompts so `write_file` is described as creating or fully replacing files. ### Tests and evals - Updated backend, middleware, and shared sandbox standard tests that previously expected an existing-file error. - Added overwrite coverage for filesystem, sandbox, state, store, middleware, node-vfs, and file-operation evals. ### Release - Added a changeset for `deepagents` documenting the new overwrite behavior.
H
Hunter Lovell committed
dd142fe4fc54c986d5bcf51211d9a839a427e931
Parent: b215e70
Committed by GitHub <noreply@github.com>
on 7/22/2026, 11:10:05 PM