[BUG] Chat title gets overwritten after context compression (manually set title lost)

Resolved 💬 4 comments Opened Mar 16, 2026 by Shunyata24 Closed Mar 19, 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?

Steps to reproduce:

  1. Start a new chat in Claude Code
  2. Set a custom chat title in the first message (e.g. "Bugfix Phase 2 - Chat 7")
  3. Continue the chat until context compression is triggered (long session)
  4. After compression, the chat title is automatically regenerated by Claude
  5. The manually set title is permanently overwritten

Expected behavior:
Once a chat title is manually set by the user, it should never be changed automatically — not by context compression, not by Claude's title generation.

Actual behavior:
After context compression occurs during a long session, Claude regenerates the chat title based on conversation content. The user's custom title is lost and replaced with an AI-generated one.

Feature request:
It would be very helpful to also allow users to rename a chat at any time after creation — either via right-click on the chat in the sidebar or an edit button next to the title. Currently there is no way to manually rename an existing chat, which makes it hard to organize long-running projects with many sessions.

Environment:

  • Claude Code (VSCode Extension / Cursor)
  • Long sessions with context compression

What Should Happen?

Chatname should be the same, also after compress.
Function to set name manually or through instruction would be helpfull

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code (VSCode Extension or Cursor)
  2. Start a new chat session
  3. Enter a custom name as the first message, e.g. "Bugfix Phase 2 - Chat 7"

→ The chat title in the sidebar now shows this custom name correctly

  1. Continue working in the same chat for an extended session

→ At some point, context compression is triggered automatically by Claude Code

  1. After compression occurs, check the chat title in the sidebar

→ The custom title has been replaced with an AI-generated title based on conversation content

No code or special setup required — this happens in any long chat session where the user sets a custom title in the first message.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Version 2.1.76 Last Updated 2026-03-14, 19:47:08

Platform

Other

Operating System

Windows

Terminal/Shell

Cursor

Additional Information

_No response_

View original on GitHub ↗

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