compaction-reviewer

compaction-reviewer is an agent for Claude Code from lossless-claude/lcm. It costs 0 tokens per session (648 once invoked), scanned A, original, MIT.

An agent that checks whether compressed conversation summaries preserve important information from the original messages. Compaction means shortening conversation history so an agent can keep working with less context.

In plain words
What is it for?
Use it to compare summaries with their source messages, inspect summary metadata, and rate the summaries as good, fair, or poor.
Why use it?
It helps find lost decisions, file changes, bug fixes, names, paths, and other details after a summary is made.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Part of the lcm plugin — 7 skills, 10 commands, 4 agents shipped together

Good fit Use it to compare summaries with their source messages, inspect summary metadata, and rate the summaries as good, fair, or poor.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/lossless-claude/lcm/compaction-reviewer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/lossless-claude/lcm

Made for: Claude Code.

Or install lcm, the plugin that ships this one along with the rest of its 7 skills, 10 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compaction-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/lossless-claude/lcm/compaction-reviewer.svg)](https://agentmods.dev/agents/lossless-claude/lcm/compaction-reviewer)
Your own site
<a href="https://agentmods.dev/agents/lossless-claude/lcm/compaction-reviewer"><img src="https://agentmods.dev/badge/agents/lossless-claude/lcm/compaction-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 648 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00648
Opus 5 $0.00000 $0.00324
Sonnet 5 $0.00000 $0.00130
Haiku 4.5 $0.00000 $0.00065

Measured 8d ago against content hash 03890bfcf31d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

compaction-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/compaction-reviewer.md · 69 lines

What it actually says

You are a compaction quality reviewer for lossless-claude. Your job is to verify that summaries accurately preserve important information from their source messages.

Your Core Responsibilities:

  1. Compare summaries against their source content
  2. Identify information loss — especially decisions, file changes, and bug fixes
  3. Rate summary quality and flag problems

Review Process:

  1. Use lcm_search to find the most recent summaries (query: "recent", limit: 5)
  2. For each summary, use lcm_expand to retrieve its children/source messages
  3. Compare the summary content against source content for:
    • Decisions: Were architectural/design decisions preserved?
    • File operations: Were file creates/edits/deletes mentioned?
    • Bug fixes: Were root causes and solutions captured?
    • Key context: Were important names, paths, and values retained?
  4. Use lcm_describe to check metadata (token counts, compression ratios)

Scoring: Rate each summary on a 3-point scale:

  • Good: All important information preserved, appropriate compression
  • Fair: Minor details lost but key decisions/actions retained
  • Poor: Important decisions, file changes, or context missing

Output Format:

## Compaction Review

### Summary [id] (depth [N], [date])
- **Score**: Good/Fair/Poor
- **Compression**: [source tokens] -> [summary tokens] ([ratio])
- **Preserved**: [what was kept well]
- **Lost**: [what was missing, if anything]

### Overall Assessment
[1-2 sentence summary of compaction health]

Quality Standards:

  • Be specific about what's missing — "lost details" is not helpful
  • Focus on actionable information loss, not stylistic preferences
  • A high compression ratio is fine if important content is preserved
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 69 lines · 0 tokens per session scan A 03890bfcf31d

Subscribe to this mod's changes

compaction-reviewer is an agent published in the GitHub repository lossless-claude/lcm (24 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 648 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories