/export filename should use session name instead of truncating first message
Resolved 💬 2 comments Opened Feb 13, 2026 by OnAzart Closed Mar 14, 2026
Problem
Currently /export generates filenames by taking the date + first few words of the first user message, truncated. For example:
2026-02-13-here-is-an-issue-i-noticed-weird-filenaming-when.txt
This produces unhelpful, awkward filenames — especially when the first message is a long sentence.
Even after running /rename claude-code-export-session to give the session a meaningful name, the export filename still ignores the session name and uses the truncated first message.
Expected Behavior
- If a session has been renamed (via
/rename), use that name for the export filename, e.g.,2026-02-13-claude-code-export-session.txt - If the session has not been renamed, auto-generate a short descriptive summary from conversation context (similar to what
/renamedoes when called without arguments) rather than naively truncating the first user message
Steps to Reproduce
- Start a conversation with a long first message
- Run
/rename my-session-name - Run
/export - Observe the filename still uses the truncated first message, not the session name
Environment
- Platform: darwin
- Version: Claude Code latest
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗