Context command (/context)
Available on: Antigravity CLI
Inspect your active conversation’s token consumption and context window usage.
Overview
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.
Open the context usage panel
To inspect your current context window usage, run the following command:
/contextUnderstand the context breakdown
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.
Visual grid indicators
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.
Token usage categories
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.
Checkpoints and tracked files
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
/rewindto 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.mdor.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.
Navigation controls
Use the following keyboard shortcuts inside the Context Usage panel:
| Key | Action |
|---|---|
| ↑ / ↓ (or k / j) | Scroll up or down by one line. |
| PgUp / PgDn | Scroll up or down by one page. |
| Ctrl + U / Ctrl + D | Scroll up or down by half a page. |
| g / Shift + G | Jump to the top or bottom of the panel. |
| Esc | Close the panel and return to the prompt. |
Manage context growth
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/btwfor 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/rewindto explore an alternative approach from an earlier checkpoint. - Disable unused MCP servers: if
MCP toolsconsumes a large share of your context window, open/mcpto disable servers you don’t need for the current project.
Next steps
Explore related commands for managing conversation history and workspace state:
- Side question command (
/btw): ask background questions without adding tokens to your active trajectory. - Resume command (
/resume): switch between saved conversation threads. - CLI reference: view all available slash commands and keyboard shortcuts.