Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.76 ·

PostCompact Hook Event

Entry
JSON All of v2.1.76
EntryKind: in v2.1.76,
ChangesSection of the release
What

A new hook event that fires after conversation compaction completes, letting you run shell commands or prompts in response to compaction.

Details
  • Hook event name: PostCompact
  • Input includes compaction details and the summary text
  • Allows post-processing after compaction (e.g., logging, notification, or custom follow-up actions)
  • Hook output: exit code 0 shows stdout to user; other exit codes show stderr only
Evidence

PostCompact hook event definition (search for hook_event_name: C.literal("PostCompact"), "Running PostCompact hooks…")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeAdded PostCompact hook that fires after compaction completes

See this entry in the whole of v2.1.76 →

Feedback