I clear Claude Code before starting the next task
A small reset can keep an old task off your bill
When I finish one task in Claude Code, I pause before asking about the next one. Does the assistant still need everything we just discussed? If not, carrying that conversation forward can mean paying to process information that no longer helps.
Claude Code uses tokens, the small pieces of text a model reads and writes. Your instructions, conversation history, file contents, and tool results can all contribute to usage. Slash commands are built-in controls you enter in the conversation. A few make it easier to manage that information, although none guarantees a smaller bill on its own.
Use /clear when the next task is genuinely separate
The /clear command clears the current conversation so you can begin with a fresh context. It is useful when you have finished fixing a login issue and want to ask about an unrelated page layout. The old debugging discussion probably does not need to travel with you.
Clearing the conversation does not undo edits to your project or refund earlier requests. It also does not mean the next request contains no background information: Claude Code can still load project instructions and other relevant context.
Before clearing, save any decisions you will need. Otherwise, you may spend more tokens asking the assistant to rediscover them. The useful habit is to reset between independent tasks, not after every answer.
Use /compact when you still need the thread
Sometimes you are halfway through a task and the conversation has become crowded with experiments, error messages, and abandoned approaches. The /compact command summarizes the conversation so work can continue with less history occupying the context.
You can give it instructions about what to preserve. In ordinary language, ask it to keep the current objective, important decisions, unresolved errors, and checks already completed. That makes the summary more useful than a general recap.
Compacting is not free cleanup. Creating the summary uses model work, and details can be lost. It may reduce the context carried into later requests, but the savings depend on how much work follows. Do not compact repeatedly just because the command exists. Claude Code also has automatic compaction, so manual compaction is a choice about timing and focus, not a requirement.
Check /context before deciding to trim anything
The /context command shows how the current context window is being used. Think of that window as the assistant's working space. A long conversation, loaded files, and tool information can all take up room.
This view helps you make a more informed choice. If the conversation is still focused and there is plenty of space, you may not need to intervene. If old discussion dominates, consider /compact or start a separate task with /clear.
Context occupancy is not a bill. Cached input, output length, model pricing, and other billing details affect what you actually pay. Use /context to understand the workspace, not to calculate an exact charge.
Use /cost and /model with realistic expectations
The /cost command can show session usage and cost information, depending on your setup. It is a useful checkpoint after a substantial task. With a relay or custom pricing, however, a client estimate may not match the amount charged by your provider.
The /model command lets you inspect or change the model where your setup supports it. Switching to a lower-priced supported option may help with straightforward work, but availability and prices depend on your provider. A cheaper request is not a saving if it leads to several rounds of corrections.
Compare the habit with your actual request history
MyRelay gives an individual developer one key and one pay-as-you-go budget, with tokens and cost visible for every request. That makes it easier to check whether shorter conversations and fewer retries are actually helping. Create a MyRelay account if you want that request-level view alongside Claude Code.
Start simply: clear between unrelated tasks, compact when useful history has become bulky, and inspect usage before changing your workflow. The aim is not the shortest possible conversation. It is enough relevant context to finish the task without repeatedly paying for distractions.