/clear
A built-in slash command in Claude Code used to clear the current session context and start over, avoiding continued entanglement in an already contaminated long session and reducing the cost of correction.
Timeline (last 90 days)
According to the official documentation, the /clear operation incurs no cost.
The recommended decision order for context management is: first run /context to confirm usage; when continuing the same topic, compress with /compact with a focused instruction; when switching to unrelated work, use /rename plus /clear, and /resume back when needed.
/clear directly starts a new conversation with an empty context, which is suitable for switching to unrelated work.
/clear completely wipes the current session and starts from zero, with the lowest cost but loss of all context; /compact has the model compress the existing conversation into a summary that retains key information and then continues, still incurring one call's cost but far less than having the whole original text repeatedly participate in subsequent requests.
Anthropic's official documentation calls using /clear when switching tasks "the single most effective lever for quality and cost".
Executing the /clear command in Claude Code to clear the context incurs almost no cost.
Using /clear when switching tasks can isolate unrelated tasks and prevent irrelevant context from being carried repeatedly, making it an effective means of controlling token consumption.
Using /clear to start a new session for each task measured 19% and 16% of quota, versus 16% and 17% in the control group, a difference within the noise range, so no savings can be determined.
Using /clear to start a new session between tasks cost $1.83, about 8% cheaper than the $2 for a long session.
In Claude Code, if the same problem is still wrong after being corrected twice, you should stop struggling and run /clear to start a new session with a better prompt.
10 more timeline events
All Facts (19)
According to the official documentation, the /clear operation incurs no cost.
50%UnverifiedThe recommended decision order for context management is: first run /context to confirm usage; when continuing the same topic, compress with /compact with a focused instruction; when switching to unrelated work, use /rename plus /clear, and /resume back when needed.
50%Unverified/clear directly starts a new conversation with an empty context, which is suitable for switching to unrelated work.
50%Unverified/clear completely wipes the current session and starts from zero, with the lowest cost but loss of all context; /compact has the model compress the existing conversation into a summary that retains key information and then continues, still incurring one call's cost but far less than having the whole original text repeatedly participate in subsequent requests.
50%UnverifiedAnthropic's official documentation calls using /clear when switching tasks "the single most effective lever for quality and cost".
50%UnverifiedExecuting the /clear command in Claude Code to clear the context incurs almost no cost.
50%UnverifiedUsing /clear when switching tasks can isolate unrelated tasks and prevent irrelevant context from being carried repeatedly, making it an effective means of controlling token consumption.
50%UnverifiedUsing /clear to start a new session for each task measured 19% and 16% of quota, versus 16% and 17% in the control group, a difference within the noise range, so no savings can be determined.
50%UnverifiedUsing /clear to start a new session between tasks cost $1.83, about 8% cheaper than the $2 for a long session.
50%UnverifiedIn Claude Code, if the same problem is still wrong after being corrected twice, you should stop struggling and run /clear to start a new session with a better prompt.
50%UnverifiedIn Claude Code, using the /clear command clears the current context so that the next message starts from a small context with no additional cost; CLAUDE.md is reloaded in the new session.
50%UnverifiedIn Claude Code, too much context significantly degrades response quality, so `/compact` (compressing history) and `/clear` (clearing history) are key means of controlling agent behavior and token consumption.
50%UnverifiedIn Claude Code, the /clear command does not consume quota, whereas the /compact command must read the entire session to generate a summary and thus itself incurs token consumption.
50%UnverifiedAnthropic officially recommends using the /clear command to start a new session to deal with contexts approaching the limit.
50%UnverifiedThe /clear command completely clears the conversation history without affecting CLAUDE.md or already attached files, making it suitable for scenarios where the task direction changes entirely.
50%UnverifiedUsing the /clear command can clear old context and save credits when switching between unrelated tasks.
50%UnverifiedAfter completing a task, using the /clear command to start a fresh conversation from scratch prevents Claude from carrying all previous content in every subsequent message
50%UnverifiedUsing the /clear command to reset context between tasks incurs no cost and is the highest-leverage operation for cutting costs.
50%UnverifiedUsing the /clear command when switching tasks in Claude Code clears the context, removing historical information that is no longer needed to avoid continuously consuming tokens.
50%