# /rename Command

> It gives the current session a name.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** /rename, Session name

## Think of it like

It is like you write a name on the front of a book.

## Definition

/rename gives the current session a name, and shows that name on the prompt bar while you work. Without a name, Claude Code makes one up from the chat. A good name makes the session easy to find in /resume later. Names longer than 200 characters are cut short. It also works in non-interactive mode, with claude -p.

## Example

Emma has five sessions that all start with fix. She names this one payment-bug, so next week she finds it in /resume at once.

## Example code

```console
/rename payment-bug
```

Name this session payment-bug.

## Why it matters

A list of past sessions is only useful if you can tell them apart.

## Common mistake

Leaving every session with its made-up name. It reads well today, but a week later ten of them look alike.

## Three principles

- **Names the session.** On the prompt bar.
- **Found in /resume.** By that name.
- **Or made up.** From the chat.

## Related terms

- [/resume Command](https://learn.benibix.com/term/ai/resume-command)
- [Claude Code Session](https://learn.benibix.com/term/ai/claude-code-session)
- [Non-Interactive Mode](https://learn.benibix.com/term/ai/non-interactive-mode)

## Taught in

- [Resume, Branch and Rename](https://learn.benibix.com/learn/ai-claude-code-commands/resume-branch-and-rename): Claude Code Commands, 4/17

---

Source: https://learn.benibix.com/term/ai/rename-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
