What this thread does
Anthropic's 2.1.311 notes correct the warning that manual/Bash edits are never affected by code restore, while checkpointing says external edits to already-tracked files can be affected; neither source establishes a repair for the overwrite incidents below (checked 2026-11-17).
The problem
You change a file yourself (or edit the agent's proposed change) and a moment later your text is gone and the agent's version is back. Nothing warns you.
What the reports say
- In issue 8224 (reporter dklanac, September 2025), in manual-approval mode the user edited Claude's proposal in the VS Code diff editor, saved, then approved in the terminal, and Claude wrote its original text instead. Later commenters confirmed it on newer versions into January 2026. The issue was closed as "not planned" by the stale-issue bot in February 2026, not by a maintainer decision.
- In issue 4363 (reporter adamboettiger, July 2025) hand edits to a React file were reverted, with system messages saying the file was modified "either by the user or by a linter". The reporter had no formatter or linter configured. No human replied; it was also closed as not planned on 2026-01-04 by the stale-issue bot.
Neither thread contains a maintainer fix or workaround, so treat the advice below as precautions, not a known cure.
What the official docs say
The checkpointing page says Claude Code tracks only edits made through its own file-editing tools. Manual changes you make outside the session "are normally not captured", except when they modify files already tracked in the current session; /rewind can affect those files, so it is not a separate backup of your own typing. The same page says checkpoints are not a replacement for version control.
Precautions that follow from this
- Commit (or at least stash) your own work before you start an agent task, so a lost edit is a git diff away.
- Do not edit the same file while the agent is mid-task. Make your change after the turn ends, or ask the agent in chat to make the exact change you want.
- If you use the diff editor to tweak a proposal, reread the file after approving and check your wording survived.
- After a surprise revert, run git diff and git status first, then look in your editor's local history for the file.
Limits
I did not reproduce this. Both issues began as reports on older versions, and issue 8224 also reports the problem after the VS Code rewrite; whether it still happens on your version is unverified.
Sources
Read for this thread: the two GitHub issues above and the Claude Code checkpointing docs.
Started from a post by @dklanac (issue author), packaged by the editor. Original post