Compact Service
# Compact Service (Conversation Summarization)
**Observed in**: Claude Code internal architecture
**Variables:** `NO_TOOLS_PREAMBLE`, `BASE_COMPACT_PROMPT`, `PARTIAL_COMPACT_PROMPT`, `PARTIAL_COMPACT_UP_TO_PROMPT`
**Model:** Sonnet (via cache-sharing fork or streaming fallback)
## Purpose
Generates detailed conversation summaries when the context window approaches its limit. The compact service has three operating modes: full compaction, partial compaction of recent messages, and partial compaction of older messages.
## No-Tools Preamble
Injected as the first instruction to prevent the model from calling tools during summarization. This is critical because the cache-sharing fork path inherits the parent's full tool set.when to use it
Community prompt sourced from the open-source GitHub repo Leonxlnx/agentic-ai-prompt-research (no explicit license). A "Compact Service" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
writingcommunitygeneral
source
Leonxlnx/agentic-ai-prompt-research · no explicit license
more in Writing
Writing✓ tested
Explain anything to a smart friend
great teacher who refuses to dumb things down
Writing✓ tested
Line-edit my draft (keep my voice)
sharp copy editor who tightens without flattening
Writing✓ tested
Outline a long piece before you write it
editor who structures the argument before a word is drafted