[KongchangAI]
Productclear 命令

/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)

Nov 22

According to the official documentation, the /clear operation incurs no cost.

Unverified50%
Nov 22

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.

Unverified50%
Nov 22

/clear directly starts a new conversation with an empty context, which is suitable for switching to unrelated work.

Unverified50%
Nov 16

/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.

Unverified50%
Nov 16

Anthropic's official documentation calls using /clear when switching tasks "the single most effective lever for quality and cost".

Unverified50%
Nov 13

Executing the /clear command in Claude Code to clear the context incurs almost no cost.

Unverified50%
Nov 13

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.

Unverified50%
Nov 10

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.

Unverified50%
Nov 8

Using /clear to start a new session between tasks cost $1.83, about 8% cheaper than the $2 for a long session.

Unverified50%
Nov 7

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.

Unverified50%

10 more timeline events

All Facts (19)

Unverified

According to the official documentation, the /clear operation incurs no cost.

50%
Unverified

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.

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%
Unverified

Anthropic's official documentation calls using /clear when switching tasks "the single most effective lever for quality and cost".

50%
Unverified

Executing the /clear command in Claude Code to clear the context incurs almost no cost.

50%
Unverified

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.

50%
Unverified

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.

50%
Unverified

Using /clear to start a new session between tasks cost $1.83, about 8% cheaper than the $2 for a long session.

50%
Unverified

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.

50%
Unverified

In 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%
Unverified

In 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%
Unverified

In 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%
Unverified

Anthropic officially recommends using the /clear command to start a new session to deal with contexts approaching the limit.

50%
Unverified

The /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%
Unverified

Using the /clear command can clear old context and save credits when switching between unrelated tasks.

50%
Unverified

After 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%
Unverified

Using the /clear command to reset context between tasks incurs no cost and is the highest-leverage operation for cutting costs.

50%
Unverified

Using 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%

Source Articles