Agent support · Hooks & Lifecycle

Observe compaction window

Hooks that fire before and after context window compaction — preserve critical state, log what gets summarized, or block compaction

Observation Hooks Hooks & Lifecycle
Supported
Partial
No
Unknown
Claude Code Current · Jun 2026
Cline CLI Current · Jun 2026
Codex CLI Current · Jun 2026
GitHub Copilot CLI Current · Jun 2026
Cursor Current · Jun 2026
2.1.144 - 2.1.197
3.0.7 - 3.0.34
0.131.0 - 0.142.4
1.0.49 - 1.0.66
3.7 - 3.9
2.1.140 - 2.1.143
3.0.0 - 3.0.6
0.130.0
1.0.46 - 1.0.48
3.2
2.1.16 - 2.1.139
0.89.0 - 0.130.0
0.0.389 - 1.0.45
2.4 - 3.2
2.0.0 - 2.1.15
0.44.0 - 0.88.0
0.0.374 - 0.0.388
1.7 - 2.0
1.0.48 - 1.0.128
0.5.0 - 0.42.0
1.2
0.2.31 - 1.0.47
0.2.0 - 0.4.0
0.45 - 1.2

Supported by 4 of 5 agents.

HoverTap any cell for version details.

Agent event mapping

  • claude-code PreCompact, PostCompact
  • cline PreCompact
  • cursor preCompact

Sub-capabilities

  • PreCompact: save state or block compaction if in a critical section
  • PostCompact: reinject lost context or verify information survived
  • Claude Code: PreCompact can block via exit code 2; PostCompact fires after completion
  • Cursor: preCompact is observational (non-blocking)