[BUG] Assistant responses truncated in terminal after conversation compaction (v2.0.29)

Resolved 💬 3 comments Opened Oct 30, 2025 by huangyingw Closed Nov 3, 2025

Bug Description

After conversation history is compacted ("Conversation compacted · ctrl+o for history"), new assistant responses in the CLI terminal are truncated and only display the last ~20% of the content. The user's question is also not visible in the terminal output.

Important: The full response content IS correctly saved in the session JSONL file - this is purely a terminal display issue during streaming output.

Environment Info

  • Platform: linux
  • OS Version: Ubuntu 24.04.3 LTS (Linux 6.11.0-1016-nvidia)
  • Architecture: aarch64 (ARM Cortex-X925 + A725, 20 cores)
  • Terminal: pts (standard terminal)
  • Claude Code Version: 2.0.29
  • Installation: Native Binary (~/.local/share/claude/versions/2.0.29)
  • Node.js: N/A (using native binary)

Reproduction Steps

  1. Start a Claude Code session with claude --continue in a project directory
  2. Have a long conversation until history compaction occurs (see "Conversation compacted" message)
  3. Ask a new question that generates a moderately long response (30+ lines)
  4. Observe that:
  • The user's question is NOT displayed
  • Only the last ~20% of the assistant's response is shown in terminal
  • Using Ctrl+O does not show the full response
  1. Verify that the full response IS saved in the session file:

``bash
tail -1 ~/.claude/sessions/<session-id>.jsonl | jq -r '.message.content[] | select(.type == "text") | .text'
``

Expected Behavior

After conversation compaction, new responses should display completely in the terminal, just like before compaction.

Actual Behavior

  • User's new question: Not displayed
  • Assistant's response: Only last ~20% visible (e.g., showing last 6 lines out of 30)
  • Session file: Contains complete response ✓

Impact

  • Users cannot see Claude's full responses without manually extracting from JSONL files
  • Severely impacts usability for continued long conversations
  • Makes it difficult to verify Claude's work without external tools

Additional Context

  • Multiple Claude processes running concurrently in different directories
  • Issue reproduced in directory: ~/loadrc
  • Session file size: 1.7 MB (655 lines)
  • Wrapper script used: claude_wrapper.sh (calls ~/.claude/local/claude -> ~/.local/bin/claude)

Workaround

Users can extract the full response from the session file:

tail -2 ~/.claude/sessions/<session-id>.jsonl | \
  jq -r 'select(.type == "assistant") | .message.content[] | select(.type == "text") | .text'

However, this defeats the purpose of the interactive CLI experience.

Related Issues

  • #8097 - Terminal display corruption (different symptoms, Windows)
  • #2904 - JSON truncation (SDK-related, closed)
  • #10636 - Bash output collapsing (different: about bash output, not assistant responses)

This appears to be a streaming output rendering bug specific to post-compaction sessions in Claude Code 2.0.29.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗