[Bug] Option+Backspace (delete word) not working in Ghostty terminal on macOS
Status Open
Reported on v2.1.7
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
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"}]
13 Comments
Totally hobbled by this! 😅
Sometimes it works, sometimes doesn't. Most of the time it does not.
Actually, seems it works if you put it in ghostty config:
adding this line does it trick as well
Did the trick for me as well.
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 typeoption + nandoption + 7.The relevant section from the ghostty docs:
Exactly...
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.
~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.
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.
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-altset in Ghostty config — and shouldn't need to be, since it works everywhere else.Repros for me even outside of Claude Code.
keybind = opt+backspace=text:\x1b\x7ffixes it. I had to have a keybinding mapped for this even in iTerm2This stopped working for me in warp as well
Though my experiment wasn't thorough, I noticed a while back that the misbehaving
Option+Backspacehappens only when Claude is infullscreenmode. Try switching with/tui. I like the fullscreen rendering, so I ended up withmacos-option-as-altfor both Ghostty and Warp.