Ctrl+G external editor: arrow keys and Ctrl+G become unresponsive after pasting long text
Resolved 💬 7 comments Opened Feb 10, 2026 by alvinzhanghello Closed Apr 14, 2026
Bug Description
After using Ctrl+G to open VS Code/Cursor for editing a multi-line prompt, pasting long text, saving, and returning to the Claude Code prompt input area:
- Arrow keys (Up/Down) stop working — cannot navigate within the multi-line prompt text
Ctrl+Gbecomes unresponsive — cannot re-open VS Code for secondary editing- Mouse click in the prompt area does not restore keyboard navigation
The only recovery is Escape → Ctrl+C to cancel input entirely and start over.
Environment
- Claude Code version: 2.1.38
- OS: macOS 15.5 (Darwin 24.6.0)
- Terminal: Cursor integrated terminal (also reproducible in standalone terminal)
- Shell: zsh
- Shift+Enter keybinding: Configured via
/terminal-setup(already present in Cursor keybindings.json)
Steps to Reproduce
- Start Claude Code in Cursor integrated terminal
- Press
Ctrl+Gto open VS Code/Cursor editor for prompt editing - Paste a long multi-line text (e.g., 10+ lines with mixed content including file paths)
- Save and close the editor (
Cmd+S, then close tab) - Return to Claude Code prompt input area
- Try pressing Up/Down arrow keys to navigate within the prompt — they don't work
- Try pressing
Ctrl+Gagain — nothing happens
Expected Behavior
- Arrow keys should navigate within the multi-line prompt text
Ctrl+Gshould re-open the external editor for further editing
Actual Behavior
- Arrow keys are completely unresponsive (no cursor movement)
Ctrl+Gdoes not open the editor- The prompt input area appears to lose proper focus/keyboard event handling
Additional Context
- The same symptom also occurs in Codex CLI's prompt input, suggesting a shared underlying terminal input handling issue
- Short text (1-2 lines) in
Ctrl+Gsometimes works fine; the issue is more reliably triggered with longer pastes /terminal-setuphas been run and Shift+Enter keybinding is properly configured
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗