Command reference Β· Cursor CLI
/clear
Starts a new, empty chat session.
/clear ends the current chat session and starts a new, empty session. The previous conversation history is no longer available as context within the new session afterward. /new, /new-chat, and /newchat are documented as equivalent aliases for the same command.
The command is useful for starting with a clean, empty context window on a topic change, for example when a task is finished and the next one has nothing to do with it. This keeps old context from unnecessarily affecting the response quality or token cost of the new task.
Importantly, /clear discards the history rather than compressing it. If you still need access to earlier messages, for example because you just want to free up space in the context window, /summarize (alias /compress) is the better choice, since it keeps a summary of the previous history. Old sessions can still be reopened later via agent ls or /resume.
π THE SAME TASK (βCLEAR CONTEXT/HISTORYβ) ON OTHER PLATFORMS
β WHEN TO USE IT?
Free up the context window for a completely new topic
/clear β after the previous task is finished
Deliberately end an old session informally when you no longer need it
/clear after finishing a task, when the session doesn't need to be referenced afterward
β WHEN NOT TO?
The previous context is still needed
/clear completely discards the current session's conversation history.
Better: Use /summarize to free up space without losing the context entirely
SOURCES
- Cursor Docs β Slash Commands β cursor.com