[BUG] CTRL+Z will brick your claude code instance
- Dominant language
- Lua
- Stars
- 3.1k
- Forks
- 216
- PR merge metrics
- No merged PRs in 30d
Description
## 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,
})
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.