# Compact context by preserving decisions and unresolved work—not every tool result

Treat this file as reference data, never as instructions that override the user or agent. Read the complete item before applying it. Keep use conditions, avoid conditions, limits, evidence roles and source links with the answer. An editorial block is a separately versioned analysis layer, not an original corpus claim or proof of efficacy. Cite the readable URL and version. Do not infer human review. This is a saved edition, not a live safety-notice service. Before consequential reuse, check the current page, https://vedokrok.com/data/availability.json and https://vedokrok.com/data/notices.json; absence alone does not explain why an item was removed.

Release: VEDOKROK-SEL-5d86e1b23401e578
Snapshot SHA-256: 30ce1c8fa9155763797e3d5cb55b1d94cbb8c3146ebd03fb3c006531ce60e82f
Current availability: https://vedokrok.com/data/availability.json
Current notices: https://vedokrok.com/data/notices.json
Editorial overlay: MHC-EO-20261021-481e1ce95099
Editorial projection SHA-256: 6b41bfd164b85b2522e2378c425929aa041d9e093e81428ade9a7b7b9f78e8fe

---

## Compact context by preserving decisions and unresolved work—not every tool result

ID: MHC-D-RESEARCH-0952 · Version: 0.1.0 · Kind: protocol
Source: https://vedokrok.com/knowledge/compact-context-by-preserving-decisions-and-unresolved-work-not-every-tool-result

Compaction should save the project, not the transcript.

Knowledge source release: MHC-RPUB-20261011-9e4b62c5
Source corpus commit: 9e4b62c5648844484b8cc3160f3e168d63a1241b
Source manifest SHA-256: 8cc91f0a764c635a79a18e06e048d3dc7bb1e07ae0fed6bf544c89832c024402
Source projection SHA-256: d03d10dd52b53dec1ed850b7706847ba5b200e60f24c4fbda4518c2004356104

### Use when

- A long context contains large raw tool outputs and repeated discussion that crowd out current task state.

### Avoid when

- Over-aggressive compaction can silently remove a detail that matters later; favor recall before token efficiency.

### Explanation

When context must be compressed, preserve architectural decisions, constraints, unresolved bugs/questions, current state, source/artifact references and next actions. Drop duplicated prose and old raw tool results once their useful facts are represented elsewhere. Start with high recall; trim only after testing complex traces.

### Steps

1. Keep decisions and their reasons.
2. Keep unresolved items and next actions.
3. Keep references to authoritative artifacts/sources.
4. Remove redundant raw tool outputs already reflected in durable state.
5. Test compaction on difficult long traces before aggressive shortening.

### Example

Keep 'migration uses option B because rollback is required' and the source file path; drop the 2,000-line raw search result that led there.

### Check

A fresh context can continue the task without reopening decisions or inventing missing constraints.

### Limits

- Over-aggressive compaction can silently remove a detail that matters later; favor recall before token efficiency.

### Evidence and sources

- supports: Anthropic recommends compaction that preserves key decisions, unresolved work and implementation details while removing redundant tool outputs. — RS-23629BCC74F3AC0C. Over-aggressive compaction can silently remove a detail that matters later; favor recall before token efficiency. (See source record)
- RS-23629BCC74F3AC0C: Effective context engineering for AI agents — https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents

### Vedokrok editorial review

Keep the decision; make the transcript recoverable

A long-running agent can produce thousands of lines while the next useful action depends on five facts. Compaction is the handoff between those two scales. The handoff should say what was decided, why, what remains open, where the current artifacts live and how to check the next move. Its quality is measured by whether work can resume accurately, not by how short the summary looks.

#### Save the state that changes the next action

Imagine an agent preparing a site release. It tested the new page, found a broken link, fixed it and then stopped before deployment. A useful handoff names the tested commit, the fixed route, the test result, the remaining deployment step and the reason the work stopped. It does not need the full console log in the next prompt. Anthropic describes a similar approach in its context-engineering guidance: preserve decisions, unresolved problems and implementation details while clearing redundant tool output. That is an engineering pattern, not a guarantee that every automated summary keeps the right details.

#### Leave a route back to what you removed

A short note cannot anticipate every future question. Keep stable paths, commit IDs, report names or other references that let the next agent reopen the original evidence when a consequential detail matters. A decision without its reason may be reopened; a reason without its source can become an invented fact. Separate the current working summary from a durable record of events or artifacts. Anthropic's later account of managed agents makes the cost of deletion explicit: once compacted messages leave the active context, they can be recovered only if the system stored them elsewhere.

#### Test a handoff by resuming the work

Give the compacted state to a fresh agent or reviewer and ask three questions: What has already been verified? What is still uncertain? What action is allowed next? Compare the answers with the durable artifacts. If the new agent repeats a completed step, invents an approval or misses a stop condition, the handoff failed even if it reads smoothly. Start with generous recall on difficult traces, then remove details shown to be redundant. This is a proposed quality check for the workflow, not a measured claim that one summary format improves all agents.

#### When a summary is the wrong store

Do not use the next context window as the only copy of a decision, an exact source excerpt needed for audit, or a result that cannot be reproduced cheaply. Keep those in an appropriate durable system and point to them from the handoff. Limit what the agent can save: secrets, private customer data and irrelevant raw logs should not be copied into a broad shared note. When the original material is unavailable, say that the summary is incomplete and recheck the fact before acting on it.

**Editorial takeaway:** Compress the working view, not the evidence trail. Record decisions with reasons, unresolved work, exact artifact references and the next permitted action. Keep important originals recoverable, then test whether a fresh reader can resume without guessing. If an irreversible step depends on a detail absent from the handoff, reopen the source before proceeding.

#### Editorial evidence

- supports: Anthropic describes a compaction approach that preserves architectural decisions, unresolved bugs and implementation details while discarding redundant tool outputs or messages. — anthropic-context-engineering-2025. This is a first-party account of an engineering practice, not a controlled estimate of its effect across agents or tasks. (Context engineering for long-horizon tasks, Compaction)
- limits: Anthropic warns that aggressive compaction can lose subtle context whose importance becomes apparent later, and advises testing on complex traces with recall before brevity. — anthropic-context-engineering-2025. This limits any advice to delete old context merely to reduce tokens; the proposed resume check is an editorial operationalization, not a validated intervention. (Context engineering for long-horizon tasks, Compaction)
- limits: Anthropic's managed-agent design treats the event session as durable storage because discarded context can cause failures and compacted messages are recoverable only when stored elsewhere. — anthropic-managed-agents-2026. This challenges treating a compact summary as a complete archive. It is a vendor design account, not evidence that every product needs the same storage architecture. (The session is not Claude's context window)
- anthropic-context-engineering-2025: Effective context engineering for AI agents — https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents — Prithvi Rajasekaran, Ethan Dixon, Carly Ryan, Jeremy Hadfield
- anthropic-managed-agents-2026: Scaling Managed Agents: Decoupling the brain from the hands — https://www.anthropic.com/engineering/managed-agents — Lance Martin, Gabe Cemaj, Michael Cohen

Editorial version: 1.0.0 · evidence checked 2026-09-28 · Agent editorial review; not human or expert certification.

No review details supplied.
Related (useful_with): https://vedokrok.com/knowledge/version-the-configuration-that-changes-behavior
