Skip to content
Remote Control
Available on:
Antigravity CLI

Inspect your active conversation’s token consumption and context window usage.

The /context command opens the interactive Context Usage panel in the Antigravity CLI. It displays a proportional visual grid of your model’s total context window alongside a category-by-category token breakdown, compaction checkpoints, and tracked workspace files.

To inspect your current context window usage, run the following command:

/context

On wide terminals, the Context Usage panel renders a proportional cell grid on the left and a token summary on the right. On narrower terminals, the summary stacks above the grid so every metric remains readable.

Each cell in the grid represents a proportional share of the active model’s context window limit:

  • ◉ (Filled cell): represents tokens currently in use, color-coded by category (system instructions, user messages, agent responses, tool calls, and loaded customizations).
  • □ (Free cell): represents remaining available capacity in the model’s context window.

The summary panel breaks down your token consumption into the following rows. The User messages, Agent responses, and Tool calls rows are always shown; the remaining rows appear only when that category is consuming tokens. Each row is prefixed with a marker: ◉ for conversation rows, ⛁ for the system prompt, system tools, system overhead, and customization rows, □ for free space, and ⊠ for the checkpoint buffer.

  • User messages: tokens from your prompts and inline attachments.
  • Agent responses: tokens generated by the model’s replies and reasoning steps.
  • Tool calls: tokens consumed by tool arguments and command outputs.
  • System prompt, System tools, and System overhead: tokens used by the built-in system instructions, built-in tool definitions, and other system-level overhead.
  • Rules, Skills, Subagents, Workflows, and Plugins: tokens used by each kind of loaded customization.
  • MCP tools: tokens used by the tool schemas of connected MCP servers.
  • System messages: tokens from system-generated messages in the conversation.
  • Free space: remaining token capacity before reaching the model’s context limit.
  • Checkpoint buffer: tokens held by checkpoint summaries, which stand in for older turns that have already been compacted. The panel tracks these separately, outside the grid, so summarized history doesn’t inflate the active usage percentage.

Below the summary grid, the /context panel lists active session state:

  • Checkpoints: displays the active in-context checkpoint along with a count of historical checkpoints that have already been summarized. Use /rewind to roll back to an earlier checkpoint.
  • Tracked file sections: lists loaded Knowledge files, Artifact files, and Skill files with their individual token counts, followed by auto-detected System files (such as ~/.gemini/GEMINI.md or .agents/rules/), which are listed by path only. Each section header shows a related hint (/rules, /artifact, /skill); the corresponding runnable commands are /rules, /artifact, and /skills.

Use the following keyboard shortcuts inside the Context Usage panel:

KeyAction
↑ / ↓ (or k / j)Scroll up or down by one line.
PgUp / PgDnScroll up or down by one page.
Ctrl + U / Ctrl + DScroll up or down by half a page.
g / Shift + GJump to the top or bottom of the panel.
EscClose the panel and return to the prompt.

As a conversation grows, Antigravity automatically compacts older turns into checkpoint summaries so your session can continue without hitting the model’s token limit. The Checkpoints section of the panel shows how many times this has happened.

To keep your context window lean and responsive during long sessions, consider these practices:

  • Ask side questions with /btw: use /btw for quick tangential questions so the question and answer aren’t added to your main conversation history.
  • Reset between unrelated tasks: run /clear (alias /new) when switching to a new task that doesn’t require prior conversation context.
  • Branch conversations: run /fork (alias /branch) or /rewind to explore an alternative approach from an earlier checkpoint.
  • Disable unused MCP servers: if MCP tools consumes a large share of your context window, open /mcp to disable servers you don’t need for the current project.

Explore related commands for managing conversation history and workspace state: