Skip to content
BENIBIX Learn

/exit vs /stop

People often think /exit ends a background session. It only lets go of it, and the work goes on. /stop is the one that ends it, and it keeps the chat and the worktree. In a normal session, /exit closes Claude Code and saves the chat for later.

AI⌨️ Claude Code

/exit Command

It closes Claude Code. The session is saved.

/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
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.
Full entry
AI⌨️ Claude Code

/stop Command

It ends the background session you are in.

/stop ends the background session you are attached to. The chat and any worktree it made are kept, so nothing is lost. It is different from leaving. /exit or the left arrow only leaves a background session, and it keeps working. A reply of just /stop to a session ends it in the same way.

Example
Emma attaches to a background session and sees it has gone the wrong way. She types /stop, then starts a new one with a clearer prompt.
Why it matters
A session that has gone the wrong way keeps using tokens until someone stops it.
Full entry

In one line

/exit Command
It closes Claude Code. The session is saved.
/stop Command
It ends the background session you are in.