Skip to content

Update terminal window/tab title when session is renamed #25789

@jrich76

Description

@jrich76

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

Feature Request

When using /rename to give a Claude Code session a human-readable name, it would be helpful if the terminal window/tab title was also updated to reflect this name.

Current Behavior

  • /rename my-session-name updates the session name internally
  • The status line can be configured to show the session name
  • The terminal tab/window title remains unchanged

Technical Notes

Most terminal emulators support OSC sequences for setting window titles:

  • OSC 0: Set icon name and window title
  • OSC 2: Set window title

This would complement the existing status line configuration without requiring any user setup.

Proposed Solution

Desired Behavior

  • When /rename is used, emit an OSC escape sequence to update the terminal title
  • Example: \e]0;Claude Code - my-session-name\a or similar
  • This would allow terminal emulators (Ghostty, iTerm2, etc.) to display the session name in tabs

Alternative Solutions

No response

Priority

Low - Nice to have

Feature Category

Other

Use Case Example

Use Case

When working with multiple Claude Code sessions in different terminal tabs, it's difficult to identify which tab contains which session. Being able to see the renamed session name in the tab title would greatly improve workflow organization.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions