[BUG] CTRL+Z will brick your claude code instance
- Lingua principale
- Lua
- Stelle
- 3.1k
- Fork
- 216
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Bug Description
Pressing CTRL+Z while in terminal mode on a running claude code window places it into a background state:
```
Claude Code has been suspended. Run `fg` to bring Claude Code back.
Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
```
After this, no amount of stopping, closing, restarting seems to get it back. You basically have to exit vim and start it again as far as I can tell.
## To Reproduce
See above
## Expected Behavior
Suspend vim entirely as if you were in any other window, rather than suspending the nested instance.
## Environment
- Neovim version: 0.11.5
- Claude Code CLI version: 2.1.45
- OS: rocky linux
- Plugin version: aa9a5
## Error Messages
N/A
## Additional Context
This works for me as a workaround:
```
vim.api.nvim_create_autocmd("TermOpen", {
callback = function(ev)
local buf_name = vim.api.nvim_buf_get_name(ev.buf)
if buf_name:match("claude") then
vim.keymap.set("t", "", "suspend", {
buffer = ev.buf,
desc = "Suspend Vim from Claude terminal",
})
end
end,
})
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo CTRL+Z in modalità terminale con le versioni indicate di Neovim e Claude Code, quindi esamina il callback TermOpen e il mapping di terminal-mode mostrati nella soluzione alternativa. Il lavoro è completato quando CTRL+Z sospende l'istanza esterna di Neovim come previsto, senza lasciare inutilizzabile il terminale di Claude Code.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- lua, vim
- Ambito
- developer-experience, devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100