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:
Disable the extended protocol in your Ghostty config: keyboard-protocol = legacy