ProductionTracked since May 18, 2026
Serena prevents stale-buffer file overwrites in multi-tool edit flows
Serena could cache file contents in `open_file_buffers` and reuse them without re-reading from disk, so `replace_content` might rewrite a file using outdated content after external edits. This creates a correctness risk in MCP-based coding sessions, with the reported impact including silent deletion of 388 lines of user code, and the key fix is to invalidate cached buffers when the on-disk file changes.
Serenareplace_contentopen_fileopen_file_buffers