openFile: nested write + BufWriteCmd handler can overwrite Claude's file during the acwrite step (known gap)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 12/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Lua
- Sterne
- 3.1k
- Forks
- 223
- Ø Merge
- 6 Std. 47 Min.
- Gemergte PRs (30 T.)
- 93
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus coder/claudecode.nvim
-
[BUG] ClaudeCodeAdd fails on paths with spacesEvtl. vergeben @7A1T hat das vor 80 Tagen übernommen. Offenbug needs-triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
coder/claudecode.nvim#314 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
coder/claudecode.nvim#313 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
coder/claudecode.nvim#434 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG] ClaudeCodeSend leaves source buffer in insert mode (snacks provider, focus_after_send off)Offenneeds-triage
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 50/100
coder/claudecode.nvim#423 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
coder/claudecode.nvim#309 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in coder/claudecode.nvim
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
teradata-labs/loom#624 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
rohit746/pdf-view.nvim#109 ·
Maintainer antworten meist innerhalb von 1 Tag