[BUG] Vim mode: Ctrl+[ does not exit insert mode (should be equivalent to Escape)

Open 💬 0 comments Opened Jun 26, 2026 by kitallen-loam

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?

Ctrl+[ does not exit vim insert mode, even though it is byte-identical to Escape at the terminal level (0x1B).

What Should Happen?

Ctrl+[ should exit insert mode, the same as pressing Escape. This is standard vim behaviour.

Error Messages/Logs

N/A

Steps to Reproduce

  1. Enable vi mode
  2. Enter insert mode (i)
  3. Type something
  4. Press Ctrl+[
  5. Observe: still in insert mode. Escape works correctly.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.193 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

  • Tested inside and outside tmux — no difference
  • Tested with tui default and tui fullscreen — no difference
  • cat -v confirms Ctrl+[ sends ^[, identical to Escape
  • No workaround via keybindings.json — there's no vim:exitInsertMode action to bind to
  • Terminal emulator: Ghostty / OS: macOS / Shell: zsh

View original on GitHub ↗