A fast recovery workflow for the "I asked for one file, but it changed another one" trust-break.
This happens more than people think, especially when file names are similar (like draft-final.md vs draft-final-v2.md) or when work happens across multiple sessions.
Good news: this is usually fixable in minutes if you switch to a path-proof workflow.
“The change looks right… but it’s in the wrong file or wrong folder.”
Before editing anything, verify file identity.
Target file (only this one): [full path]
Do not edit any other file.
Step 1) Read and show:
- exact full path
- first 3 lines
- last modified timestamp (if available)
Step 2) Show a dry-run patch (no writes yet).
Wait for my approval.
Step 3) After approval, edit only target file.
Step 4) Return proof:
- edited file full path
- exact changed lines/snippets
- explicit list of files NOT touched.
“Latest” is ambiguous. Always specify a full path or unique filename.
If precision matters, run one file at a time and verify after each write.
If you don’t request a not-touched list, silent collateral edits can be missed.
For critical docs, include a Do Not Touch block naming protected files before any edit begins.
Many users keep copies like /workspace/report.md and /workspace/archive/report.md. Require the agent to print the absolute path, not a relative path like ./report.md.
A symlink can resolve to a different real location. Ask the agent to show both: requested path and resolved real path before writing.
If you switched from dashboard to Discord (or restarted into a fresh session), confirm the active workspace root first. Wrong-file edits often come from working in the wrong session, not bad intent.
For repo workflows, ask for git status --short and edited file paths right after the change. This catches edits made in an unexpected branch or nested copy.
Don’t keep issuing “one more quick fix” after a wrong-file edit. Pause, verify path identity, then continue.