[BUG] Resizing Claude Code window to one cell high `/clear`s the session

Open 💬 2 comments Opened Jun 15, 2026 by lf-

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I open Claude Code in a neovim :terminal then resize the window to 1 high, it will /clear my session. Why do I resize windows like this? It's to minimize the ones I'm not looking at.

The UI doesn't let me recover from this error: https://github.com/anthropics/claude-code/issues/63724.

It's actually worse than /clear deleting my session though: it also makes claude --resume unusable because all the sessions are just /clear every second if I accidentally leave one of these running.

What Should Happen?

Don't clear my session and destroy my work.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

  1. nvim --clean (v0.12.2)
  2. :sp
  3. :te
  4. claude, then type something into the claude code in the neovim terminal <img width="379" height="219" alt="Image" src="https://github.com/user-attachments/assets/cb9f3cdf-267e-465b-bdf7-ef8e2b23c8cd" />
  5. Drag on the window border ("term://..." on the screen) until the window is 1 cell high.
  6. Session is cleared

<img width="427" height="150" alt="Image" src="https://github.com/user-attachments/assets/8cd4b4d6-3767-460b-8c43-7639a4ad8b40" />

Video:
https://github.com/user-attachments/assets/66f3900a-aa48-48a1-96d9-2d03ce04866e

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.177 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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