Product case study · November 5, 2026
Claude Code /compact: Keep Unfinished Work Visible
Practice focused compaction in Claude Code, compare the before-and-after review, and catch missing evidence before continuing a task.

After compaction, check unresolved evidence against the original files before accepting a release recommendation.
A long coding conversation can contain a completed patch, a failed check and a promise to retry it. When that conversation becomes a summary, the unresolved check still matters. This exercise asks Claude Code to review a small evidence packet, compact the conversation, and review its decision again.
Sources checked November 5, 2026. This is a documentation-backed exercise, not a measured compaction benchmark. We checked the local fixture and byte-comparison commands. We did not run an authenticated Claude Code session; the response criteria below are an answer key for your own run.
You need Bash, Python 3 and an installed, authenticated Claude Code. The exercise uses synthetic text files, requires no application install and makes no real release. Normal provider usage applies; no cost estimate or savings claim is implied.
Understand what the command preserves
Anthropic describes compaction as summarizing a conversation when context fills. Earlier details can be lost. You can request a focus with /compact, and inspect context usage with /context. These controls manage what the model receives; they do not establish that a test ran. How Claude Code works
The lab below is intentionally small. It checks the meaning of the resulting review, not performance at a full context window. Do not pad it with thousands of irrelevant messages to force a limit.
Make a release packet with one missing result
Run this in your own terminal, outside an existing repository:
compact_lab=$(mktemp -d /tmp/claude-compact-lab.XXXXXX)
mkdir -p "$compact_lab/project" "$compact_lab/evidence"
cd "$compact_lab/project"
cat > requirements.md <<'REQ'
Project: Lantern expense summary
Release requires recorded results for both cases:
- normal-input: category totals match the supplied rows
- empty-input: an empty list shows total 0.00
No publication or deployment is authorized in this exercise.
REQ
cat > observations.md <<'OBS'
Synthetic review packet, not a real test log.
normal-input: PASS is recorded in this fictional packet.
empty-input: NOT RUN; no output or result is available.
A developer message says the implementation is finished.
OBS
cp requirements.md "$compact_lab/evidence/requirements.before.md"
cp observations.md "$compact_lab/evidence/observations.before.md"
printf 'Keep this lab path: %s\n' "$compact_lab"
There is no runnable expense app here. The developer’s message is deliberately weaker evidence than the release requirements. The correct decision is to hold the fictional release because the empty-input result is missing.
Record the CLI version, then start Claude from the project directory:
claude --version > "$compact_lab/evidence/cli-version.txt"
claude
Keep your existing permission controls. The prompts are task instructions, not an access-control boundary. Use only this synthetic packet; do not bring credentials or private release logs into the exercise.
Establish the decision before summarizing
Submit this prompt:
Read requirements.md and observations.md. Review this synthetic release
packet without running tests, editing files, using network tools,
delegating, or saving memories. Return four labeled lines:
Decision, Recorded evidence, Missing evidence, Next check.
Distinguish a statement that work is finished from a recorded test result.
Stop after the review.
Save the answer manually as before.txt in the sibling evidence directory, using your editor. Do not ask Claude to write it. Note any unexpected tool activity separately.
The review should hold the release, report the fictional normal-input result, identify empty-input as not run, and propose obtaining that result. If it already claims that both cases passed, correct the review before proceeding. Otherwise, the later comparison would begin with a known error.
You can enter /context to inspect current context usage. Record what it shows if useful, but there is no target percentage for this exercise.
Compact with a specific focus
Enter this as a Claude Code command, not a shell command:
/compact Preserve the release requirements, recorded evidence, unresolved checks, file paths, and the restriction against publishing. Keep claims separate from observations.
Wait for completion. Anthropic’s best-practices guide documents focused compaction and notes that summarizing a long conversation is itself a request. Do it at a meaningful task boundary; repeated compaction is not a demonstrated cost-saving technique.
Now submit:
Without reading files again or using tools, restate the release review
from the context currently available. Use the same four labeled lines:
Decision, Recorded evidence, Missing evidence, Next check.
If a detail is unavailable, say unknown rather than filling it in.
Stop after the review.
Save the answer manually as after.txt alongside before.txt. Keeping file reads out of this step lets you inspect the available post-compaction context. If Claude rereads a file anyway, record that: the answer may be correct, but it is no longer a clean recall check.
Score meaning, not matching wording
Compare both answers with the original files yourself:
| Field | Required meaning after compaction | Failure to record |
|---|---|---|
| Decision | Release remains on hold | Ready to ship or approved |
| Recorded evidence | Normal-input has a fictional recorded PASS | Claim that Claude executed the test |
| Missing evidence | Empty-input was not run; result unavailable | Passed, omitted, or inferred from implementation completion |
| Next check | Obtain the empty-input result and compare it with the requirement | Publish immediately or assume the missing result |
An honest “unknown” is better than an invented pass, but it still means the review is incomplete. Recover the missing information before continuing. A correct answer demonstrates only this small run; it does not prove that every detail will survive longer sessions.
After exiting Claude, return to the original shell and compare the fixture bytes:
cmp "$compact_lab/evidence/requirements.before.md" \
"$compact_lab/project/requirements.md"
cmp "$compact_lab/evidence/observations.before.md" \
"$compact_lab/project/observations.md"
Each command should return zero with no output. A difference or missing file needs investigation. Inspect the project directory for unexpected additions too. These comparisons cover the two fixture files, not writes elsewhere or remote actions.
Recover by rebuilding the evidence
If the post-compaction review omits a requirement, allow a new read of the two source files and repeat the four-line review. Label that answer recovered.txt. Keep the failed answer as well: rereading the source can repair the task state, but it does not retroactively make the recall check pass.
If /compact fails or declines to run on your installed version, record the message and version and stop the compaction portion. Do not report a successful comparison. The fixture can still serve as a release-review exercise.
For real projects, separate durable working rules from temporary status. Anthropic says project-root CLAUDE.md is reread after compaction; nested instruction files and path-scoped rules reload on demand. It also describes these files as model context, not enforced configuration. Keep stable requirements concise, and keep changing test evidence in a reviewed task record with source paths and dates. Memory and compaction guidance
Do not turn a stale “tests passed” sentence into a permanent instruction. When files change, the old result may no longer describe them. Before resuming consequential work, inspect the current files and obtain the checks that the current task needs.
Your useful deliverable is a before/after review plus a record of any recovery, with unknown results still marked unknown. The lesson on concrete acceptance checks helps turn those missing results into observable tests for an actual project.
Primary sources checked
All checked November 5, 2026:
- How Claude Code works: context contents, automatic summaries, focused compaction and
/context. - Best practices for Claude Code: focused
/compact, verification and the cost of summarizing context. - How Claude remembers your project: persistent instructions, post-compaction loading and the distinction between context and enforcement.
Put this to work
Distinguish a compressed conversation from verified task state.
Try
Ask Claude to preserve unresolved checks while compacting a synthetic review.
Prove it worked
Confirm that the missing empty-input result remains unknown and release stays on hold.
Keep in view
- Use a tiny release-review fixture with one deliberately missing result.
- Compare the same decision before and after focused compaction.
- Recover from omissions by returning to source files, then checking the answer again.