You'll notice
Claude Code now drains pending stdin input before turning off raw mode
What
When Claude Code suspends reading from standard input, for example to hand control of the terminal to another program, it now checks whether there's outstanding "owed" input still buffered. If there is, it drains that input first before switching off the terminal's raw input mode.
Why
Without this, buffered keystrokes or input could be lost at the moment control of the terminal is handed off, so draining first makes sure nothing typed gets silently dropped.