When running kimi --yolo in Ghostty terminal (same thing in mac native terminal with or without yolo), the input occasionally freezes - keystrokes are not echoed and terminal becomes unresponsive.
Steps to Reproduce:
- Open Ghostty terminal on macOS
- Run: kimi --yolo "some command"
- Occasionally terminal freezes after kimi exits
Root Cause: The keyboard listener in kimi_cli/ui/shell/keyboard.py switches TTY to raw mode (termios) but doesn't always restore properly on exit/cr
ash.
Workaround: Run stty sane in frozen terminal (typed blindly) to restore cooked mode.
Environment:
• OS: macOS
• Terminal: Ghostty
• kimi-cli: 1.30.0
Suggested Fix: Add more robust TTY state recovery in _listen_for_keyboard_unix() finally block, possibly with state verification or signal handlers.
When running kimi --yolo in Ghostty terminal (same thing in mac native terminal with or without yolo), the input occasionally freezes - keystrokes are not echoed and terminal becomes unresponsive.
Steps to Reproduce:
Root Cause: The keyboard listener in kimi_cli/ui/shell/keyboard.py switches TTY to raw mode (termios) but doesn't always restore properly on exit/cr
ash.
Workaround: Run stty sane in frozen terminal (typed blindly) to restore cooked mode.
Environment:
• OS: macOS
• Terminal: Ghostty
• kimi-cli: 1.30.0
Suggested Fix: Add more robust TTY state recovery in _listen_for_keyboard_unix() finally block, possibly with state verification or signal handlers.