Terminal State Corruption After /memory Command

Resolved 💬 3 comments Opened Jul 11, 2025 by bukzor Closed Nov 30, 2025

Summary:
Claude-cli leaves terminal in raw mode after using /memory command with vim, causing all control characters to be printed literally instead of
being processed.

Steps to Reproduce:

  1. Run claude-cli in tmux session
  2. Use /memory command (opens vim)
  3. Edit memory file and exit vim with :wq
  4. After returning to claude-cli, keyboard input appears "two lines below the chat box"
  5. All control characters (Ctrl+C, Ctrl+D, etc.) are printed literally as ^C, ^D instead of being processed

Expected Behavior:
Terminal should return to normal canonical mode after vim exits, with control characters working normally.

Actual Behavior:
Terminal remains in raw mode, requiring stty -F /dev/ttyXXX sane from another terminal to fix.

Environment:

  • macOS (Darwin 24.5.0)
  • tmux session
  • volta-shim process tree: volta-shim (parent) → claude node process (child)
  • Terminal: /dev/ttys030

Workaround:
Run stty -F /dev/ttyXXX sane from another terminal (where XXX is your tty device).

Note:
Issue appears to be a race condition - doesn't always reproduce consistently.

View original on GitHub ↗

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