gemini-cli - 💡(How to fix) Fix Feature Request: /rename command [3 comments, 3 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
google-gemini/gemini-cli#26764Fetched 2026-05-11 03:28:53
View on GitHub
Comments
3
Participants
3
Timeline
11
Reactions
0
Timeline (top)
labeled ×5commented ×3closed ×1issue_type_added ×1

Code Example

sequenceDiagram
    actor User
    participant CLI as cli (Input Processor)
    participant Loader as BuiltinCommandLoader
    participant Cmd as renameCommand
    participant Session as SessionManager
    
    User->>CLI: types "/rename Fix Auth Bug"
    CLI->>Loader: resolve slash command
    Loader->>Cmd: execute(args: "Fix Auth Bug")
    Cmd->>Session: updateSessionTitle("Fix Auth Bug")
    Session-->>Cmd: success
    Cmd-->>CLI: Return MessageActionReturn ("Session renamed to 'Fix Auth Bug'")
    CLI-->>User: Display Success Message
RAW_BUFFERClick to expand / collapse

What would you like to be added?

Add a /rename slash command to the Gemini CLI that allows users to rename the current chat session or thread.

Usage: /rename [new_name]

Behavior:

  • If [new_name] is provided, it should immediately update the session's stored metadata title to the specified string.
  • If [new_name] is omitted, the CLI could either:
    1. Automatically generate a concise title based on the current conversation context (using the Gemini model).
    2. Or prompt the user to enter a new name.
  • The command should provide immediate visual feedback in the CLI confirming the rename operation was successful

Why is this needed?

Why is this needed? Managing multiple CLI sessions (especially when using session persistence/resume features) can become difficult if sessions are only identifiable by auto-generated IDs or default timestamps.

Following the pattern seen in tools like Claude Code, a /rename command significantly improves developer ergonomics by:

  1. Allowing sessions to be organized by specific task or bug ID (e.g., /rename fix-auth-logic).
  2. Making it easier to identify and switch between sessions in a multi-session workflow.
  3. Giving users control over their workspace organization directly from the terminal.

Additional context

I have analyzed the codebase and suggest implementing this by creating a new command in packages/cli/src/ui/commands/renameCommand.ts and registering it in BuiltinCommandLoader.ts.

Proposed Execution Flow:

sequenceDiagram
    actor User
    participant CLI as cli (Input Processor)
    participant Loader as BuiltinCommandLoader
    participant Cmd as renameCommand
    participant Session as SessionManager
    
    User->>CLI: types "/rename Fix Auth Bug"
    CLI->>Loader: resolve slash command
    Loader->>Cmd: execute(args: "Fix Auth Bug")
    Cmd->>Session: updateSessionTitle("Fix Auth Bug")
    Session-->>Cmd: success
    Cmd-->>CLI: Return MessageActionReturn ("Session renamed to 'Fix Auth Bug'")
    CLI-->>User: Display Success Message

Note to Maintainers: I am very interested in contributing this feature! Please assign this issue to me, and I will be happy to implement it and submit a Pull Request.

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