[BUG] CTRL+Z will brick your claude code instance
- 主要言語
- Lua
- スター
- 3.1k
- フォーク
- 216
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## 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,
})
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、記載されている Neovim と Claude Code のバージョンでターミナルモードの CTRL+Z を再現し、次に workaround に示されている TermOpen callback と terminal-mode mapping を調べます。CTRL+Z によって外側の Neovim インスタンスが期待どおり suspend され、Claude Code terminal が使用不能にならなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua, vim
- 領域
- developer-experience, devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100