Claude Code

Claude Code Context vs Usage: /compact, /clear and Caching

Compare conversation context with account usage, understand what /compact and /clear change, and check why caching or a smaller context does not refill allowance.

/context measures the space used by one conversation; /usage shows account usage limits. Freeing conversation space does not restore consumed account allowance. Start with the measure that matches your problem.

Two different things to check

  • Conversation context: run /context to see what occupies the model's current window, such as messages, file contents and tool output. A long conversation can need compaction even while account allowance remains.
  • Account usage: run /usage to see the applicable usage windows and reset times. A new, short conversation can still be blocked if that account window is exhausted.

These measurements are not interchangeable percentages. For the timing question, see which Claude Code limit resets when.

Choose between /compact and /clear

  • Continue the same task: /compact replaces earlier conversation history with a summary. Save important decisions, constraints and unfinished work first, then check /context and verify that the summary preserves what the next step needs.
  • Start an unrelated task: /clear opens a conversation with empty conversation context. The previous session remains available through /resume; project instructions and memory may load again, so a new conversation does not mean there are no input tokens.
  • Account allowance exhausted: neither command refunds past usage. Follow the limit recovery steps instead of repeatedly clearing conversations.

The command reference and context-window documentation explain these operations. Compaction is a summary, not a guarantee that every earlier detail survives.

Why /compact can itself consume usage

Generating the summary requires a model request. The next task turn then uses a shorter history. That can reduce repeated context processing in later turns, but it does not make the summary free or erase earlier consumption.

Claude Code's cache can reuse a matching request prefix. Compaction changes conversation history and rebuilds that part of the cache. If a session resumes after its cache has expired, summarizing must process the old history without that cache hit. See the official caching explanation.

Do not treat a cache hit as restored quota, or apply an API cache price ratio as a guaranteed subscription saving. The task, authentication method and applicable usage rules still matter.

Two decision examples

These are illustrative situations, not measured account results.

  1. Large test output, allowance still available: save the failing test and relevant constraints, stop adding full logs, then compact if you need to continue the same task. Check the context breakdown and run the next focused step. Success means the required context fits and work can proceed, not that account usage fell.
  2. New conversation, weekly allowance exhausted: /context may show little history while /usage still blocks requests. More clearing will not help. Check the official reset time or eligible paid options; confirm availability in the account before continuing.

Reduce unnecessary work before the next limit

Read relevant file ranges, filter noisy output, and give subagents non-overlapping tasks. Keep a short handoff with decisions, affected files and the next verification command. Compare similar work in /usage, but do not promise a fixed saving from one command or one test.

For public reset history and the personal timer, return to the Claude Code platform page. Only save a timer when the official interface gives an explicit personal reset time.

Claude Code · Reset history & personal timer