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:

  1. Arrow keys (Up/Down) stop working — cannot navigate within the multi-line prompt text
  2. Ctrl+G becomes unresponsive — cannot re-open VS Code for secondary editing
  3. Mouse click in the prompt area does not restore keyboard navigation

The only recovery is EscapeCtrl+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

  1. Start Claude Code in Cursor integrated terminal
  2. Press Ctrl+G to open VS Code/Cursor editor for prompt editing
  3. Paste a long multi-line text (e.g., 10+ lines with mixed content including file paths)
  4. Save and close the editor (Cmd+S, then close tab)
  5. Return to Claude Code prompt input area
  6. Try pressing Up/Down arrow keys to navigate within the prompt — they don't work
  7. Try pressing Ctrl+G again — nothing happens

Expected Behavior

  • Arrow keys should navigate within the multi-line prompt text
  • Ctrl+G should re-open the external editor for further editing

Actual Behavior

  • Arrow keys are completely unresponsive (no cursor movement)
  • Ctrl+G does 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+G sometimes works fine; the issue is more reliably triggered with longer pastes
  • /terminal-setup has been run and Shift+Enter keybinding is properly configured

View original on GitHub ↗

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