> ## Documentation Index
> Fetch the complete documentation index at: https://kiro.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Improved compaction

> How context compaction works in Kiro IDE 1.0 with checkpoint-based session persistence

## Overview

Auto-compaction in 1.0 uses checkpoint-based session persistence, replacing the previous fixed-threshold summarization with a structured approach that retains task-level awareness across restarts.

## How it works

When context approaches the compaction threshold:

1. The agent generates a structured LLM summary covering: tasks completed, files modified, key decisions made, and next steps.
2. The summary is persisted as a session checkpoint in the IDE's internal session storage (managed by the IDE, not written to your project directory).
3. On next session load, only the summary is read — not the full conversation history. This makes restarts fast regardless of session length.

## Manual compaction

Use `/compact` in the chat input to trigger compaction at any point. Useful if a session is large and responses feel slow. The summary includes the same structured content as auto-compaction.

## What's preserved

| Always preserved | May be summarized |
|-----------------|-------------------|
| Task status (done / in-progress / pending) | Individual tool call details |
| File paths modified | Intermediate reasoning steps |
| Key decisions and constraints | Code snippets in earlier messages |
| Next steps | Error details from resolved issues |

## Limitations

Compaction is one-way — the full conversation history before the checkpoint is not recoverable within the session. Export your session before manual compaction if you need to preserve full history.

For how compaction works across all surfaces, see [Compaction](https://kiro.dev/docs/compaction.md).
