claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open VagnerVit opened this issue 10 months ago • 0 comments

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.

VagnerVit avatar Jan 14 '26 13:01 VagnerVit