Harness Notes

Compaction

Updated 2026-11-24,

On this page

What each harness does when the conversation outgrows the context window: when it compacts, what it keeps, and how you can steer it.

When it happens

QuestionAntigravity CLI
Automatic compaction, and when

Antigravity compacts older steps as a conversation approaches the model context limit.

Change the trigger or turn it off

Since 1.5.15, /context shows the automatic compaction threshold. Set AGY_CLI_AUTO_COMPACT_OVERRIDE to a token count (700000), shorthand (800K or 0.5M), or percentage (80%) up to the eligible model’s context window. /context and /model show the active override.

Compact by hand

Since CLI 1.2.15, run /compact to compact and stop or /compact <message> to continue. Esc or Ctrl+C cancels and leaves the prior context intact.

See how full the context is

The CLI shows elapsed time during compaction and a token estimate afterwards. /context shows current context use. In 1.5.15, /context also shows the automatic threshold.

What it does

QuestionAntigravity CLI
What replaces the conversation

The model receives a checkpoint in place of older raw steps. Earlier messages remain visible in scrollback and saved history.

What survives

Google lists recent requests, attachments, active background tasks, live subagents and artifacts in retained session state.

Trimming without summarising

Not documented

The guide describes replacing old model context. An independent pruning policy and the precise retention window remain unverified.

The full history afterwards

Older messages remain in saved history and terminal scrollback.

Shaping it

QuestionAntigravity CLI
Customise the summary or hook in

A message after /compact can guide the checkpoint and becomes the next request. No durable summarization or retention setting was verified.

When a request overflows anyway

Not documented

Retry behavior after a context overflow remains unverified.

Notes and sources

Antigravity CLI, 2 sources
Automatic compaction, and when, 1
Change the trigger or turn it off, 2
Compact by hand, 1
See how full the context is, 2
What replaces the conversation, 1
What survives, 1
Trimming without summarising, 1
The full history afterwards, 1
Customise the summary or hook in, 1
When a request overflows anyway, 1