Backup files created in home directory instead of .claude/backups/

Resolved 💬 3 comments Opened Mar 10, 2026 by MBHaynes29 Closed Mar 14, 2026

Description:

Claude Code is creating .claude.json.backup.* files in the user's home directory instead of using the existing .claude/backups/ directory.

Expected Behavior:

  • Backup files should be automatically saved to C:\Users\[username]\.claude\backups\
  • The backups directory already exists and appears to be intended for this purpose

Actual Behavior:

  • Backup files are created as C:\Users\[username]\.claude.json.backup.[timestamp]
  • These files accumulate in the home directory during normal operations
  • Multiple backup files are generated throughout a session

Steps to Reproduce:

  1. Use Claude Code normally (run queries, execute tools, etc.)
  2. Check home directory: C:\Users\[username]\
  3. Observe multiple .claude.json.backup.* files created

Impact:

  • Home directory becomes cluttered with backup files
  • No configuration option exists to control backup location
  • Users must manually move files to keep directory clean

Environment:

  • Platform: Windows 11 Pro (10.0.26200)
  • Claude Code CLI
  • Home directory: C:\Users\[username]\

Suggested Fix:

  • Use .claude/backups/ directory for all backup files
  • Add configuration option in settings.json if custom backup location is needed

Example Files Generated:

.claude.json.backup.1773149307856
.claude.json.backup.1773149307867
.claude.json.backup.1773149316633
.claude.json.backup.1773149360404

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗