Answer: The core automatically compresses the conversation history before sending it to the model when a conversation approaches the token limit for the configured model. This compression is designed to be lossless in terms of the information conveyed, but it reduces the overall number of tokens used. Status: Confirmed Entry: tool/gemini-cli/memory-and-context/chat-history-compression Revision: 1 Digest: sha256:40c637a2fdd6ffc4 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:18:11Z Last changed: 2026-11-13T03:18:11Z Last verified: 2026-11-20T12:52:20Z Next check: 2026-11-21T12:52:20Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of compression trigger | approaches the token limit | [1] | 2026-11-20 compression action | automatically compresses the conversation history | [1] | 2026-11-20 compression effect | reduces the overall number of tokens used | [1] | 2026-11-20 Sources: [1] Google. "Gemini CLI core". https://geminicli.com/docs/core.md Role: primary. Accessed: 2026-11-20T12:52:20Z Quote: "When a conversation approaches the token limit for the configured model, the" (Supports: compression trigger) Quote: "core automatically compresses the conversation history before sending it to the" (Supports: compression action) Quote: "conveyed, but it reduces the overall number of tokens used." (Supports: compression effect) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 39e2baf86e27c40a0d5e4f3df2ef4960000c4ce773734f1cb3ecde1d149a716a (captured 2026-11-13T03:18:10Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:18:11Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:52:20Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:52:20Z Last attempt: 2026-11-20T12:52:20Z Notes and limitations: Extracted automatically from a single official source (section "Chat history compression"). Related: https://latestn.com/tool/gemini-cli/memory-and-context/circular-import-detection How does Gemini CLI prevent circular imports in GEMINI.md files? https://latestn.com/tool/gemini-cli/memory-and-context/context-hierarchy What is the context hierarchy for GEMINI.md files in Gemini CLI? https://latestn.com/tool/gemini-cli/memory-and-context/create-gemini-md-project-rules How do I create a GEMINI.md file to define project-wide rules for Gemini CLI? https://latestn.com/tool/gemini-cli/integrations/use-core-package-standalone Can I use @google/gemini-cli-core as a standalone package in my own project? https://latestn.com/tool/gemini-cli/integrations/what-is-acp What is the Agent Client Protocol (ACP) and how does Gemini CLI use it? https://latestn.com/tool/gemini-cli/memory-and-context/auto-memory-limitations What are the limitations of Auto Memory in Gemini CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:18:11Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/memory-and-context/chat-history-compression/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/memory-and-context/chat-history-compression POST: https://latestn.com/dispute/tool/gemini-cli/memory-and-context/chat-history-compression with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/memory-and-context/chat-history-compression?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How does Gemini CLI compress chat history? Revision 1, last verified 2026-11-20T12:52:20Z. https://latestn.com/tool/gemini-cli/memory-and-context/chat-history-compression (accessed 2026-11-21T09:57:19Z). @misc{LatestN_tool_gemini_cli_memory_and_context_chat_history_compression_r1, title = {How does Gemini CLI compress chat history?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/memory-and-context/chat-history-compression}}, note = {Revision 1; digest sha256:40c637a2fdd6ffc4; last verified 2026-11-20T12:52:20Z; accessed 2026-11-21T09:57:19Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/memory-and-context/chat-history-compression