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:
- Run claude-cli in tmux session
- Use
/memorycommand (opens vim) - Edit memory file and exit vim with
:wq - After returning to claude-cli, keyboard input appears "two lines below the chat box"
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗