Everyone who uses Claude Code long enough runs into the same pattern: halfway through a task, the model starts asking questions you already answered, responses slow down, and the bill climbs faster than it should.
Most people blame the model. The real culprit is a full context window.
The context window is a desk
Think of Claude Code as an assistant working at your desk. The context window is the desk itself. Every message you send, every file it reads, every tool output — all of it stays spread out on that desk.
Two properties matter:
The desk has edges. When it fills up, the oldest papers get swept off, and the assistant "forgets" what came earlier.
The whole desk gets re-read on every turn. This is the part most people miss: each time you send a message, the model re-reads everything on the desk before responding. The fuller the desk, the more it reads per turn — and you are billed by that volume, not by how much you typed.
So context management decides two things at once: whether the assistant remembers, and how much you pay. The three commands below are simply three ways of tidying the desk.
Command one: /context — look before you tidy
Before cleaning anything, see what is actually there:
/context
It breaks down your current usage: system prompt, tool definitions, conversation messages, files read, and the total percentage used.
Read that table and you will usually find the biggest consumers are not the conversation itself, but large files and long tool outputs. That tells you what to do next — compress, or start a fresh desk.
A useful habit: on long tasks, check it at every milestone. Past 50%, start planning a cleanup.
Command two: /compact — fold the process into conclusions
/compact
Claude compresses the earlier conversation into a summary: the task goal, key decisions, and current progress survive; the trial-and-error and verbose outputs are dropped. A large part of the desk clears, but the assistant still knows exactly what it is doing.
It is the third hour of a meeting: you erase the derivations on the whiteboard and keep only the conclusions. The discussion continues; the board is usable again.
You can also tell it what the summary must keep:
/compact keep the file list and open to-dos
Use it when the same task continues but context is getting tight. This is the one you will use most.
Command three: /clear — a completely fresh desk
/clear
The conversation history is wiped. Nothing carries over.
That sounds drastic, but with the right timing it is the cheapest option of the three: the previous task is finished and the next one is unrelated. The old task's tens of thousands of context tokens add zero value to the new task, yet they get re-billed on every single turn. Holding on to them means paying rent on a task that already ended.
One common mistake: refusing to clear "just in case". Anything that genuinely needs to survive across tasks — coding rules, preferences, project conventions — belongs in a long-term memory file like CLAUDE.md, not in an ever-growing context.
Putting the three together
The daily decision chain:
| Situation | Action |
|---|---|
| Not sure where you stand | /context first |
| Same task continues, context past half | /compact (with keep-instructions) |
| Switching to an unrelated task | /clear |
| Model starts forgetting or drifting | /context to confirm, then one of the above |
| A realistic day: you pick up a feature in the morning — /clear before starting to drop yesterday's leftovers. By noon /context shows 60% — /compact, keeping the file list, and carry on. In the afternoon you switch to writing docs for a different system — /clear, start clean. |
None of this is programmer-only, by the way. Weekly reports, folder cleanups, batch file renaming, boiling a stack of PDFs down to one page — the context logic is identical. Claude Code is a tool for everyone, not a developer privilege.
Same day, same workload: managed well versus not managed, the bill can differ by a factor of two. That is not an exaggeration — a full desk means every turn re-bills tens of thousands of tokens that are doing nothing.
The step before all of this
Everything above assumes you can run Claude Code in the first place. Anthropic officially supports 175 countries and regions — Hong Kong and China are not on the list, so direct sign-up does not work.
Essevin's approach: two environment variables connect Claude Code to a stable gateway — no VPN, no code changes — with pay-as-you-go billing. And precisely because billing follows usage, everything the three commands save is money you actually keep.
After signing up, the console's usage log shows the real token count of every request — put it next to /context, and for the first time your AI bill will actually make sense.
Information in this article is current as of July 17, 2026 and is provided for general reference only; it does not constitute advice of any kind. Third-party product features, pricing and policies are subject to their official announcements. Essevin service details are as shown on essevin.com and in the console.