[Bug] Option+Backspace (delete word) not working in Ghostty terminal on macOS

Status Open
Reported on v2.1.7
Maintainer reply None cached
Activity 13 comments · opened Jan 14, 2026

Bug Description
Option+Backspace (delete previous word) doesn't work in Claude Code on macOS with Ghostty terminal, though it works fine in the terminal outside of Claude Code. Related to issues #5196 and #9219.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.7
  • Feedback ID: 505d072a-d729-4471-bd05-3a1f565d6727

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/jeremy/.local/share/claude/versions/2.1.7 (expected in multi-process scenarios)\n    at ALR (/$bunfs/root/claude:3168:2157)\n    at eFA (/$bunfs/root/claude:3168:1268)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T14:22:13.512Z"}]

View original on GitHub ↗

13 Comments

ejntaylor · 7 months ago

Totally hobbled by this! 😅

mekedron · 7 months ago

Sometimes it works, sometimes doesn't. Most of the time it does not.

mekedron · 7 months ago

Actually, seems it works if you put it in ghostty config:

macos-option-as-alt = left
funclosure · 7 months ago

adding this line does it trick as well

macos-option-as-alt = true
mvrckhckr · 7 months ago
adding this line does it trick as well `` macos-option-as-alt = true ``

Did the trick for me as well.

patriksimms · 6 months ago

The fix works, but breaks specific behavior on non US Keyboards. I use a german keyboard, where we e.g. dont have a special key for ~ or |, but rather have to type option + n and option + 7.

The relevant section from the ghostty docs:

If true, the Option key will be treated as Alt. This makes terminal sequences expecting Alt to work properly, but will break Unicode input sequences on macOS if you use them via the Alt key.
jereswinnen · 6 months ago
The fix works, but breaks specific behavior on non US Keyboards. I use a german keyboard, where we e.g. dont have a special key for ~ or |, but rather have to type option + n and option + 7. The relevant section from the ghostty docs: > If true, the Option key will be treated as Alt. This makes terminal sequences expecting Alt to work properly, but will break Unicode input sequences on macOS if you use them via the Alt key.

Exactly...

stevebakh · 6 months ago

Opt+backspace was working completely fine for me in Ghostty and Claude Code for months, and only stopped working in January.

Ctrl+w still works, but it's not as natural for me to use as opt+backspace.

macos-option-as-alt = true

~Works for me. Haven't yet had any issues using a UK keyboard.~ I take it back, this subsequently stopped working for me only minutes later.

jereswinnen · 6 months ago

I'm starting to think this is more a Ghostty issue, since I don't have this issue with Claude Code when I use Warp or any other terminal app for that matter.

alonl · 6 months ago

Same issue here. Claude Code 2.1.49, Ghostty, macOS. Option+Backspace stopped working for delete-word inside Claude Code, while it works fine in the shell. Control+Backspace works as a workaround. No macos-option-as-alt set in Ghostty config — and shouldn't need to be, since it works everywhere else.

aaron-kumo · 5 months ago

Repros for me even outside of Claude Code. keybind = opt+backspace=text:\x1b\x7f fixes it. I had to have a keybinding mapped for this even in iTerm2

sramhall · 3 months ago

This stopped working for me in warp as well

danielorbach · 3 months ago

Though my experiment wasn't thorough, I noticed a while back that the misbehaving Option+Backspace happens only when Claude is in fullscreen mode. Try switching with /tui. I like the fullscreen rendering, so I ended up with macos-option-as-alt for both Ghostty and Warp.