Session name reverts after context compaction

Resolved 💬 5 comments Opened Mar 13, 2026 by ClaudioKirchmair Closed May 1, 2026

Description

After renaming a session with /rename, the session name appears to revert/change after context compaction occurs. The custom name gets overwritten, likely by the auto-generated title logic re-triggering during compaction.

Steps to reproduce

  1. Start a new Claude Code session
  2. Rename it with /rename to a custom name
  3. Continue working until context compaction is triggered (long conversation)
  4. Observe that the session name has changed back to an auto-generated name

Expected behavior

The session name set via /rename should persist across context compaction events.

Actual behavior

The session name changes/reverts after compaction, suggesting the auto-title generation runs again during or after compaction and overwrites the user-assigned name.

Environment

  • Claude Code on Windows 11
  • Observed across multiple sessions

View original on GitHub ↗

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