[Feature Request] Add timestamp to /export filename to prevent overwrites

Status Fixed / completed
Reported on v2.0.76
Maintainer reply None cached
Activity 11 comments · opened Dec 31, 2025 · closed Feb 25, 2026

Feedback Description
it would be great if the /export filename output format can be like 2025-12-31 11:22:33 some_message.txt the important part is the time, because i oftenly use this to store the conversation. but due to the same name it will replace the old one. and this is very annoying. i need to rename it manually again and again. And of course we can also skip the read/write file and only store the thinking and ai answer part.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.0.76
  • Feedback ID:

View original on GitHub ↗

11 Comments

github-actions[bot] · 8 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/12949

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] · 7 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

1MikeMakuch · 7 months ago

I like to use the /export save to a file frequently so that I can easily remember the most recent commands for whenever claude locks up and has to be killed (like when reading files with very long lines for one example). Problem is the /export save to a file doesn't let you set the directory to write to. I'd like to have all the exports in a certain dir. Instead the export writes the file to what ever dir claude happens to be in at that moment. Very inconvenient.

I'd like to be able to set the dir for exports, the file name format to include a timestamp including date and time so that it doesn't overwrite the previous export.

1MikeMakuch · 6 months ago

still broken

abitofhelp · 6 months ago

This issue does not include the details and potential solution in my posting. In case my post is closed as a duplicate, I am adding the information to this ticket. https://github.com/anthropics/claude-code/issues/26736

The issue with the current timestamp prefix on exported context files is that they easily conflict with existing files if you make several exports during a session. I have to default to appending a unique suffix to the timestamp, like 'a' .. 'z'.

2026-01-20a-this-session-is-being-continued-from-a-previous-co.txt

Since the timestamp prefix does not include the time, it is easy to add a suffix to the timestamp that is not in the correct order making it more difficult to quickly find the correct file.

The timestamp prefix on exported files does not indicate a timezone nor the time, so I do not know whether it is UTC or local time.

Since the timestamp prefix does not indicate a timezone, I cannot provide more information as to why timestamp spans two days when multiple exports are performed in a 24 hour period.

=====================

All of these reasons make it difficult to quickly export context multiple times in a session and have the filenames appear in proper order and avoid overwriting existing files within a 1 minute range of a previous one... Same timestamp hence same filename. Using an ISO-8601/3339 UTC timestamp format will provide unique filenames, to 1 second resolution, that are properly ordered when displayed in a file browser. Yes, it is true that I can edit the current timestamp, but this change is so simple and so useful, why not make it?

Proposed Solution

Use an ISO-8601/3339 UTC timestamp format will provide unique filenames, to 1 second resolution, that are properly ordered when displayed in a file browser. Yes, it is true that I can edit the current timestamp, but this change is simple, useful, and an established best practice, so why not make it?

Alternative Solutions

No response

Priority

High - Significant impact on productivity

Feature Category

File operations

1MikeMakuch · 6 months ago

I agree with everything except this: don't use ISO verbatim because colons are not very friendly to shell users. I suggest use isotime but replace colons with a dash

abitofhelp · 6 months ago

Yes, this is the format that I usually use:
20260218T075400Z-this-session-is-being-continued-from-a-previous-co.txt
_____________________________
Mike Gardner
Principal Software Engineer
A Bit of Help, Inc.
+1 602.810.8161
LinkedIn <https://www.linkedin.com/in/michaeljosephgardner/>
GitHub <https://github.com/abitofhelp>

On Wed, Feb 18, 2026 at 5:41 PM Mike Makuch @.***>
wrote:

1MikeMakuch left a comment (anthropics/claude-code#15873) <https://github.com/anthropics/claude-code/issues/15873#issuecomment-3924033524> I agree with everything except this: don't use ISO verbatim because colons are not very friendly to shell users. I suggest use isotime but replace colons with a dash — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/15873#issuecomment-3924033524>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABAIPACS7MDMCVWGX2CA6VD4MUBEFAVCNFSM6AAAAACQL2TV76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSMRUGAZTGNJSGQ> . You are receiving this because you commented.Message ID: @.***>
mirzaakhena · 6 months ago

I just realize anthropics already adding the time ini export. It looks like this : 2026-02-25-085424-some-content.txt

abitofhelp · 6 months ago

Yes, but the timestamp is your local time and not the usual ISO-8601 format. When I posted here, the system reported that it was a duplicate, so the conversation has continued at the following issue. I expected this one to be closed...

1MikeMakuch · 5 months ago

timestamp is now in default export filename, thankyou.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.