[BUG] /clear command doesn't clear terminal scrollback buffer - history reappears on window resize

Resolved 💬 4 comments Opened Jan 14, 2026 by VagnerVit Closed Feb 12, 2026

Environment

  • Platforms: Windows, macOS
  • Terminal: Standard terminal emulators

Description

The /clear command hides the chat history visually but doesn't clear the terminal's scrollback buffer. When resizing the terminal window, the chat history reappears.

Steps to Reproduce

  1. Start Claude Code CLI
  2. Have a conversation with some messages
  3. Run /clear
  4. Resize the terminal window
  5. Previous chat history becomes visible again

Observed Behavior

  • Context is cleared correctly
  • Visual output is hidden initially
  • On terminal window resize, the previous chat history reappears in the terminal

Expected Behavior

The /clear command should clear both the conversation context AND the terminal scrollback buffer so that previous messages don't reappear.

View original on GitHub ↗

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