Feature request: section/chapter-scoped compaction
Problem
Today, /compact and autocompact operate over the entire conversation context as one unit. There is no way to compact just one part of a session.
After a noisy phase — a long exploration, a big file/log dump, a debugging detour that is now resolved — you often want to collapse that portion into a short summary while keeping everything before and after it fully intact. The only current lever is /compact [focus], which still compacts everything and only biases what is kept; it cannot target a region.
Proposed feature
Allow compaction to be scoped to a selected section of the session. Chapters (the existing transcript chapter / table-of-contents markers) are a natural unit: let users collapse a specific chapter into a summary on demand, leaving the rest of the context untouched.
Example
/compact chapter:2— summarize only chapter 2's messages, keep all other chapters verbatim- Or a UI affordance on a chapter in the table of contents: "collapse this chapter"
Why it's useful
- Reclaim context budget precisely instead of blurring the whole session
- Preserve detail in the parts that still matter while discarding resolved noise
- More predictable than hoping a focus hint protects the right content
Related
Message pinning requests (#32874, #60992) target a similar need — surviving compaction — from the opposite direction (protect rather than collapse).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗