Vim mode unusable to due to bug handling escape on ghostty macos

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

When I hit “escape” while typing a prompt (vim mode), it enters the sequence [27u into the prompt. this makes vim mode unusable

Steps to Reproduce

open a terminal in ghostty on macos, open cursor-agent, hit escape

Expected Behavior

in vim mode, it would exit insert mode and enter normal mode

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

cursor-agent --version
2026.01.09-6d4aaf8

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report.

This is because Ghostty uses the Kitty keyboard protocol, which sends Escape as an extended sequence (CSI 27 u = [27u) instead of the standard one. Cursor CLI doesn’t support this protocol yet.

Workaround: try one of these:

  1. Disable the extended protocol in your Ghostty config: keyboard-protocol = legacy
  2. Use a different terminal (Terminal.app, iTerm2)

I’ll pass this on to the CLI team.