Compaction Hooks and Session Credits
3.1.0This release adds PreCompact and PostCompact Hooks that run around conversation compaction, and shows the credits a session has used so far in /usage, the status line, and workflow step rows. It also lets you ship default settings for an environment, adds an opt-in session recap, lets sub-agents read their parent's memories, groups notifications into one row, and fixes rendering, sub-agent, workflow, and headless issues.
In CLI V3 sessions, PreCompact Hooks run before manual or automatic compaction and can refuse it, while PostCompact Hooks run afterward and receive the summary. Use these lifecycle points to save a copy of the conversation before older history is summarized, or archive and review the summary after compaction finishes. Learn more ->
/usage now shows the credits your session has used so far. Turn on the optional Session credits segment under /settings display to keep that total in the status line while you work. In the workflow monitor, each step row shows the credits that step used, so you can see where a run spends. Learn more ->