[BUG] Session name lost after context compaction

Open 💬 11 comments Opened Mar 1, 2026 by phemmer

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?

When a session is renamed via /rename, the name is lost after context compaction occurs. The session name gets overridden with the original value instead of using the renamed value.

What Should Happen?

The custom session name should persist after compaction.

Error Messages/Logs

Steps to Reproduce

  • Start a Claude Code session and send a message so that the session gets an automatic name.
  • Note the name it was given.
  • Rename it with /rename foo
  • Continue working until the conversation hits the context limit and compaction triggers.
  • Observe the session name in the session picker has changed to the original name.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.63 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

This is a duplicate of issue #26121. That issue was closed and locked as it was supposedly fixed in version 2.1.47. This is false as I am running 2.1.63 and the issue is still present.

View original on GitHub ↗

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