openFile: nested write + BufWriteCmd handler can overwrite Claude's file during the acwrite step (known gap)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
Direzione di ricerca
Start with the openFile paragraph of Side Effects in lua/claudecode/tools/README.md, then read earlier threads #408, #413 and #420 for the attempts already ruled out. The hard part is design: find a way to block writes of only the one buffer during the acwrite step without affecting other writes or prompts. Done means a documented, tested approach that keeps the E676 and E142 behaviour the issue describes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
openFile can still write the user's unsaved text over the file Claude just changed, in one narrow case. This issue tracks it, because #413 and #420 only documented it.
When it happens. All three must hold:
- openFile runs its acwrite step for the buffer: the buffer was opened before its file existed, or 'eventignore' or 'eventignorewin' ignores FileChangedShell.
- A user autocommand with
++nestedon BufEnter, BufWinEnter or BufLeave writes that buffer while openFile shows it. - A user BufWriteCmd handler that matches the file (such as
BufWriteCmd *) writes<afile>.
Without ++nested, or without a matching handler, the write fails with E676 and Claude's file stays. Before #408, Neovim stopped this write with E13.
What was tried.
- Turning the global
'write'option off during the step (#413 first version) stopped the overwrite but made a commonautocmd BufLeave * updateautosave fail openFile with E142. nowriteornofile'buftype' make 'modified' read as off, which loses unsaved text through other autocommands (#408 round 7).readonlydoes not stop:w!and prompts with 'confirm'.- A BufWriteCmd guard of openFile's own runs after the user's
BufWriteCmd *.
Where it is documented. lua/claudecode/tools/README.md, openFile paragraph of Side Effects.
A fix needs a way to block writes of this one buffer during the step without blocking or prompting other writes.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Lingua principale
- Lua
- Stelle
- 3.1k
- Fork
- 223
- Merge medio
- 6h 47m
- PR unite (30g)
- 93
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/claudecode.nvim
-
[BUG] ClaudeCodeAdd fails on paths with spacesForse già presa @7A1T l’ha presa 80 giorni fa. Apertabug needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
coder/claudecode.nvim#314 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
coder/claudecode.nvim#313 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
coder/claudecode.nvim#434 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] ClaudeCodeSend leaves source buffer in insert mode (snacks provider, focus_after_send off)Apertaneeds-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
coder/claudecode.nvim#423 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
coder/claudecode.nvim#309 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di coder/claudecode.nvim
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rohit746/pdf-view.nvim#107 ·
I maintainer di solito rispondono entro 1 giorno
-
bug guide
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement forever
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
openmap-world/openmap#78 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AndyHazz/bookends.koplugin#130 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
carlos-algms/agentic.nvim#336 ·