/clear
Clears the chat history of the current session.
According to the command reference, /clear clears the chat history of the current session β in short, "Clear the chat history". According to the tips in the docs, this is the recommended way to make a fresh start: "Use /clear to discard the chat history and make a fresh start."
Since version 0.85.2, according to the changelog, Aider also confirms the action in the terminal with the message "All chat history cleared.", so that it's visible the command took effect.
/clear affects only the conversation history, not the files added to the chat β those remain unchanged in the context. For that, according to the docs, there is the separate command /reset, which additionally removes all files from the chat as well. You type /clear with no arguments when Aider is stuck on a task or the history is unnecessarily bloating the context, and then reformulate the task.
π THE SAME TASK (βCLEAR CONTEXT/HISTORYβ) ON OTHER PLATFORMS
β WHEN TO USE IT?
Fresh start when Aider is stuck on a task
Type /clear and then reformulate the task more precisely.
Clean up context before a new, unrelated topic
Use /clear before tackling a completely new problem with the same files still in the chat.
β WHEN NOT TO?
Only remove individual files from the context
According to the docs, /clear deletes the entire conversation history but leaves the files added to the chat untouched.
Better: Use /drop to remove individual files specifically.
Reset history AND files together
According to the docs, /clear only clears the history, not the file list.
Better: Use /reset to do "Drop all files and clear the chat history" in one step.
SOURCES
- Aider Docs β In-chat commands β aider.chat
MORE COMMANDS Β· Aider