[BUG] /memory opens external editor but hangs Claude Code; Ctrl+C does not exit
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
Running /memory and selecting an entry opens the corresponding .md file in my external editor as expected, but Claude Code becomes hung afterward. The TUI is unresponsive to all input — Enter, typing, and slash commands do nothing. Even Ctrl+C does not exit Claude Code; I have to kill the process from another shell (or close the terminal tab) to recover.
This is distinct from #57817 (which is about Enter being unresponsive in the /memory selection menu and producing escape sequences on Linux/gnome-terminal). In my case the menu works, the editor opens, but Claude Code never recovers control after the editor closes/while it's open.
What Should Happen?
After the external editor closes, Claude Code should resume its TUI and accept input normally. At minimum, Ctrl+C should always be able to exit Claude Code.
Steps to Reproduce
- Launch
claudein Ghostty on macOS. - Run
/memory. - Select a memory file to edit — Claude Code launches the configured external editor with the
.mdfile. - Edit and close the editor (or attempt to interact with Claude Code while it's open).
- Claude Code's TUI is hung — no keystrokes are accepted, including
Ctrl+C. The process must be killed externally.
Is this a regression?
Yes, this worked in a previous version.
Last Working Version
Not sure of the exact version.
Claude Code Version
2.1.139 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other (Ghostty and cmux)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗