[BUG] /export overwrites existing files without warning

Resolved 💬 4 comments Opened Mar 22, 2026 by philipp-riedele Closed Apr 21, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information

Bug Description

The /export command silently overwrites existing files when the same filename is used. No warning, no confirmation, no prompt. Data is lost permanently.

Steps to Reproduce

  1. Run /export myfile — creates myfile.txt
  2. Continue conversation
  3. Run /export myfile again — silently overwrites the previous export

Expected Behavior

At minimum ONE of:

  • Warning: "File already exists. Overwrite? (y/n)"
  • Auto-increment: myfile_2.txt, myfile_3.txt
  • Error: "File already exists, use a different name"

Actual Behavior

File is silently overwritten. Previous export is permanently lost. No warning, no confirmation.

Proof

Verified with md5sum before and after: hash changed, file size changed, new content confirmed present in overwritten file.

Impact

High — users who name exports consistently (e.g., session1, session2) risk losing previous exports if they accidentally reuse a name. In long sessions with multiple exports this is especially dangerous.

Environment

  • Claude Code v2.1.76
  • Linux Mint
  • Opus 4.6

🤖 Generated with Claude Code

View original on GitHub ↗

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