[BUG] Nano editor displays "unknown sequence" error on Ctrl/Esc key input

Resolved 💬 6 comments Opened Jan 21, 2026 by benrfairless Closed Apr 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I press Ctrl+G to create a larger prompt, nano is launched.

When I try to exit nano (by either using Ctrl+X or Esc+X) I get an error "unknown sequence" in nano. I have to restart the entire terminal for changes to take effect.

What Should Happen?

Claude Code should allow me to exist by using any of the relevant nano commands

Error Messages/Logs

Steps to Reproduce

  1. run claude to start an interactive session
  2. Press "Ctrl+G" to open a nano editor
  3. Type a multi-line prompt
  4. Press any shortcut starting with "Ctrl" or "Esc"

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.14 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Feedback ID: 859b3d1a-cedd-4f2f-b959-55b7d37c6b72

View original on GitHub ↗

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