Claude text editor in terminal back space doesnt work sometimes
Often I need to delete some stuff I typed, using the backspace key. It will always start to delete characters but often it stops working after a couple key presses. To get around it I use the arrow keys to go up a line (if there is multi line), back some characters, then drop down where I need to start the deletion, then use the DEL key instead of back space. After I do that.. back space works again sometimes.
Is this in VS Code terminal? Do you have an exact repro?
For me when I'm using claude code in a terminal (via tmux and ssh) and I press backspace too quickly (or just hold it down) it'll stop working after a couple backspaces. The 'pipe' that forms the right side of the prompt box also starts moving (like I'm pressing delete instead of backspace). Though of course that pipe doesn't normally move, only when it gets into this stuck mode.
It's not just a visual artifact, when I press enter, the LLM gets prompted by all the 'a' that are shown. The ssh is on a relatively high latency (165ms), I think that may have something to do with it, though this behaviour doesn't happen with any of my other apps.
I find this all the time when using via Blink -> mosh -> tmux on iOS.
Would love to be able to turn off the fancy little input box and just use regular readline until this is fixed.
Same bug on Visual Studio Code and when I'm using the terminal. If it helps, I'm using WSL2 on Windows. It has been like this since the public release.
I am encountering this as well. I am running Claude Code via docker-run, launched from a Gnome terminal. TERM is set to xterm-256color.
This is very annoying. Using Windows Terminal to ssh to Debian VM.
Some more interesting data: Often when this happens to me, I find that the first backspace causes the vertical line on the RHS of the input field to 'jump back' about N characters, and then I need to press backspace N times (moving the vertical line one character to the right each time) for backspace to work correctly.
Also impacts ^db in vim mode and ^W. Only half the word will be deleted.
I am also affected by this issue - It seems to affect WSL - but it happens no matter what terminal client i use; git bash, powershell, wsl.
This happens in every environment I use Claude Code in. Its annoying and flow-breaking for me. The less terminal/TUI fluent users in my group are really going to struggle with it.
Same here. I'm using it in the Windows Terminal running Bash via WSL2 and I thought it might be something that is lost in translation but it's reassuring to hear that this issue is independent from that.
So I have tried this via VMware guest OS (in to ubuntu guess), and am now using nomachine to a separate computer, as well as when I am natively on that computer in a terminal window. This happens. The only way around it is I use arrow keys to go up.. back.. then down, and then use DEL to delete. Then it starts to work a bit (backspace does) again. I wonder if this is related to the weird long context entire window refresh issues I filed a bug for as well. Seems like some sort of similar GUI/text refresh issue. (this)
Just piling onto this - its quite a distracting bug that cuts into productivity and seems like it would be low hanging fruit for a fix.
I once experienced the same glitch. The glitch disappeared after I deleted ~/.claude and ~/.claude.json to resolve an unrelated issue. How strange.
Possibly related, sometimes after paste (of text less than the threshold to collapse the paste) the cursor is in the wrong position. It's in the middle of the pasted text instead of at the end.
My hunch is this issue is similar: the input text area thinks the cursor is in the wrong place. It thinks it is at the beginning, so you can't backspace.
I once experienced the same glitch. The glitch disappeared after I deleted
~/.claudeand~/.claude.jsonto resolve an unrelated issue. How strange.
As a data point this did not clear it up for me.
In the same boat
I can reproduce this reliably by using "swipe typing" on mobile. I cannot reproduce it in the Gemini CLI, though apparently the two both use React Ink for UI.
This happens to me when using mosh with tmux with iterm2. I can just never backspace.
Same issue. When this happens, the backspace sporadically works for me. For example I might hit backspace 6 times with no effect, then the 7th time I hit backspace it works. It seems almost random.
For me when I'm using claude code in a terminal (via tmux and ssh) and I press backspace too quickly (or just hold it down) it'll stop working after a couple backspaces. The 'pipe' that forms the right side of the prompt box also starts moving (like I'm pressing delete instead of backspace). Though of course that pipe doesn't normally move, only when it gets into this stuck mode.
It's not just a visual artifact, when I press enter, the LLM gets prompted by all the 'a' that are shown. The ssh is on a relatively high latency (165ms), I think that may have something to do with it, though this behaviour doesn't happen with any of my other apps.
Very well explained, I see the same with the vertical pipe from the input frame moving when I press backspace.