Saltar al contenido
Docs

Esta guía solo está disponible en inglés.

Context and compaction

How long chats stay within a model's context window, and what is kept when Vixi summarizes older messages.

What fills the window

A model can read a limited number of tokens at once. This limit is its context window. The context meter shows how much is used, the size of the window and when Vixi will summarize. It also estimates three parts of the total:

Parts of the contextA bar is split into system and tools, messages, images and free space. A marker shows where Vixi starts to summarize.System, toolsMessagesImagesFreeSummary starts hereFiles and tool results count when they are part of the messages sent to the model.
Example only. The parts are not drawn to scale and change with each chat.

When Vixi summarizes

By default, Vixi summarizes a chat at 250K tokens. You can choose 150K, 250K, 400K, 500K or 750K, or set a custom limit between 100K and 800K. You can also set a limit for one chat. If the model's window is smaller than your limit, Vixi summarizes earlier.

Once a chat reaches 120K tokens, Vixi can also shorten old tool results. It considers results over 8,000 characters, and only does this if it can free at least 10K tokens.

What happens

How Vixi summarizes a chatAs the chat grows, a summary is prepared in the background. At the limit, Vixi replaces older messages with the summary and keeps recent messages. The chat continues, and the older messages stay visible to the person.1. Chat growsNew messages and tools2. PrepareSummary in background3. Reach the limitSwitch to the summary4. New contextSummary, recent turns5. ContinueSame chatYou can still scroll up to see the older messages.

Preparing the summary in the background can shorten the wait at the limit. If it isn't ready in time, the app shows that Vixi is compacting the chat.

What is kept

  • Recent messages stay as they were written. At least the latest 12 are protected.
  • Active checklists and live work (todo_list and running background helpers) are pinned verbatim across compaction.
  • Important quotes and anchors (commits, file paths, URLs, IDs) carry over from one summary to the next.
  • Canonical tool output is restored in full (without re-inlining images) when Vixi writes the summary, and omitted details can be looked up later with session_search.
  • Your chat history stays above a divider in the app.

The prompt cache

Many model providers charge less, or respond faster, when the beginning of a request hasn't changed. This is called prompt caching. Vixi helps in these ways:

What stays the same for prompt cachingBefore and after a summary, the system prompt stays the same unless its inputs or tools change. The older messages are replaced by a summary, and new messages are added at the end.BeforeSystem promptOlder messagesRecentSame textSummarizedKeptAfterSystem promptSummaryRecent
  • After a summary, the system prompt stays exactly the same unless its content or the tools changed.
  • A helper's result is added at the end of the chat and doesn't change later.
  • For Anthropic models that support cache markers, the fixed beginning can be cached for 1 hour and recent messages for 5 minutes.
  • Current Gemini models use the provider's automatic caching, so Vixi doesn't set these times. It keeps Gemini's thought signatures when it sends tool calls back.

Summarizing still changes the message history, so later parts of the request may need to be cached again. The provider decides what it caches. We don't publish a cache hit rate because we don't have a verified figure for the current setup.

Reading the context meter

ValueMeaning
UsedTokens in the current context. The meter says whether this is exact or an estimate.
WindowThe model's context window
Summary limitWhen Vixi will summarize the chat
Last callNew, cache-read, cache-write and output tokens, plus the cost
TotalsUsage and cost for the chat, and how many times it was summarized
HelpersHelper spending, shown separately. Helper tokens don't fill the main chat's window.