/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

  1. 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
  2. If the session has not been renamed, auto-generate a short descriptive summary from conversation context (similar to what /rename does when called without arguments) rather than naively truncating the first user message

Steps to Reproduce

  1. Start a conversation with a long first message
  2. Run /rename my-session-name
  3. Run /export
  4. Observe the filename still uses the truncated first message, not the session name

Environment

  • Platform: darwin
  • Version: Claude Code latest

View original on GitHub ↗

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