Claude Code compact dropped the approach you rejected? What survives compaction and how to keep it
Claude Code compacted, kept the code, and now it's proposing the approach you shot down an hour ago.
Claude Code compact replaces your conversation with a structured summary as you approach the auto-compact window, or when you run /compact. Anthropic's docs, checked December 3, 2026, say your project-root CLAUDE.md and auto memory come back from disk afterward. What you only said in the chat survives as far as the summary kept it, so an approach you rejected an hour ago can disappear. Put decisions that must stick in CLAUDE.md, or tell /compact what to keep.
If the reason you rejected it was an error that scrolled past in your terminal, and that terminal was the window you were working in after you installed ReMynd, ReMynd can help you find that output again.
Lost the error that ruled the approach out? Download ReMynd
Where did that decision live?
That's the better question to ask. Compaction treats files on disk and words in the conversation differently. A decision you typed into the chat is conversation. A decision written into the project-root CLAUDE.md is a file, and Anthropic's table lists it as re-injected from disk after compaction.
If the agent is already looping back to a dead end, Claude Code keeps suggesting the fix I already tried covers that symptom. This page is about how compaction can cause it.

What comes back from disk and what only survives in the summary, per Anthropic's context window docs. Illustration by ReMynd.
The 5 rules of Claude Code compaction
These five rules cover what Anthropic's docs say about compaction.
- The conversation becomes a summary. Anthropic says that when a long session compacts, Claude Code summarizes the conversation history to fit the context window. The summarization happens without appearing in your terminal.
- The summary picks what to keep. Anthropic's context engineering post says the model preserves architectural decisions, unresolved bugs and implementation details while discarding redundant tool outputs or messages. Nothing in that list promises to keep an approach you rejected.
- Files on disk come back. Project-root CLAUDE.md, unscoped rules and auto memory are re-injected from disk. If the session started with a Git status snapshot, Claude Code reads a fresh one.
- Recent files are re-read, with limits. Claude Code re-reads up to five of the files Claude read or edited, most recently modified first. A file over 5,000 tokens comes back as a path reference without its content.
- Some instructions get trimmed. Invoked skill bodies come back capped at 5,000 tokens per skill and 25,000 tokens total, oldest dropped first. Rules with paths frontmatter are summarized away, and Claude Code reloads them on demand when Claude reads, writes or edits a matching file.
Claude Code context window full: what should you do?
Nothing, if you're fine with the automatic pass. Claude Code auto compact runs as you approach the auto-compact window, so a long conversation doesn't end your session. Claude Code can also compact a conversation you leave idle.
If you want control, Anthropic lists these options before the automatic pass runs:
- Compact with a focus. Run /compact with instructions, like /compact keep the approaches we rejected and why. Anthropic says the summary then keeps what you choose instead of what the automatic pass guesses is important.
- Compact part of the conversation. Run /rewind, pick a message and choose Summarize from here or Summarize up to here.
- Change when it runs. Run /autocompact with a token count, like /autocompact 500k.
- Clear between tasks. Run /clear when you switch to unrelated work.
- Check usage. Run /context for a live breakdown of what is using your context window.
What survives Claude Code compaction?
Here is how each kind of context comes through a compaction, from Anthropic's table.
| What you had | After compaction | Source |
|---|---|---|
| Project-root CLAUDE.md and unscoped rules | Re-injected from disk | Claude Code docs |
| Auto memory | Re-injected from disk | Claude Code docs |
| The plan Claude wrote in plan mode | Re-injected from disk | Claude Code docs |
| Files Claude read or edited | Up to five re-read, most recently modified first | Claude Code docs |
| Rules with paths frontmatter, nested CLAUDE.md | Reloaded on demand | Claude Code docs |
| Context that hooks added earlier | Summarized with the rest of the conversation | Claude Code docs |
| What you said in the chat | Kept only as far as the summary keeps it | Claude Code docs |
A simple decision path
Stop at the first step that fixes it.
- Say it again, once. Tell Claude which approach you rejected and why, in one line, so the current conversation has it.
- Write it down. Add the rejected approach and the reason to your project-root CLAUDE.md, which is re-injected from disk after compaction. How to update CLAUDE.md walks through keeping it current.
- Steer the next compaction. Before a long new task, run /compact with a focus that names the decisions to keep.
- Start clean when the task changes. On compact vs clear, Anthropic's docs say to run /clear for unrelated work, so old conversation doesn't crowd out the files you need next.
- Find the evidence. If you can't remember what broke, search your screen history for a word from the error, then paste it into the prompt or CLAUDE.md.
A habit worth building: when you reject an approach, write one line in CLAUDE.md right then, with the reason. Anthropic's own advice is that a rule that must persist across compaction belongs in the project-root CLAUDE.md.
Where ReMynd fits
ReMynd is a desktop app that gives your computer local photographic memory, for you and your AI agents. It locally captures your screen history and keeps the searchable index on your computer.
So the failing test output or stack trace that made you reject an approach, if your terminal was the window you were working in after you installed ReMynd, becomes searchable by what it said. ReMynd's Claude switch sets up Claude Code with a ReMynd command and a skill, so Claude Code can search that history instead of you pasting it back in.
That is the idea behind giving an AI coding agent memory of your actual work. If you need to undo files rather than recover a decision, Claude Code rewind covers what /rewind restores. For the wider engineering setup, see ReMynd for engineers.
Your screen history is stored on your computer by default, and nothing is uploaded to us unless you turn on optional cloud sync. You can pause capture or block any app or site. That's how ReMynd's own pages put it, as of December 2026.
Claude Code uses Anthropic's model under your account, so what it retrieves may be sent to that model, the same way anything you paste into it would be. On a Mac, ReMynd needs screen recording permission, which Apple's guide puts in System Settings under Privacy & Security, Screen & System Audio Recording.
Honest limits
These are the limits I'd want to know before installing anything for this.
- ReMynd doesn't restore Claude Code's conversation or change what compaction keeps. Use CLAUDE.md and /compact with a focus for that.
- ReMynd captures only what is on your screen, starting from install. It cannot recover past work, and it cannot see background or cloud agents.
- Text recognition reads the window you're working in, so output in a window behind it won't be searchable by its words.
- On a Mac, ReMynd needs Apple silicon and macOS 15 or later. ReMynd also runs on Windows 11 (x64 or arm64).
The short version
Compaction keeps what's on disk and summarizes what you said, so decisions that only lived in the chat can go missing. If the session itself crashed instead, recovering a Claude Code session after a crash is the next read.
Want the error that ruled an approach out to stay findable? Download ReMynd