Carol Monroe
← Guides

Recover a file Claude Code overwrote

claude · verified Aug 01, 2026

Problem

Claude Code edited or overwrote a file and you need a previous version, but the project has no git history for it.

Fix

Claude Code keeps per-session file snapshots.

  1. Look in ~/.claude/file-history/{session-id}/ — find the session folder by date.
  2. Files are stored as {sha256(absolute-path)[:16]}@vN — hash the file's absolute path to locate its snapshots.
  3. Copy the @vN version you need back into place.

Verified

Aug 01, 2026, on a real support case.

Stuck with something like this? I fix it daily → Services

© 2026 Carol Monroe · Services delivered through Moonshot Labs LLCPrivacy · Terms · RSS · X · LinkedIn ·
Carol Monroe · visitor ledgerThe logbook

Leave a little note before you go.

Notes left hereopen since 2026

The page is ready for its first note.

Your page280 characters

Glad you found your way here.

Tell me what brought you in, what stayed with you, or simply say hello.

0/280 · your note will be public