Compaction summary not accessible in-session or via /export

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Feb 17, 2026 · closed Feb 17, 2026

Problem

When a conversation is auto-compacted, the compaction summary is stored in the transcript .jsonl file but is not accessible through normal user-facing mechanisms:

  1. /export doesn't include the compaction summary — exporting a compacted conversation omits the summary entirely, even though it exists in the raw transcript (as a compact_boundary + isCompactSummary message).
  1. No way to view the summary in-session — after compaction, the summary is only visible in the session list preview (Ctrl+V) but cannot be viewed from within the active conversation. The rewind menu (Esc+Esc) shows the compaction as a checkpoint but selecting it would roll back the conversation rather than display the summary.

Expected behavior

  • /export should include the compaction summary as part of the exported conversation
  • There should be a way to view the compaction summary from within the active session (e.g., a command like /compact-summary, or include it in /context output)

Workaround

Currently the only way to retrieve the summary is to dig into the raw .jsonl transcript file and extract the isCompactSummary message with jq.

View original on GitHub ↗

4 Comments

zzkevin2019 · 8 months ago

Additionally, it would be great to have a built-in setting to automatically save the full transcript before auto-compaction — something like "exportBeforeCompact": true in settings.

Currently this is achievable via a PreCompact hook with a custom shell script, but that's not discoverable and requires users to know about hooks in advance. By the time most users realize they've lost access to their earlier prompts, compaction has already happened. A built-in option would prevent that.

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/21788
  2. https://github.com/anthropics/claude-code/issues/26125
  3. https://github.com/anthropics/claude-code/issues/19888

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

zzkevin2019 · 8 months ago

Closing as this overlaps with #19888 and #26125. Added a comment on #19888 noting that /export also omits the compaction summary, which wasn't covered in the existing issues.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.