Expand description
Manual context compaction with custom instructions.
/compact <instructions> sent as a user turn makes the CLI summarize the
conversation, steering the summary with instructions. The turn’s stream
yields AgentEvent::Compacted and ends with Done.
Hooks see it too: PreCompact receives trigger: "manual" and
custom_instructions; PostCompact receives compact_summary.
Source: binary PreCompact / PostCompact hook input schemas,
system/compact_boundary schema
Functions§
- compact
- Compact the session’s context now.