GC-101 · Module 1
Context Window & the 1M Token Advantage
4 min read
Gemini CLI's defining technical advantage is its access to Gemini models with up to 1 million tokens of context. For perspective, that's roughly 750,000 words — enough to hold an entire medium-sized codebase in a single conversation. This changes the dynamics of AI-assisted coding fundamentally. Where other tools require careful context management and selective file loading, Gemini CLI can ingest entire directory trees and reason across them holistically.
The /compact command compresses your conversation history while preserving key information. Even with 1M tokens, long sessions accumulate context that becomes stale or redundant. Compaction summarizes earlier exchanges so you retain the important decisions and findings without the verbose back-and-forth. Use it when /stats shows you're consuming more context than expected.
# Check your current token usage
/stats model
# Compress conversation history
/compact
# Configure automatic compression in settings
/settings
# Look for chatCompression settings
The chatCompression setting in your configuration controls how aggressively Gemini CLI compacts context. You can set it to auto (default — compacts when nearing limits), aggressive (compacts more frequently to keep context lean), or off (never compact — useful when you need to preserve exact conversation history for debugging). For most workflows, auto is the right choice.
Do This
- Use /stats regularly to understand your token consumption
- Let auto-compaction handle context management for most sessions
- Load specific files with @ references rather than entire directories
Avoid This
- Assume 1M tokens means you never need to think about context
- Disable compaction and wonder why quality degrades in long sessions
- Dump your entire monorepo into context when you only need 3 files
A million tokens is a ceiling, not a target. The best sessions use a fraction of what's available — focused, relevant, current.
— DRILL, RC Academy