Skip to content

Session names from /rename are lost after resuming and continuing work #26240

Closed as duplicate

Description

@hbcuconnect

Description

Session names set via /rename are lost after resuming the session and doing additional work. The custom title only persists if it remains near the end of the .jsonl session file.

Steps to Reproduce

  1. Start a new session
  2. Do some work
  3. Run /rename my-project-name
  4. Exit the session
  5. /resume my-project-name — works fine
  6. Do more work in the resumed session
  7. Exit the session
  8. /resume my-project-name — "Session my-project-name was not found"

Root Cause

/rename appends a {"type":"custom-title","customTitle":"..."} JSON line to the session .jsonl file. When the session is resumed and more work is done, additional lines are written after the custom-title entry. On the next /resume, Claude Code appears to only scan near the end of the file for the custom-title entry, so it can no longer find the name.

Expected Behavior

A session name set via /rename should persist permanently, regardless of how much additional content is written to the session file after renaming. The name should survive multiple resume/work/exit cycles without needing to re-rename.

Current Workaround

Run /rename with the same name again right before every /exit, so the custom-title entry stays at the end of the file.

Environment

  • Claude Code version: 2.1.42 / 2.1.44
  • OS: Ubuntu 24.04.3 LTS
  • Shell: bash

Activity

  1. github-actions commented on Feb 17, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Renamed session works on first resume but the name disappears after the second exit #25090
    2. Session name set by /rename is overwritten after /resume #23610
    3. Session auto-titler uses raw XML markup and overrides /rename #22994

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. github-actions commented on Feb 20, 2026

    @github-actions

    This issue has been automatically closed as a duplicate of #25090.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  3. github-actions commented on Feb 27, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  4. locked as resolved and limited conversation to collaborators on Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions