Skip to content
BENIBIX Learn

/exit Command

Also known as /exit, /quit

It closes Claude Code. The session is saved.

Think of it like

It is like closing a door. The room is still there when you come back.

Example

Lucy is done for the day. She types /exit, and tomorrow claude --continue opens the same chat again.

Why it matters

Leaving is safe. Nothing is lost, so you can stop at any point.

Definition

/exit closes Claude Code and takes you back to your shell, and the session is saved on disk. So /resume or claude --continue can open it again later. In a background session you are attached to, /exit only leaves it, and the session keeps running. Alias /quit.

Example code

console
/exit
Leave Claude Code and go back to the shell.

Common mistake

Using /exit to end a background session. It only leaves it, and it keeps working. /stop is the one that ends it.

Key takeaways

  1. 1
    Closes the program. Back to the shell.
  2. 2
    Session is saved. Resume it later.
  3. 3
    Leaves background ones. They keep running.

Compare

Learn it properly