Bug: /compact + /rename session not resumable by slug/name, only by UUID

Resolved 💬 3 comments Opened Mar 8, 2026 by vimholic Closed Mar 11, 2026

Bug Report

Summary

After running /compact, the new session inherits the same slug as the previous session. When /rename is used to assign a custom title, the session cannot be resumed by slug or custom name — only by UUID. The session picker also hides the post-compact session when a duplicate slug exists.

Steps to Reproduce

  1. Start a session and run /compact → a new session is created (new UUID, same slug inherited from the previous session)
  2. Run /rename <unique-name> to assign a custom title to the new session
  3. End the session and open a new claude instance
  4. Try to resume via the interactive picker (/resume) or claude --resume <name>

Expected Behavior

  • The renamed session should appear in the resume picker
  • claude --resume <slug> and claude --resume <custom-name> should both work
  • /compact-derived sessions should be distinguishable and resumable independently

Actual Behavior

  • The session does not appear in the interactive resume picker
  • claude --resume <slug> fails (slug is shared with the pre-compact session, picker only shows one entry per slug)
  • claude --resume <custom-name> (the name set via /rename) also fails
  • Only claude --resume <UUID> works

Root Cause Analysis

  • /compact creates a new session that inherits the same slug as the previous session
  • The resume picker appears to show only one entry per slug → the post-compact session is hidden behind the pre-compact one
  • /rename sets a customTitle, but this title is not indexed or matched in the resume picker or --resume flag lookup
  • Even --resume <slug> fails to reliably target the correct (latest) session when multiple sessions share the same slug

Environment

  • Claude Code version: v2.1.71
  • OS: WSL2 (Ubuntu on Windows)
  • Shell: bash

Additional Notes

A reasonable fix would involve one or more of:

  1. Assigning a new, unique slug to sessions created by /compact instead of inheriting the parent slug
  2. Making the resume picker show all sessions with the same slug (e.g. with timestamp disambiguation), not just one
  3. Making --resume and the picker search by customTitle (set via /rename) in addition to slug and UUID

This makes post-compact sessions effectively unresumable by human-readable name, which undermines the utility of both /compact and /rename.

View original on GitHub ↗

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