You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
write.ts: no pre-read check before writing, silently overwrites existing files #30864
No pre-existence check. After compaction/pruning (long sessions), AI loses memory of file contents and may write to an existing file, silently overwriting user code.
V1 had a create tool with flag: "wx" that rejected existing files, and a separate write tool. V2 merged them into one write tool that overwrites unconditionally.
Fix: Add a pre-read guard that fails the tool when the file already exists, forcing the AI to use edit instead.
Activity