Ghostty Fails to Commit Input Text on Ctrl+M in Vim and AI Agents — Fixed in the tip Channel

EN / JA

Symptom

On macOS Ghostty, when using Vim or AI agents such as Claude Code or codex, pressing Ctrl+M during IME composition fails to commit the text you are typing, and it disappears. This does not happen in iTerm2, WezTerm, kitty, or Terminal.app.

Environment: macOS Tahoe 26.4 / Ghostty 1.3.1 stable

Workaround: switch to the tip channel

The bug is already fixed in Ghostty itself. The fix has not landed in a stable release yet, though, so you can use it by switching to the tip channel, which includes the fix.

  1. Add the following line to your Ghostty config file (e.g. ~/.config/ghostty/config)

    auto-update-channel = tip
  2. Quit Ghostty completely and start it again

  3. Update via the menu “Ghostty → Check for Updates…”

In my environment, this made Ctrl+M commit correctly in both Vim and Claude Code.

Why the fix works

The bug was fixed by knu’s PRs (#12518, #12547). Both were merged after the 1.3.1 release, so they were not in the stable version yet. The tip channel is a pre-release build automatically built from the main branch, so it contains the fix.

As far as I could tell from reading the source, 1.3.1 sent the string committed by the IME to the application bundled together as a “Ctrl+M key input.” As a result, Vim and AI agents received only the information that “Ctrl+M was pressed,” which is why the text disappeared. After the fix, only the committed string is sent.

Note

The tip channel is a pre-release. Once the next stable release containing the fix is out, it is a good idea to switch back to auto-update-channel = stable.