[BUG] /clear command sets session title to "/clear", making session unfindable via /resume

Resolved 💬 2 comments Opened Mar 7, 2026 by wanne94 Closed Mar 7, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug Description

When using the /clear command, the new session created gets titled "/clear" instead of
a meaningful title. This makes it impossible to find the session later using /resume,
which lists sessions by title.

## Actual Behavior

The session is titled "/clear" in the /resume session list, making it impossible to
identify or distinguish from other sessions that were also cleared.

## Workaround

Avoid /clear — instead close the terminal and start a new claude session manually.

## Environment

  • OS: Linux (Ubuntu)
  • Claude Code version: (provjeri sa claude --version)

What Should Happen?

Expected Behavior

After /clear, the session should either:

  • Retain the previous session title, or
  • Generate a new meaningful title based on the first user message after clearing, or
  • At minimum, not use the command name "/clear" as the title

Error Messages/Logs

Steps to Reproduce

## Steps to Reproduce

  1. Start a Claude Code session in a project
  2. Run /clear to clear the conversation context
  3. Continue working in the session
  4. In a new terminal, run claude and use /resume
  5. The session appears in the list as "/clear" — not recognizable

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.70

Claude Code Version

2.1.71

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

<img width="998" height="821" alt="Image" src="https://github.com/user-attachments/assets/0df2f333-f85e-487f-9d5e-88fe2afeda69" />

View original on GitHub ↗

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