⌨️PostCompact Hook
Also known as PostCompact, compact_summary
The event after the chat is cut down. A hook can log the summary.
Think of it like
It is like you read the short notes. They were cut down from the long ones.
Example
Emma logs each summary from her PostCompact hook. Later she can see what Claude kept and what it lost.
Why it matters
It shows you exactly what Claude will remember from here on.
Definition
Example code
json
{
"hooks": {
"PostCompact": [
{ "hooks": [{ "type": "command", "command": "./log-summary.sh" }] }
]
}
}Common mistake
Key takeaways
- 1After compaction. Manual or auto.
- 2Gets the summary. To log.
- 3Cannot block. Already done.