When a PostToolUse hook modifies a file that Claude just edited (e.g., a formatter running after a write), Claude Code now automatically detects the change and re-syncs its internal read-file state. This prevents stale-file errors on the next Edit tool call for that file.
Evidence
Hook file sync handler (search for "PostToolUse hook modified" and "re-synced readFileState")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.