-
Notifications
You must be signed in to change notification settings - Fork 17.5k
[BUG] /export overwrites existing files without warning #37595
Copy link
Copy link
Open
Labels
area:clibugSomething isn't workingSomething isn't workingplatform:linuxIssue specifically occurs on LinuxIssue specifically occurs on Linux
Description
Preflight Checklist
- I have searched existing issues for similar behavior reports
- 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
- Run
/export myfile— createsmyfile.txt - Continue conversation
- Run
/export myfileagain — 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:clibugSomething isn't workingSomething isn't workingplatform:linuxIssue specifically occurs on LinuxIssue specifically occurs on Linux