[BUG] Issues with redraw and terminal hiding after a few interactions with Claude
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the issue with the supplied LazyVim configuration, the floating terminal settings, and the documented Claude workflow while toggling focus during thinking. Then trace the terminal redraw and focus-handling paths; done means the input and cursor consistently redraw and ToggleFocus restores the terminal without requiring Esc or interrupting Claude.
Written by the indexing model from the issue text.
Description
Bug Description
I'm using claudecode.nvim with LazyVim with the following configuration:
local toggle_key = "<C-,>"
return {
{
"coder/claudecode.nvim",
dependencies = { "folke/snacks.nvim" },
keys = {
{ toggle_key, "<cmd>ClaudeCodeFocus<cr>", desc = "Claude Code", mode = { "n", "x" } },
},
opts = {
terminal = {
---@module "snacks"
---@type snacks.win.Config|{}
snacks_win_opts = {
position = "float",
width = 0.9,
height = 0.9,
border = "single",
keys = {
claude_hide = {
toggle_key,
function(self)
self:hide()
end,
mode = "t",
desc = "Hide",
},
},
},
},
},
},
}
I was not able to find the exactly moment in my workflow the issues happens, but they are:
- At some point the terminal input just stops to draw and the cursor is placed in some random position in the terminal window. A few things i do try to fix it:
- Esc+i (i noticed that it enters in normal mode sometimes) or Ctrl+l (or both)
- ToggleFocus
- Quit the entire session and start the terminal again
- When Claude starts to "think" (when understanding your prompt, working through requested changes or finishing your changes to present a summary) if I use my ToggleFocus shortcut
<ctrl>+,i can't bring the terminal back again. I need to press Esc twice which end up interrupting the session.
To Reproduce
Steps to reproduce the behavior:
Install neovim, LazyVim, enable claudecode.nvim from extras and use the configuration i mentioned above.
My workflow with Claude is:
- /model -> opus
- /plan
- Interact with Claude prompts or press Esc to add information.
- Esc
- /model -> sonnet
- Shift+Tab to change to
accept edits on - Proceed
Between the steps 1-6, try to toggle focus (always wait for Claude to pause and ask something or finish the current thinking)
During the step 7 try to ToggleFocus the window.
Again, it's a bit random the moment above issues start to happen.
Expected Behavior
- Consistent (re)draw of window where the input field is always visible and the cursos placed in it
- Being able to ToggleFocus even during Claude thinking.
Environment
- Neovim version: 0.12.3
- Claude Code CLI version: 2.1.198
- OS: macOS Tahoe 26.5.2
- Plugin version: 0.3.0
Error Messages
N/A
Additional Context
N/A
- Dominant language
- Lua
- Stars
- 3.1k
- Forks
- 219
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coder/claudecode.nvim
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
coder/claudecode.nvim#321 ·
-
bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
coder/claudecode.nvim#314 ·
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
coder/claudecode.nvim#313 ·
-
needs-triage
Difficulty 5/5 Over a week Newbie friendliness 20/100
coder/claudecode.nvim#319 · 2 reactions ·
-
[BUG] 框选文本一直抱错误信息Openbug needs-triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
coder/claudecode.nvim#316 · 1 comment ·
All issues in coder/claudecode.nvim
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Facepunch/garrysmod-issues#7077 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AstroNvim/astrotheme#184 ·
-
[Minetest] IssueOpen
Difficulty 1/5 Under an hour Newbie friendliness 92/100
pterodactyl/game-eggs#639 ·