Conversation history shows /clear as title instead of first user message
Resolved 💬 1 comment Opened May 6, 2026 by pawel-kotowski Closed May 6, 2026
Description
When using the /clear command in Claude Code CLI, the resulting conversation entry in the conversation history (e.g. when browsing past sessions via /resume) is titled /clear instead of the first actual user message that followed it.
Steps to reproduce
- Start a Claude Code session
- Run
/clearto clear context - Send an actual user message (e.g. "help me refactor this function")
- Exit the session
- Open conversation history (e.g.
/resume)
Expected behavior
The conversation should be titled with the first real user message ("help me refactor this function").
Actual behavior
The conversation is titled /clear, which is uninformative and makes it hard to identify sessions in history.
Suggested fix
Skip slash commands when picking the title for a conversation; use the first non-slash-command user message instead.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗