[BUG] "Compacted (ctrl+o to see full summary)" — Ctrl+O never renders the compact summary, though it is stored in the JSONL with isVisibleInTranscriptOnly: true
Summary
After compaction the TUI prints:
⎿ Compacted (ctrl+o to see full summary)
Pressing Ctrl+O switches to Showing detailed transcript, but the compact summary is never rendered. The line stays collapsed exactly as before — no Compact summary block, no summary body, nothing. The affordance the UI advertises does not exist.
This is a rendering bug only: the summary text is persisted correctly in the session JSONL, and the record is even explicitly flagged for transcript display. The TUI just doesn't show it.
Environment
- Version: 2.1.220 (Claude Code CLI)
- OS: macOS 26.6 (Darwin 25.6.0)
- Terminal: iTerm2
Steps to reproduce
- Run a long session, then run
/compact(manual trigger; auto-compaction behaves the same). - After compaction, observe the collapsed line:
Compacted (ctrl+o to see full summary). - Press Ctrl+O.
- Footer changes to
Showing detailed transcript · ctrl+o to toggle · ↑↓ scroll · v to open in code. - Scroll to the compaction point.
Expected
The full compact summary is displayed (as it used to be, rendered as a Compact summary block).
Actual
Only the same collapsed one-liner plus the post-compaction tool lines (Read …, Referenced file …, Skills restored …). The summary body is nowhere in the transcript view. Ctrl+O toggling has zero effect on that line.
Evidence that the data is present
From the session JSONL, the message immediately after the compact_boundary system record:
{
"parentUuid": "90523a41-bb8b-4225-81fb-20444328ae75",
"type": "user",
"isVisibleInTranscriptOnly": true,
"isCompactSummary": true,
"uuid": "9bd2cd48-effd-4903-b247-cb1b2fad50cc",
"timestamp": "2026-07-30T07:56:53.689Z",
"sessionId": "d72da877-…",
"version": "2.1.220",
"message": {
"role": "user",
"content": "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation.\n\nSummary:\n## 1. …"
}
}
message.contentlength: 12030 chars — the summary is complete.- The preceding record is
{"type":"system","subtype":"compact_boundary","compactMetadata":{"trigger":"manual","preTokens":897264,"postTokens":14684,…}}. - Note
"isVisibleInTranscriptOnly": true— this record is explicitly marked as the thing transcript mode should render, yet transcript mode skips it. That flag looks like the most likely place the regression lives: the transcript renderer appears to filter outisCompactSummarymessages (or dropsisVisibleInTranscriptOnlyrecords) instead of rendering them.
Reproduced across two separate compactions in the same session (boundaries at 2026-07-26T18:39:58Z and 2026-07-30T07:56:54Z); both stored a valid summary (16081 and 12030 chars), neither is viewable via Ctrl+O.
Impact
The compact summary is the only remaining representation of everything that was dropped from context (here: 897k → 15k tokens, 1.7M cumulative dropped tokens). Being unable to read it means there is no in-TUI way to check what the model actually kept — which matters a lot when using /compact with custom instructions, since you can't verify the instructions were honored. The only workaround is jq-ing the raw JSONL.
Regression note
Older reports (e.g. #27242) show a ⏺ Compact summary block was rendered in transcript mode on ~2.1.47–2.1.52, with the complaint being about pre-compaction history. On 2.1.220 even the summary itself is gone, and the label changed to the more explicit "ctrl+o to see full summary" — so the promise got stronger while the behavior got worse.
Related but distinct: #27242 (no access to pre-compaction history — that's about the dropped messages; this is about the summary that replaced them).
Suggested fix
Render isCompactSummary: true / isVisibleInTranscriptOnly: true user messages in transcript mode (Ctrl+O), or — if they are intentionally hidden — change the label so it stops advertising an action that does nothing.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Confirmation: the summary is fully intact on disk — this is purely a TUI rendering gap
Extracted both compact summaries from the same session file with a one-liner:
Result — two complete, well-formed summaries:
| compaction | timestamp | chars | trigger | preTokens → postTokens |
|---|---|---|---|---|
| 1 |
2026-07-26T18:39:58Z| 16081 | manual | 843473 → 21678 || 2 |
2026-07-30T07:56:53Z| 12030 | manual | 897264 → 14684 |The second one (the one in the screenshot) contains the full 9-section structure the compaction prompt produces —
## 1. Что было сделано…## 9. Следующий шаг— plus the trailing instructions block (If you need specific details from before compaction… read the full transcript at: <path>/Continue the conversation from where it left off…). Nothing is truncated, nothing is empty.So the pipeline is fine end-to-end:
type: user,isCompactSummary: true✅isVisibleInTranscriptOnly: true— i.e. explicitly marked as transcript-mode-only content ✅Compacted (ctrl+o to see full summary)✅Only step 5 is broken. Given flag (3) exists specifically so this record shows up in transcript mode, the regression is almost certainly in the transcript renderer's filter — it drops
isVisibleInTranscriptOnly/isCompactSummaryrecords instead of rendering them.Worth noting the practical cost:
/compactwas invoked with custom instructions here (не включать в компакт мои сообщения…— "don't include my messages in the compact, only what we did"). Whether those instructions were honored is only verifiable by reading the summary. With Ctrl+O dead,jqon the raw JSONL is the sole way to check that a user-facing feature did what it was told.Thanks for the detailed report. I tried to reproduce this on the current release, 2.1.233 (macOS): ran a short session, ran
/compact, then pressed Ctrl+O. In the detailed transcript view a⏺ Compact summaryblock with the full summary text was rendered right at the compaction point, and it stayed visible after many more messages were added. So on 2.1.233 the summary does show under Ctrl+O.One thing that may explain what you saw: outside fullscreen mode, the Ctrl+O transcript view only shows the most recent ~30 messages and puts a
ctrl+e to show N previous messagesdivider at the top. After a large compaction, the summary is followed by the preserved recent messages plus the post-compactionRead …/Referenced file …/Skills restored …lines, so the summary can fall above that window and only appears after pressing Ctrl+E. We agree theCompacted (ctrl+o to see full summary)hint is misleading in that case and are looking at keeping the summary in view / clarifying the hint.Could you check on 2.1.233 whether pressing Ctrl+E while in the Ctrl+O view reveals the summary? If it still doesn't appear at all, please share your terminal, whether the session was resumed with
--resume, andclaude doctoroutput.🤖 Generated with Claude Code
We weren't able to reproduce this. Could you provide steps to trigger the issue — what you ran, what happened, and what you expected? This issue will be closed automatically if there's no activity within 7 days.