To check context usage in Claude Code, type /context in a session; it shows your current context usage as a colored grid, along with optimization suggestions and capacity warnings.
As of December 4, 2026, Anthropic’s Claude Code documentation describes these options:
- /context: visualizes what is filling the context window. Use
/context allto expand the per-item breakdown. If the conversation exceeds the context window, it shows how far over the limit you are and which command frees space. - Status line: run
/statusline show model name and context percentageto have Claude Code generate a status line script. Scripts can readcontext_window.used_percentage,remaining_percentageandcontext_window_size. - /compact: summarizes the conversation so far to free space, with optional focus instructions.
- /clear: starts a new conversation with an empty context.
The status line uses counts from the last API response, while /context adds an estimate for newer messages, so /context can read slightly higher.
Related: What is the Claude Code context window?, Claude Code 2.1.335 power-user guide and How to change the model in Claude Code?
Source: Claude Code docs, Commands; Claude Code docs, Status line; Claude Code docs, Manage costs
Image: Claude logo by Anthropic, public domain (trademarked), via Wikimedia Commons. Placed on a white background and resized. Claude is a trademark of Anthropic. FreeAnswers is not affiliated with or endorsed by Anthropic.