claude-code - 💡(How to fix) Fix [FEATURE] Feature Request: Add /title slash command to rename the current session [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53788Fetched 2026-04-28 06:47:15
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Add a built-in /title <name> slash command to set a human-readable name for the current session, so users can find it later via /resume.

Motivation

I do a lot of multi-day, multi-session work (long-running drafting, phased migrations, staged refactors). I frequently need to /resume the same conversation days later to continue. Session names today are auto-generated (one of mine landed on episode-02-draft-revision — close, but not what I'd pick), and when the /resume list has dozens of entries, finding the right one becomes a hunt-and-peck through first-message previews and timestamps.

Current behavior

  • A name field already exists in session metadata at ~/.claude/sessions/<pid>.json
  • Users can't edit it from the CLI
  • /resume shows auto-generated names + first-message snippets
  • Only workarounds today:
    1. Manually edit the live session JSON (fragile, might be overwritten)
    2. Write an external breadcrumb file with the session UUID, then claude --resume <uuid>
    3. Rely on history.jsonl grep-search by keyword

None of these are discoverable for non-power-users.

Proposed behavior

/title

When invoked:

  1. Updates the name field in the current session's metadata
  2. Reflects the new name immediately in /resume list
  3. Optionally adds a "type": "summary" entry to the jsonl so the name is durable across restarts

Aliases to consider: /rename, /name.

Benefits

  • Long-running projects: clear tagging for multi-day work
  • Multi-context users: easier to context-switch between "work / experimentation / debugging" sessions
  • Handoff: "Open the session named X" is far nicer than sharing a UUID
  • Zero impact on defaults: auto-generated names still apply if the user doesn't call /title

Alternatives considered

AlternativeWhy it's not enough
Manual JSON editFragile (live file), requires knowing internals
External breadcrumb fileAdds friction, lives outside the tool
Git branch namingOnly works inside a repo, couples to VCS workflow
Rely on auto-generated namesUser has no control when the auto name misses the point

Additional context

  • Environment: Claude Code 2.1.119, macOS 24.5.0
  • Similar UX in adjacent tools: ChatGPT has "Rename chat", Cursor supports session naming

Root Cause

Add a built-in /title <name> slash command to set a human-readable name for the current session, so users can find it later via /resume.

Motivation

I do a lot of multi-day, multi-session work (long-running drafting, phased migrations, staged refactors). I frequently need to /resume the same conversation days later to continue. Session names today are auto-generated (one of mine landed on episode-02-draft-revision — close, but not what I'd pick), and when the /resume list has dozens of entries, finding the right one becomes a hunt-and-peck through first-message previews and timestamps.

Current behavior

  • A name field already exists in session metadata at ~/.claude/sessions/<pid>.json
  • Users can't edit it from the CLI
  • /resume shows auto-generated names + first-message snippets
  • Only workarounds today:
    1. Manually edit the live session JSON (fragile, might be overwritten)
    2. Write an external breadcrumb file with the session UUID, then claude --resume <uuid>
    3. Rely on history.jsonl grep-search by keyword

None of these are discoverable for non-power-users.

Proposed behavior

/title

When invoked:

  1. Updates the name field in the current session's metadata
  2. Reflects the new name immediately in /resume list
  3. Optionally adds a "type": "summary" entry to the jsonl so the name is durable across restarts

Aliases to consider: /rename, /name.

Benefits

  • Long-running projects: clear tagging for multi-day work
  • Multi-context users: easier to context-switch between "work / experimentation / debugging" sessions
  • Handoff: "Open the session named X" is far nicer than sharing a UUID
  • Zero impact on defaults: auto-generated names still apply if the user doesn't call /title

Alternatives considered

AlternativeWhy it's not enough
Manual JSON editFragile (live file), requires knowing internals
External breadcrumb fileAdds friction, lives outside the tool
Git branch namingOnly works inside a repo, couples to VCS workflow
Rely on auto-generated namesUser has no control when the auto name misses the point

Additional context

  • Environment: Claude Code 2.1.119, macOS 24.5.0
  • Similar UX in adjacent tools: ChatGPT has "Rename chat", Cursor supports session naming

Fix Action

Fix / Workaround

  • A name field already exists in session metadata at ~/.claude/sessions/<pid>.json
    • Users can't edit it from the CLI
    • /resume shows auto-generated names + first-message snippets
    • Only workarounds today:
      1. Manually edit the live session JSON (fragile, might be overwritten)
      2. Write an external breadcrumb file with the session UUID, then claude --resume <uuid>
      3. Rely on history.jsonl grep-search by keyword
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Summary

Add a built-in /title <name> slash command to set a human-readable name for the current session, so users can find it later via /resume.

Motivation

I do a lot of multi-day, multi-session work (long-running drafting, phased migrations, staged refactors). I frequently need to /resume the same conversation days later to continue. Session names today are auto-generated (one of mine landed on episode-02-draft-revision — close, but not what I'd pick), and when the /resume list has dozens of entries, finding the right one becomes a hunt-and-peck through first-message previews and timestamps.

Current behavior

  • A name field already exists in session metadata at ~/.claude/sessions/<pid>.json
  • Users can't edit it from the CLI
  • /resume shows auto-generated names + first-message snippets
  • Only workarounds today:
    1. Manually edit the live session JSON (fragile, might be overwritten)
    2. Write an external breadcrumb file with the session UUID, then claude --resume <uuid>
    3. Rely on history.jsonl grep-search by keyword

None of these are discoverable for non-power-users.

Proposed behavior

/title

When invoked:

  1. Updates the name field in the current session's metadata
  2. Reflects the new name immediately in /resume list
  3. Optionally adds a "type": "summary" entry to the jsonl so the name is durable across restarts

Aliases to consider: /rename, /name.

Benefits

  • Long-running projects: clear tagging for multi-day work
  • Multi-context users: easier to context-switch between "work / experimentation / debugging" sessions
  • Handoff: "Open the session named X" is far nicer than sharing a UUID
  • Zero impact on defaults: auto-generated names still apply if the user doesn't call /title

Alternatives considered

AlternativeWhy it's not enough
Manual JSON editFragile (live file), requires knowing internals
External breadcrumb fileAdds friction, lives outside the tool
Git branch namingOnly works inside a repo, couples to VCS workflow
Rely on auto-generated namesUser has no control when the auto name misses the point

Additional context

  • Environment: Claude Code 2.1.119, macOS 24.5.0
  • Similar UX in adjacent tools: ChatGPT has "Rename chat", Cursor supports session naming

Proposed Solution

Add a built-in slash command:

/title

Behavior when invoked:

  1. Updates the name field in the current session's metadata (~/.claude/sessions/<pid>.json)
  2. Reflects the new name immediately in the /resume list
  3. Optionally adds a "type": "summary" entry to the session jsonl so the name persists across restarts

Aliases to consider: /rename, /name.

Zero impact on defaults — auto-generated session names still apply when the user doesn't call /title.

Alternative Solutions

Add a built-in slash command:

/title

Behavior when invoked:

  1. Updates the name field in the current session's metadata (~/.claude/sessions/<pid>.json)
  2. Reflects the new name immediately in the /resume list
  3. Optionally adds a "type": "summary" entry to the session jsonl so the name persists across restarts

Aliases to consider: /rename, /name.

Zero impact on defaults — auto-generated session names still apply when the user doesn't call /title.

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

extent analysis

TL;DR

Implementing a /title slash command to update the session metadata and reflect the change in the /resume list is the most likely fix.

Guidance

  • The proposed solution involves adding a built-in slash command /title to update the name field in the current session's metadata.
  • To implement this, the code should read the current session's metadata from ~/.claude/sessions/<pid>.json, update the name field, and write the changes back to the file.
  • The /resume list should be updated immediately to reflect the new session name.
  • Consider adding aliases like /rename or /name for user convenience.

Example

// Example session metadata before update
{
  "name": "auto-generated-name",
  "pid": "<pid>"
}

// Example session metadata after update using /title command
{
  "name": "user-defined-name",
  "pid": "<pid>"
}

Notes

The implementation details may vary depending on the programming language and framework used by the Claude Code application.

Recommendation

Apply the proposed solution by implementing the /title slash command to update the session metadata and reflect the change in the /resume list, as it directly addresses the user's need for customizable session names.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING