Command reference ยท Claude Code
/exit
Exits the CLI.
In an attached background session, only the connection is closed; the session keeps running. Alias: /quit.
โ WHEN TO USE IT?
Cleanly end the session once the task is done
/exit after finishing the work
โ WHEN NOT TO?
Actually wanting to stop an attached background session
in an attached background session, /exit only disconnects โ the session keeps running
Better: manage/stop the background session via 'claude agents' instead of just /exit
SOURCES
- Claude Code Doku (offiziell) โ code.claude.com