Context compaction should NOT reset/clear the terminal

Resolved 💬 3 comments Opened Feb 10, 2026 by forhadahmed Closed Feb 10, 2026

Problem

When context compaction happens mid-session, Claude Code clears/resets the terminal. This destroys scrollback history that the user relies on.

This is a significant UX regression compared to alternatives (e.g., Codex) where terminal history is preserved and scrollable regardless of internal context management.

Why this matters

  • Users rely on scrollback to reference earlier command output, test results, error messages, and prior conversation
  • Context compaction is an internal optimization — it should be invisible to the user's terminal experience
  • Losing scrollback mid-session forces users to re-run commands or lose context they were actively referencing
  • The terminal display and the internal context window are separate concerns and should be treated as such

Expected behavior

Context compaction should happen silently in the background. The terminal scrollback buffer should remain intact and scrollable. The user should not notice that compaction occurred except perhaps via a subtle status indicator.

Current behavior

Terminal is cleared/reset when compaction triggers, destroying all prior scrollback history.

View original on GitHub ↗

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