[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
- Start Claude Code CLI
- Have a conversation with some messages
- Run
/clear - Resize the terminal window
- 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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗