What
Compaction is when Claude Code summarises a long conversation to free up room, for example with /compact. Claude Code has changed what it does with files the conversation had open:
- When a check is on, compaction now refers to files by path only (
pathOnly,namesFile) instead of re-reading them up to a token limit and attaching their content. Files that were already named are named again, and large files are marked as content not in the model's context (contentNotInModelContext). - The record of which files Claude has read now keeps a list of files named by compaction (
namedByCompactionPathList,namedByCompaction) and a set of files to name again (nameAgain,takeFilesToNameAgain). These survive a clear of that record when other entries are kept, and are carried over when it is copied. Before, only files named elsewhere were carried over. - Reads made before compaction can be kept for comparison only (
readsBeforeCompactionToCompareOnly). Before, there was a single list of reads from before compaction. - The check that stops Claude writing to a file it has not fully read now takes compaction-named files into account through
mayWriteWithoutFullRead.
Why
After compaction, the model may see a file's path instead of its content, so it reads less back in. Claude may also hit fewer spurious "file changed" errors, and may not need a full re-read before editing a file the summary names.