How to clear context in Claude Code?

To clear context in Claude Code, type /clear and press Enter; Anthropic’s command reference says it starts a new conversation with empty context while keeping project memory.

As of December 4, 2026, the Claude Code documentation describes these options:

  • /clear [name]: starts a fresh conversation. Pass a name to label the previous conversation in the /resume picker. Its aliases are /reset and /new.
  • /compact [instructions]: frees up context by summarizing the conversation so far, so you can keep working in the same conversation. You can add focus instructions for the summary.
  • /rewind: rolls the conversation and/or code back to a previous point, or summarizes from a selected message.
  • /context: shows what is filling the context window before you decide which option to use.
  • /resume: returns to the earlier conversation if you need its context again.

Related: What is the Claude Code context window?, Claude Code 2.1.335 power-user guide and How to check context usage in Claude Code?

Source: Claude Code docs, Commands

Image: Claude logo by Anthropic, public domain (trademarked), via Wikimedia Commons. Placed on a white background and resized. Claude is a trademark of Anthropic. FreeAnswers is not affiliated with or endorsed by Anthropic.



Related answers

Leave a Comment