Claude Code Usage Savings Must-Know: The /context, /compact, and /clear Commands

Manage context in tiers with /context, /compact, and /clear to extend Claude Code usage.
The article notes that Claude Code's core cost is not the number of calls but the full conversation history resent with every request, so context size directly determines consumption speed. It introduces a workflow of three slash commands: /context visualizes context usage for informed optimization; /compact frees space via summaries and supports focus instructions, but compressing a large conversation is itself costly and should not be overused; /clear starts an empty context at no cost for switching to unrelated tasks, and paired with /rename and /resume it preserves and restores old sessions. The article recommends "see first, shrink if same topic, clear if switching topics", treating context cost as something to actively manage.
Title
Claude Code Usage Savings Must-Know: The /context, /compact, and /clear Commands
Meta Description
Claude Code resends the full conversation history with every request, so the larger the context, the faster your usage is consumed. This article explains the usage and trade-offs of the three slash commands /context, /compact, and /clear, plus an advanced tip for preserving sessions by pairing /rename with /resume.
Article Content
Claude Code's usage consumption often catches people off guard. Many assume it's the number of model calls that burns money, but the real cost hides in the context: Claude Code sends the entire conversation history to the model with every request, so the larger the context, the higher the cost of each individual request. In a session left open all day, even if you only ask "What's the weather like today?", the model still has to re-read the whole history.
A YouTube creator summarized in a short video three slash commands that can significantly reduce usage, corresponding to the three actions "see", "shrink", and "clear". The logic is clear and worth elaborating on.
/context: First, See Who's Eating Your Space
The first command is /context. It displays current context usage as a colored grid and gives hints about tool calls and memory bloat that take up a large share. In other words, before you start optimizing, it lets you know exactly what is consuming space.

The point of this design is "observability first". A common mistake in context management is blind compression—not knowing what to delete, so you clean everything indiscriminately and end up losing key information too. The visualization provided by /context gives you a basis for decisions: is the output of some heavy tool being called repeatedly taking the lion's share, or is the accumulated memory of a long-running session dragging down the whole? Locate the problem clearly, then decide which command to use to handle it.
/compact: Trade Space for a Summary, But Don't Overuse It
The second command is /compact, which frees up context by summarizing the previous conversation. It supports additional focus instructions—for example, you can write one to make the summary prioritize code examples and API usage, so that what remains after compression is still the part relevant to the current task.

Focus instructions are where this command really shines. The default summary may not match your next-step needs, but by explicitly telling it "what to keep", the side effects of compression are much smaller.
However, the author also points out an easily overlooked cost trap: compressing a very large conversation is itself a very large request. In other words, /compact is not a free operation—the longer the conversation, the higher the cost of that one compression call. If you treat it as a casual everyday action, it may backfire. The reasonable use is to compress when continuing tasks on the same topic, not to use it as a cleanup tool when switching topics.
/clear: Start a New Session When Switching Tasks
The third command is /clear, which directly starts a new conversation with an empty context, suitable for switching to unrelated work. According to the official documentation, clearing incurs no cost.

This has the cleanest cost structure of the three: when switching to an unrelated task, rather than continuing to ask with a pile of irrelevant history, it's better to just clear and start over. What you save is not only the cost of that one compression call, but also the size of the history that would have to be retransmitted with every subsequent request.
An Easily Overlooked Companion Tip
The author's advanced tip is: before clearing, use /rename to name the current session, then use /resume to restore it when you need to come back. This way you enjoy the low cost of an empty context without losing the previous session record.

This combination turns "clearing" from a one-time discard into a reversible operation, greatly reducing the psychological burden in practice. Many people are reluctant to use /clear essentially because they fear losing valuable conversations; with the naming and restore mechanism, that concern no longer holds.
/resume is Claude Code's session restoration command. It saves an index of historical sessions locally, and after execution you can select the session to return to through an interactive interface, or directly specify the session name. A restored session reloads the previous complete conversation history, so the context size also returns to what it was at the time—meaning restoration itself does not "reset" the cost; it just lets you reconnect to the old context when needed. Understanding this is key: the value of /rename plus /clear is that it splits "clearing" into two steps—normally run new low-cost tasks with an empty context, and only pay the cost of restoring the old context when you really need to continue an old thread, rather than having the old history passively carried along in every request.
How to Choose Among the Three Commands
The author sums up their roles very directly: /context is for seeing, /compact is for shrinking, /clear is for starting over. Making your usage last longer doesn't depend on any single command, but on switching according to the situation.
In concrete practice, you can judge in this order: first run /context once to confirm the usage situation; if the conversation is still continuing on the same topic, compress with /compact plus focus instructions; if you've already switched to unrelated work, directly /rename plus /clear, and /resume back when needed.
The underlying logic of this approach is actually conscious management of context cost. Claude Code's mechanism of billing by context size won't change; the only thing you can change is what you let the context contain.
One-line Summary
Use the three commands /context, /compact, and /clear to manage context in tiers and extend your Claude Code usage.
Paragraph Summary
The article points out that the core cost of Claude Code is not the number of calls, but the complete conversation history that must be retransmitted with every request, so context size directly determines the consumption rate. The author introduces a management workflow formed by three slash commands: /context visualizes context usage as a colored grid, giving optimization a basis; /compact frees space through summaries and supports focus instructions, but compressing a large conversation is itself a high-cost request and should not be overused; /clear starts an empty context at no cost and is suitable for switching to unrelated tasks, and paired with /rename and /resume it can preserve and restore old sessions. The article recommends choosing commands in the order "see first, shrink if same topic, clear if switching topics", treating context cost as something to be actively managed.
Related articles

The Truth About Using Claude Code for Free: Why Most Free LLM Routing Platforms Fail in Practice
Testing the real usability of free LLM routing platforms for Claude Code: among nearly a hundred models, only a few work reliably—most "massive free token" claims are hype. Learn which sources actually work and how non-developers can avoid pitfalls.

Decoding the GPT-6.2 Astra Safety Report: Models Learn to Conceal and the Dual-Lawsuit Storm
OpenAI faces California and Oregon lawsuits in one week; GAO covert tests show four major chatbots give viable attack plans within 12 hours; GPT-6.2 Astra safety report admits the rate of concealing known issues doubled; external lab finds the model suspects it is being tested in 85% of trials. This article covers lawsuit details, safety regressions, API architecture changes, and voice product updates.

5 Claude API Cost-Saving Tips Every Developer Should Know
Discover 5 Claude API cost-saving tips: CLI login to avoid hardcoded keys, cache_control for prompt caching, Batch API at half price, Structured Outputs to avoid errors, and Haiku for simple tasks.